first script stuff (still ugly and under experiments)

This commit is contained in:
Eduardo Bart
2011-04-18 23:10:08 -03:00
parent 3de455fe7e
commit bb05338190
11 changed files with 77 additions and 5 deletions

0
data/lib/init.lua Normal file
View File

22
data/menustate.lua Normal file
View File

@@ -0,0 +1,22 @@
MainMenuController = {}
enterGameController = {}
function enterGameController.enterGameButton_clicked()
createEnterGameWindow()
end
function mainMenuController.createMainMenu()
mainMenuPanel = loadUI("ui/mainMenuPanel.yml")
enterGameButton = mainMenuPanel:getElementById("enterGameButton")
enterGameButton.setOnClick(enterGameController.enterGameButton_clicked)
exitButton = mainMenuPanel:getElementById("exitButton")
exitButton:setOnClick(function() exitGame() end)
end
function onEnter()
mainMenuController:createMainMenu()
end
function onLeave()
end

View File

@@ -0,0 +1 @@
require("modules/mainmenu/mainmenu")

View File

@@ -0,0 +1 @@
loadUI("modules/mainmenu/mainmenu.yml")

View File

@@ -0,0 +1,37 @@
panel#mainMenu:
skin: roundedGridPanel
size: [117, 171]
anchors.left: parent.left
anchors.bottom: parent.bottom
margin.left: 60
margin.bottom: 70
button#enterGameButton:
text: Enter Game
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
margin.top: 16
button#accessAccountButton:
text: Access Account
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
margin.top: 46
button#optionsButton:
text: Options
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
margin.top: 76
button#infoButton:
text: Info
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
margin.top: 106
button#exitGameButton:
text: Exit
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
margin.top: 136