Fixed issue #160 and an issue with entergame module.

master
BeniS 12 years ago
parent 8cdab5c814
commit 644241badb

@ -112,7 +112,7 @@ function EnterGame.firstShow()
local host = g_settings.get('host') local host = g_settings.get('host')
local autologin = g_settings.getBoolean('autologin') local autologin = g_settings.getBoolean('autologin')
if #host > 0 and #password > 0 and #account > 0 and autologin then if #host > 0 and #password > 0 and #account > 0 and autologin then
autoLogiEvent = addEvent(EnterGame.doLogin) autoLoginEvent = addEvent(EnterGame.doLogin)
end end
end end
@ -122,10 +122,14 @@ function EnterGame.terminate()
enterGame = nil enterGame = nil
enterGameButton:destroy() enterGameButton:destroy()
enterGameButton = nil enterGameButton = nil
motdWindow:destroy() if motdWindow then
motdWindow = nil motdWindow:destroy()
motdButton:destroy() motdWindow = nil
motdButton = nil end
if motdButton then
motdButton:destroy()
motdButton = nil
end
protocolBox = nil protocolBox = nil
EnterGame = nil EnterGame = nil
end end
@ -157,7 +161,7 @@ function EnterGame.clearAccountFields()
end end
function EnterGame.doLogin() function EnterGame.doLogin()
autoLogiEvent = nil autoLoginEvent = nil
G.account = enterGame:getChildById('accountNameTextEdit'):getText() G.account = enterGame:getChildById('accountNameTextEdit'):getText()
G.password = enterGame:getChildById('accountPasswordTextEdit'):getText() G.password = enterGame:getChildById('accountPasswordTextEdit'):getText()
G.host = enterGame:getChildById('serverHostTextEdit'):getText() G.host = enterGame:getChildById('serverHostTextEdit'):getText()
@ -222,8 +226,8 @@ function EnterGame.setDefaultServer(host, port, protocol)
accountTextEdit:setText('') accountTextEdit:setText('')
passwordTextEdit:setText('') passwordTextEdit:setText('')
if autoLogiEvent then if autoLoginEvent then
autoLogiEvent:cancel() autoLoginEvent:cancel()
end end
end end
end end

@ -110,6 +110,7 @@ Panel
@onClick: | @onClick: |
local consoleTabBar = self:getParent():getChildById('consoleTabBar') local consoleTabBar = self:getParent():getChildById('consoleTabBar')
consoleTabBar:getCurrentTab().tabPanel:getChildById('consoleBuffer'):destroyChildren() consoleTabBar:getCurrentTab().tabPanel:getChildById('consoleBuffer'):destroyChildren()
consoleTabBar:getCurrentTab().tabPanel:getChildById('consoleBufferHighlight'):destroyChildren()
TabButton TabButton
id: channelsButton id: channelsButton

@ -185,7 +185,7 @@ function smartWalk(defaultDir)
local rebindKey = false local rebindKey = false
local lastKey = arrowKeys[lastWalkDir] local lastKey = arrowKeys[lastWalkDir]
-- choose a new direction -- choose the new direction
if not g_keyboard.isKeyPressed(arrowKeys[defaultDir]) then if not g_keyboard.isKeyPressed(arrowKeys[defaultDir]) then
local changeDir = false local changeDir = false
for k,v in pairs(arrowKeys) do for k,v in pairs(arrowKeys) do

Loading…
Cancel
Save