new layout system, new UI state/styles system

This commit is contained in:
Eduardo Bart
2011-08-26 12:06:52 -03:00
parent d31d32bf82
commit 7359370251
57 changed files with 1097 additions and 1099 deletions

View File

@@ -0,0 +1,34 @@
MainWindow
id: charactersWindow
title: Charlist
size: 200 250
TextList
id: charactersList
anchors.fill: parent
margin.top: 30
margin.bottom: 50
margin.left: 16
margin.right: 16
Button
id: buttonOk
text: Ok
width: 64
anchors.right: next.left
anchors.bottom: parent.bottom
margin.bottom: 16
margin.right: 16
Button
id: buttonCancel
text: Cancel
width: 64
anchors.right: parent.right
anchors.bottom: parent.bottom
margin.bottom: 16
margin.right: 16
onClick: |
function(self)
self:getParent():destroy()
end

View File

@@ -1,7 +1,8 @@
MenuButton < Button
anchors.top: prev.bottom
anchors.horizontalCenter: parent.horizontalCenter
margin.top: 10
margin.bottom: 11
margin.left: 20
margin.right: 20
Panel
id: mainMenuBackground
@@ -9,6 +10,7 @@ Panel
source: /mainmenu/ui/background.png
smooth: true
anchors.fill: parent
focusable: false
RoundedPanel
id: mainMenu
@@ -17,24 +19,20 @@ Panel
anchors.bottom: parent.bottom
margin.left: 60
margin.bottom: 70
layout: verticalBox
MenuButton
text: Enter Game
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
margin.top: 18
onClick: |
local enterGameWindow = loadUI("/mainmenu/ui/entergamewindow.otui")
rootWidget:addChild(enterGameWindow)
GFX.fadeIn(enterGameWindow)
onClick: UI.loadAndDisplayLocked("/mainmenu/ui/entergamewindow.otui")
MenuButton
text: Options
onClick: rootWidget:addChild(loadUI("/mainmenu/ui/optionswindow.otui"))
onClick: UI.loadAndDisplayLocked("/mainmenu/ui/optionswindow.otui")
MenuButton
text: Info
onClick: rootWidget:addChild(loadUI("/mainmenu/ui/infowindow.otui"))
onClick: UI.loadAndDisplayLocked("/mainmenu/ui/infowindow.otui")
MenuButton
text: Exit

View File

@@ -89,7 +89,7 @@ MainWindow
onClick: displayErrorBox("Error", "Not implemented yet")
Label
text: |
text: |-
Show the most recent
Message of the Day
anchors.left: prev.right