First of all you need to know the screen size, by using the system/view/screen-face/size variable:
>> system/view/screen-face/size
== 1280x1024
and the center-face function:
>> myapp: layout/size [ button "Close" [unview] ] system/view/screen-face/size
>> center-face myapp
>> view myapp
Here the result:
You can do more, you can center also the button:
>> myapp: layout/size [ a: button "Close" [unview] ] system/view/screen-face/size
>> center-face a
>> center-face myapp
>> view myapp
Here the result:
Ok, this was just a super simple small example. Why don't you add a background image? Some funny color or gradient?
Post your ideas in the comments below! I'll post yor result in the next posts. :-)
No comments:
Post a Comment