pub enum Kind {
Show 14 variants
Group,
Ribbon {
vertical: bool,
uniform: bool,
spacing: i32,
cells: Vec<i32>,
},
Border {
sprites: [Option<SpriteRef>; 9],
},
Image {
sprite: Option<SpriteRef>,
size: [i32; 2],
},
AnimatedImage {
sprites: Vec<Option<SpriteRef>>,
size: [i32; 2],
frames_per_second: i32,
frame: usize,
clock: f64,
},
Button {
states: [Option<NodeId>; 4],
content: Option<NodeId>,
colors: [u32; 4],
state: usize,
},
Text(TextData),
Label {
text: TextData,
icon: Option<SpriteRef>,
icon_size: [i32; 2],
text_alignment: u32,
orientation: u32,
min_text_width: i32,
gap: i32,
icon_color: u32,
},
Viewport,
List(ListData),
Lines {
sprite: Option<SpriteRef>,
size: [i32; 2],
lines: Vec<[i32; 4]>,
},
Picture {
texture: u32,
size: [i32; 2],
},
Control(Control),
Unsupported(&'static str),
}Expand description
What an element is, with the state of its class.
Variants§
Group
A group: its children are laid out on top of each other, each by its alignment.
Ribbon
A ribbon: its children in a row or a column.
Fields
Border
A frame drawn from nine sprites: four corners, four edges and the centre.
Image
One sprite.
AnimatedImage
A sequence of sprites played as an animation (for example the loading screen).
Fields
Button
A button: one child element for each state, and its content.
Fields
Text(TextData)
Text.
Label
Text with an optional icon.
Fields
Viewport
Reserves space the application draws into (3D view, previews).
List(ListData)
Scrolling list of text rows (tool widget, styled with game assets).
Lines
Line segments in element pixels, drawn with the sprite in the element colour and clipped
to the element (the game’s FrustumOutlineElement, SpriteContext::AddLine).
Fields
Picture
Application texture drawn letterboxed inside the element.
Fields
texture: u32The application’s texture number (Texture::External).
Control(Control)
A control with state: a check box, a slider, an edit box, a combo box and others.
Unsupported(&'static str)
An element class that is not implemented, by name. It is laid out but not drawn.