From 8cc0aaae2310fa3615f9f5e6e5554697ebab012c Mon Sep 17 00:00:00 2001 From: Henrique Santiago Date: Fri, 6 Apr 2012 19:14:39 -0300 Subject: [PATCH] add scrollbar to channel list, closing channels fixed --- modules/game_console/channelswindow.otui | 9 +++++++++ modules/game_console/console.lua | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/game_console/channelswindow.otui b/modules/game_console/channelswindow.otui index 1612bb16..4e3b2c10 100644 --- a/modules/game_console/channelswindow.otui +++ b/modules/game_console/channelswindow.otui @@ -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 diff --git a/modules/game_console/console.lua b/modules/game_console/console.lua index 1f0fb9c8..32fce2c7 100644 --- a/modules/game_console/console.lua +++ b/modules/game_console/console.lua @@ -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)