add scrollbar to channel list, closing channels fixed
This commit is contained in:
parent
43e2aeec73
commit
8cc0aaae23
|
@ -16,6 +16,7 @@ MainWindow
|
|||
|
||||
TextList
|
||||
id: channelList
|
||||
vertical-scrollbar: channelsScrollBar
|
||||
anchors.fill: parent
|
||||
anchors.bottom: next.top
|
||||
margin-bottom: 10
|
||||
|
@ -54,3 +55,11 @@ MainWindow
|
|||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
@onClick: self:getParent():destroy()
|
||||
|
||||
VerticalScrollBar
|
||||
id: channelsScrollBar
|
||||
anchors.top: channelList.top
|
||||
anchors.bottom: channelList.bottom
|
||||
anchors.right: channelList.right
|
||||
step: 14
|
||||
pixels-scroll: true
|
||||
|
|
|
@ -267,14 +267,14 @@ function Console.removeCurrentTab()
|
|||
local tab = consoleTabBar:getCurrentTab()
|
||||
if tab:getText() == "Default" or tab:getText() == "Server Log" then return end
|
||||
|
||||
consoleTabBar:removeTab(tab)
|
||||
|
||||
-- notificate the server that we are leaving the channel
|
||||
if tab.channelId then
|
||||
g_game.leaveChannel(tab.channelId)
|
||||
elseif tab:getText() == "NPCs" then
|
||||
g_game.closeNpcChannel()
|
||||
end
|
||||
|
||||
consoleTabBar:removeTab(tab)
|
||||
end
|
||||
|
||||
function Console.getTab(name)
|
||||
|
|
Loading…
Reference in New Issue