too many changes to list, many regressions were made, master will be UNSTABLE for a few days

This commit is contained in:
Eduardo Bart
2011-12-03 19:41:37 -02:00
parent 19eb56997d
commit f548825faf
80 changed files with 1881 additions and 1843 deletions

View File

@@ -6,7 +6,7 @@ local loadBox
local characterList
-- private functions
local function onCharactersWindowKeyPress(self, keyCode, keyChar, keyboardModifiers)
local function onCharactersWindowKeyPress(self, keyCode, keyText, keyboardModifiers)
if keyboardModifiers == KeyboardNoModifier then
if keyCode == KeyUp or keyCode == KeyTab then
characterList:focusPreviousChild(ActiveFocusReason)
@@ -47,7 +47,7 @@ local function tryLogin(charInfo, tries)
end
-- save last used character
ConfigManager.set('lastUsedCharacter', charInfo.characterName)
g_configs.set('lastUsedCharacter', charInfo.characterName)
end
-- public functions
@@ -75,7 +75,7 @@ function CharacterList.create(characters, premDays)
label.worldHost = worldHost
label.worldPort = worldIp
if i == 1 or ConfigManager.get('lastUsedCharacter') == characterName then
if i == 1 or g_configs.get('lastUsedCharacter') == characterName then
characterList:focusChild(label, ActiveFocusReason)
end
end

View File

@@ -11,8 +11,8 @@ local function clearAccountFields()
enterGame:getChildById('accountNameLineEdit'):clearText()
enterGame:getChildById('accountPasswordLineEdit'):clearText()
enterGame:getChildById('accountNameLineEdit'):focus()
ConfigManager.set('account', nil)
ConfigManager.set('password', nil)
g_configs.set('account', nil)
g_configs.set('password', nil)
end
local function onError(protocol, error)
@@ -30,9 +30,9 @@ end
local function onCharacterList(protocol, characters, premDays)
if enterGame:getChildById('rememberPasswordBox'):isChecked() then
ConfigManager.set('account', EnterGame.account)
ConfigManager.set('password', EnterGame.password)
ConfigManager.set('autologin', tostring(enterGame:getChildById('autoLoginBox'):isChecked()))
g_configs.set('account', EnterGame.account)
g_configs.set('password', EnterGame.password)
g_configs.set('autologin', tostring(enterGame:getChildById('autoLoginBox'):isChecked()))
else
clearAccountFields()
end
@@ -40,9 +40,9 @@ local function onCharacterList(protocol, characters, premDays)
loadBox:destroy()
CharacterList.create(characters, premDays)
local lastMotdNumber = tonumber(ConfigManager.get("motd"))
local lastMotdNumber = tonumber(g_configs.get("motd"))
if motdNumber and motdNumber ~= lastMotdNumber then
ConfigManager.set("motd", motdNumber)
g_configs.set("motd", motdNumber)
local motdBox = displayInfoBox("Message of the day", motdMessage)
motdBox.onOk = CharacterList.show
CharacterList.hide()
@@ -53,11 +53,11 @@ end
function EnterGame.create()
enterGame = UI.display('entergame.otui')
local account = ConfigManager.get('account')
local password = ConfigManager.get('password')
local host = ConfigManager.get('host')
local port = tonumber(ConfigManager.get('port'))
local autologin = toboolean(ConfigManager.get('autologin'))
local account = g_configs.get('account')
local password = g_configs.get('password')
local host = g_configs.get('host')
local port = tonumber(g_configs.get('port'))
local autologin = toboolean(g_configs.get('autologin'))
enterGame:getChildById('accountNameLineEdit'):setText(account)
enterGame:getChildById('accountPasswordLineEdit'):setText(password)
@@ -93,8 +93,8 @@ function EnterGame.doLogin()
EnterGame.port = enterGame:getChildById('serverPortLineEdit'):getText()
EnterGame.hide()
ConfigManager.set('host', EnterGame.host)
ConfigManager.set('port', EnterGame.port)
g_configs.set('host', EnterGame.host)
g_configs.set('port', EnterGame.port)
local protocolLogin = ProtocolLogin.create()
protocolLogin.onError = onError