mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
reorganize modules
This commit is contained in:
@@ -20,7 +20,7 @@ local function createMainInterface()
|
||||
Game.gameUi = loadUI('/game/ui/gameinterface.otui', UI.root)
|
||||
Game.gameMapUi = Game.gameUi:getChildById('gameMap')
|
||||
Game.gameUi.onKeyPress = onGameKeyPress
|
||||
|
||||
|
||||
createTextInterface()
|
||||
createVipWindow()
|
||||
end
|
||||
@@ -35,7 +35,7 @@ end
|
||||
|
||||
-- public functions
|
||||
function Game.onLogin()
|
||||
MainMenu.hide()
|
||||
Background.hide()
|
||||
CharacterList.destroyLoadBox()
|
||||
createMainInterface()
|
||||
end
|
||||
@@ -53,7 +53,7 @@ function Game.onConnectionError(message)
|
||||
end
|
||||
|
||||
function Game.onLogout()
|
||||
MainMenu.show()
|
||||
Background.show()
|
||||
CharacterList.show()
|
||||
destroyMainInterface()
|
||||
end
|
||||
|
@@ -8,10 +8,10 @@ Module
|
||||
dependencies:
|
||||
- core
|
||||
- tibiafiles
|
||||
- topmenu
|
||||
- entergame
|
||||
- background
|
||||
|
||||
onLoad: |
|
||||
require 'game'
|
||||
return true
|
||||
|
||||
onUnload: |
|
||||
-- nothing yet
|
||||
|
@@ -1,14 +1,10 @@
|
||||
UIWidget
|
||||
id: gameRootInterface
|
||||
anchors.fill: parent
|
||||
anchors.top: topMenu.bottom
|
||||
margin.top: 1
|
||||
|
||||
UIMap
|
||||
id: gameMap
|
||||
anchors.fill:parent
|
||||
margin.right: 200
|
||||
|
||||
Button
|
||||
anchors.left: gameMap.right
|
||||
anchors.top: parent.top
|
||||
text: Logout
|
||||
onClick: Game.logout(false)
|
||||
margin.right: 200
|
Reference in New Issue
Block a user