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)