pub struct Node {Show 21 fields
pub name: String,
pub reference: String,
pub border: Option<NodeId>,
pub shortcut: Option<u32>,
pub margins: [i32; 4],
pub min_size: [i32; 2],
pub alignment: u32,
pub flags: u32,
pub color: u32,
pub kind: Kind,
pub children: Vec<NodeId>,
pub tooltip: String,
pub tooltip_dialog: Option<String>,
pub string_table: Option<String>,
pub hotkey: Option<String>,
pub title_desc: Option<(String, String)>,
pub enabled: bool,
pub cursor: i32,
pub rotation: f32,
pub size: [i32; 2],
pub rect: [i32; 4],
/* private fields */
}Expand description
One element of the interface tree.
Fields§
§name: StringThe element’s name in its resource, for example buttonNew. The game finds elements by
it.
reference: StringThe reference of the resource the element was made from.
border: Option<NodeId>The element’s border, drawn behind it.
shortcut: Option<u32>The key that clicks the element.
margins: [i32; 4]The margins: left, right, top, bottom.
min_size: [i32; 2]The smallest size, in pixels.
alignment: u32How the element sits in the space it is given (flags has the bits).
flags: u32The element’s flags (flags).
color: u32The colour that multiplies the element, 0xAARRGGBB.
kind: KindWhat the element is.
children: Vec<NodeId>The children, in drawing order.
tooltip: StringThe tooltip text.
tooltip_dialog: Option<String>The dialog shown as the tooltip, if the tooltip is a dialog.
string_table: Option<String>Element: the string table the element’s own strings come from.
hotkey: Option<String>Name of the element’s key binding (Element resolved through keyNames), for
HotKeyToolTipUI.
title_desc: Option<(String, String)>Title and description user data, for TitleDescToolTipUI.
enabled: boolWhether the element takes input.
cursor: i32Element: the mouse cursor index over it (Element::GetMouseCursorIndex).
rotation: f32An image’s rotation in degrees (ImageElement::SetRotation).
size: [i32; 2]Content size from the last size pass.
rect: [i32; 4]Layout rectangle: left, top, right, bottom.