mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
Save console messages #263, change settings names
This commit is contained in:
@@ -137,11 +137,11 @@ function init()
|
||||
g_keyboard.bindKeyDown('Ctrl+E', removeCurrentTab)
|
||||
g_keyboard.bindKeyDown('Ctrl+H', openHelp)
|
||||
|
||||
-- Ignore List
|
||||
loadIgnoreSettings()
|
||||
load()
|
||||
end
|
||||
|
||||
function terminate()
|
||||
save()
|
||||
disconnect(g_game, { onTalk = onTalk,
|
||||
onChannelList = onChannelList,
|
||||
onOpenChannel = onOpenChannel,
|
||||
@@ -181,6 +181,20 @@ function terminate()
|
||||
Console = nil
|
||||
end
|
||||
|
||||
function save()
|
||||
local settings = {}
|
||||
settings.messageHistory = messageHistory
|
||||
g_settings.setNode('game_console', settings)
|
||||
end
|
||||
|
||||
function load()
|
||||
local settings = g_settings.getNode('game_console')
|
||||
if settings then
|
||||
messageHistory = settings.messageHistory or {}
|
||||
end
|
||||
loadIgnoreSettings()
|
||||
end
|
||||
|
||||
function onTabChange(tabBar, tab)
|
||||
if tab == defaultTab or tab == serverTab then
|
||||
consolePanel:getChildById('closeChannelButton'):disable()
|
||||
|
Reference in New Issue
Block a user