-
Notifications
You must be signed in to change notification settings - Fork 2
UI Reference
##Widget Reference##
Here is a reference for the existing UI elements.
####<Script>
####
Load an external script file. The language is assumed to be Lua for the time being.
Attributes:
-
src
- Path to script source, relative to the ui file.
####<Widget>
####
Base element. Maintains most basic visual styles.
Attributes:
align
background_9-cell-margin
background_align
background_colour
background_image
background_padding
border_colour
border_width
colour
enabled
height
id
margin
position
rotation
scale
size
style
style_disabled
visibility
weight
width
zDepth
onCharacter
onDown
onDrag
onEnabledChanged
onFocusChanged
onHover
onHoverOver
onHoverOut
onLayoutChanged
onMove
onResize
onTap
onUp
onVisibleChanged
####<Label>
####
Inherits from <Widget>
Attributes:
text
text_align
text_colour
text_font
text_height
text_shadowDepth
####<Button>
####
Inherits from <Label>
Attributes:
button_flags
button_state
style_pressed
style_selected
onClick
####<Layout>
####
Inherits from <Widget>
Layout is an abstract widget, and may not appear in UI files!
Layout is a parent to all widgets that contain children.
Attributes:
-
layout_flags
- Layout will be resized to fit the content (child elements) neatly-
FitContentVertical
- Layout will be resized vertically to fit the content -
FitContentHorizontal
- Layout will be resized horizontally to fit the content -
FitContent
- Layout will be resized to fit the content
-
-
padding
- Maintain interior padding between the layout border and the child elements-
Numeric vector -
"left, top, right, bottom"
-
Numeric vector -
####<Frame>
####
Inherits from <Layout>
####<LinearLayout>
####
Attributes:
orientation
####<ListBox>
####
Not yet implemented...
####<TextBox>
####
Not yet implemented...
####<SelectBox>
####
Not yet implemented...
####<Prefab>
####
Inherits from <Frame>
Prefab embeds another ui .xml file.
-
prefab
- xml file to embed-
String -
"path_to_ui.xml"
-
String -