Created
August 2, 2012 21:14
-
-
Save x3ro/3240690 to your computer and use it in GitHub Desktop.
Terasology themeable UI brainstorming
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
{ | |
"id": "main-menu", | |
"class": "UIWindow", | |
"children": [ | |
{ | |
"id" : "main-window", | |
"class" : "UIWindow", | |
"image" : "engine:bg.png", | |
}, | |
{ | |
"id" : "some-button", | |
"class" : "UIButton", | |
"parameters" : { | |
"onclick": "methodeName", # the function to call | |
"onhover" : "otherMethod", | |
"position-type" : "absolute", //absolute to whole screen / relative to parent widget | |
// x3ro: Not sure if we need this. Couldn't we just | |
// always be relative to the parent and put absolute | |
// stuff in the "root"? | |
"position" : ["50%", "50%"], //pixel position by percentage of the current screen or just by pixels | |
"vertical-align": "center", //left / center / right - if this is used the position attribute should be added from this location | |
"horizontal-align" : "center", //top / center / bottom - same here | |
"image" : "engine:someimage.png", //image to load | |
"image-normal" : [0, 0, 100, 30], //x y width hight in someimage.png | |
"image-hover" : [0, 30, 100, 30], | |
"image-pressed" : [0, 60, 100, 30] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment