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+E', removeCurrentTab)
|
||||||
g_keyboard.bindKeyDown('Ctrl+H', openHelp)
|
g_keyboard.bindKeyDown('Ctrl+H', openHelp)
|
||||||
|
|
||||||
-- Ignore List
|
load()
|
||||||
loadIgnoreSettings()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function terminate()
|
function terminate()
|
||||||
|
save()
|
||||||
disconnect(g_game, { onTalk = onTalk,
|
disconnect(g_game, { onTalk = onTalk,
|
||||||
onChannelList = onChannelList,
|
onChannelList = onChannelList,
|
||||||
onOpenChannel = onOpenChannel,
|
onOpenChannel = onOpenChannel,
|
||||||
|
@ -181,6 +181,20 @@ function terminate()
|
||||||
Console = nil
|
Console = nil
|
||||||
end
|
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)
|
function onTabChange(tabBar, tab)
|
||||||
if tab == defaultTab or tab == serverTab then
|
if tab == defaultTab or tab == serverTab then
|
||||||
consolePanel:getChildById('closeChannelButton'):disable()
|
consolePanel:getChildById('closeChannelButton'):disable()
|
||||||
|
|
|
@ -138,7 +138,7 @@ end
|
||||||
function load(forceDefaults)
|
function load(forceDefaults)
|
||||||
hotkeysManagerLoaded = false
|
hotkeysManagerLoaded = false
|
||||||
|
|
||||||
local hotkeySettings = g_settings.getNode('hotkeys')
|
local hotkeySettings = g_settings.getNode('game_hotkeys')
|
||||||
local hotkeys = {}
|
local hotkeys = {}
|
||||||
|
|
||||||
if not table.empty(hotkeySettings) then hotkeys = hotkeySettings end
|
if not table.empty(hotkeySettings) then hotkeys = hotkeySettings end
|
||||||
|
@ -183,7 +183,7 @@ function reload()
|
||||||
end
|
end
|
||||||
|
|
||||||
function save()
|
function save()
|
||||||
local hotkeySettings = g_settings.getNode('hotkeys') or {}
|
local hotkeySettings = g_settings.getNode('game_hotkeys') or {}
|
||||||
local hotkeys = hotkeySettings
|
local hotkeys = hotkeySettings
|
||||||
|
|
||||||
if perServer then
|
if perServer then
|
||||||
|
|
|
@ -182,11 +182,11 @@ end
|
||||||
function save()
|
function save()
|
||||||
local settings = {}
|
local settings = {}
|
||||||
settings.splitterMarginBottom = bottomSplitter:getMarginBottom()
|
settings.splitterMarginBottom = bottomSplitter:getMarginBottom()
|
||||||
g_settings.setNode('GameInterface', settings)
|
g_settings.setNode('game_interface', settings)
|
||||||
end
|
end
|
||||||
|
|
||||||
function load()
|
function load()
|
||||||
local settings = g_settings.getNode('GameInterface')
|
local settings = g_settings.getNode('game_interface')
|
||||||
if settings then
|
if settings then
|
||||||
if settings.splitterMarginBottom then
|
if settings.splitterMarginBottom then
|
||||||
bottomSplitter:setMarginBottom(settings.splitterMarginBottom)
|
bottomSplitter:setMarginBottom(settings.splitterMarginBottom)
|
||||||
|
|
Loading…
Reference in New Issue