Changed/Fixed Text Windows, Text Message, Hotkeys Manager, Game Interface and Quest Log

* Renamed game_textbooks to game_textwindow.
* Fixed text window from opening multiple times, and is destroyed correctly.
* Added new game_playerdeath module (moved death message and window here).
* Hotkey window will hide on game end.
* Logout/Exit/Stackable Items/Questlog/Hotkeys windows will now close on game end.
This commit is contained in:
BeniS
2012-07-14 22:59:32 +12:00
parent e3298d561c
commit 694a69e1bf
12 changed files with 163 additions and 65 deletions

View File

@@ -27,8 +27,8 @@ function GameInterface.init()
g_ui.importStyle('styles/logoutwindow.otui')
g_ui.importStyle('styles/exitwindow.otui')
connect(g_game, { onGameStart = GameInterface.show }, true)
connect(g_game, { onGameEnd = GameInterface.hide }, true)
connect(g_game, { onGameStart = GameInterface.show,
onGameEnd = GameInterface.hide }, true)
gameRootPanel = g_ui.displayUI('gameinterface.otui')
gameRootPanel:hide()
@@ -88,8 +88,8 @@ function GameInterface.init()
end
function GameInterface.terminate()
disconnect(g_game, { onGameStart = GameInterface.show })
disconnect(g_game, { onGameEnd = GameInterface.hide })
disconnect(g_game, { onGameStart = GameInterface.show,
onGameEnd = GameInterface.hide })
disconnect(gameLeftPanel, { onVisibilityChange = onLeftPanelVisibilityChange })
logoutButton:destroy()
@@ -117,6 +117,18 @@ function GameInterface.show()
end
function GameInterface.hide()
if(logoutWindow) then
logoutWindow:destroy()
logoutWindow = nil
end
if(exitWindow) then
exitWindow:destroy()
exitWindow = nil
end
if(countWindow) then
countWindow:destroy()
countWindow = nil
end
gameRootPanel:hide()
logoutButton:hide()
Background.show()

View File

@@ -26,4 +26,3 @@ LogoutWindow < MainWindow
anchors.left: prev.right
anchors.bottom: parent.bottom
margin-left: 5
@onClick: self:getParent():destroy()