This commit is contained in:
Eduardo Bart 2012-09-05 16:53:48 -03:00
parent 6f2255071c
commit c2bbff5113
1 changed files with 8 additions and 3 deletions

View File

@ -15,7 +15,8 @@ function init()
g_ui.importStyle('styles/countwindow.otui') g_ui.importStyle('styles/countwindow.otui')
connect(g_game, { onGameStart = show, connect(g_game, { onGameStart = show,
onGameEnd = hide }, true) onGameEnd = hide,
onLoginAdvice = onLoginAdvice }, true)
gameRootPanel = g_ui.displayUI('gameinterface.otui') gameRootPanel = g_ui.displayUI('gameinterface.otui')
gameRootPanel:hide() gameRootPanel:hide()
@ -73,7 +74,8 @@ end
function terminate() function terminate()
disconnect(g_game, { onGameStart = show, disconnect(g_game, { onGameStart = show,
onGameEnd = hide }) onGameEnd = hide,
onLoginAdvice = onLoginAdvice })
disconnect(gameLeftPanel, { onVisibilityChange = onLeftPanelVisibilityChange }) disconnect(gameLeftPanel, { onVisibilityChange = onLeftPanelVisibilityChange })
logoutButton:destroy() logoutButton:destroy()
@ -108,6 +110,10 @@ function hide()
Background.show() Background.show()
end end
function onLoginAdvice(message)
displayInfoBox("For Your Information", message)
end
function forceExit() function forceExit()
scheduleEvent(exit, 10) scheduleEvent(exit, 10)
return true return true
@ -538,4 +544,3 @@ function onLeftPanelVisibilityChange(leftPanel, visible)
end end
end end
end end