reorganize modules

This commit is contained in:
Eduardo Bart
2011-11-02 01:02:56 -02:00
parent 2304ff3529
commit 5ab0e6f2ac
59 changed files with 147 additions and 208 deletions

View File

@@ -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

View File

@@ -8,10 +8,10 @@ Module
dependencies:
- core
- tibiafiles
- topmenu
- entergame
- background
onLoad: |
require 'game'
return true
onUnload: |
-- nothing yet

View File

@@ -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