Save console messages #263, change settings names
This commit is contained in:
parent
5fc1ac8051
commit
07dd78002b
|
@ -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()
|
||||
|
|
|
@ -138,7 +138,7 @@ end
|
|||
function load(forceDefaults)
|
||||
hotkeysManagerLoaded = false
|
||||
|
||||
local hotkeySettings = g_settings.getNode('hotkeys')
|
||||
local hotkeySettings = g_settings.getNode('game_hotkeys')
|
||||
local hotkeys = {}
|
||||
|
||||
if not table.empty(hotkeySettings) then hotkeys = hotkeySettings end
|
||||
|
@ -183,7 +183,7 @@ function reload()
|
|||
end
|
||||
|
||||
function save()
|
||||
local hotkeySettings = g_settings.getNode('hotkeys') or {}
|
||||
local hotkeySettings = g_settings.getNode('game_hotkeys') or {}
|
||||
local hotkeys = hotkeySettings
|
||||
|
||||
if perServer then
|
||||
|
|
|
@ -182,11 +182,11 @@ end
|
|||
function save()
|
||||
local settings = {}
|
||||
settings.splitterMarginBottom = bottomSplitter:getMarginBottom()
|
||||
g_settings.setNode('GameInterface', settings)
|
||||
g_settings.setNode('game_interface', settings)
|
||||
end
|
||||
|
||||
function load()
|
||||
local settings = g_settings.getNode('GameInterface')
|
||||
local settings = g_settings.getNode('game_interface')
|
||||
if settings then
|
||||
if settings.splitterMarginBottom then
|
||||
bottomSplitter:setMarginBottom(settings.splitterMarginBottom)
|
||||
|
|
Loading…
Reference in New Issue