Created
May 25, 2012 09:22
-
-
Save mrwonko/2786928 to your computer and use it in GitHub Desktop.
Draft of my UI definitions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- main menu layout: | |
-- title on top, buttons below | |
local margin = width * 0.05 | |
local titleHeight = 100 | |
local menuWidth = 400 | |
Layout | |
{ | |
name = "main", | |
-- title | |
VerticalLayout -- vertical layout means the items in here will be put below one another | |
{ | |
name = "title", | |
position = { margin, margin }, | |
size = { width - 2 * margin, titleHeight }, | |
-- style "class" could go here (e.g.: border, bg color, bg image) - I'm postponing styles though, KISS. | |
}, | |
-- main menu buttons | |
VerticalLayout | |
{ | |
name = "mainmenu", | |
position = { width / 2 - menuWidth / 2, titleHeight + 2 * margin }, | |
size = { menuWidth, height - 3 * margin - titleHeight }, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment