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