mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
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:
@@ -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()
|
||||
|
@@ -26,4 +26,3 @@ LogoutWindow < MainWindow
|
||||
anchors.left: prev.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin-left: 5
|
||||
@onClick: self:getParent():destroy()
|
||||
|
Reference in New Issue
Block a user