Skip to main content

ElementKind

Enum ElementKind 

Source
pub enum ElementKind {
Show 28 variants Group { children: Vec<Option<String>>, }, Page { children: Vec<Option<String>>, page: i32, }, Radio { children: Vec<Option<String>>, selected: i32, }, Ribbon { vertical: bool, uniform: bool, spacing: i32, children: Vec<Option<String>>, }, Border { sprite_sheet: Option<String>, sprites: [String; 9], }, Image { sprite_sheet: Option<String>, sprite: String, size: [i32; 2], }, FrustumOutline { sprite_sheet: Option<String>, sprite: String, size: [i32; 2], }, AnimatedImage { sprite_sheet: Option<String>, sprite: String, size: [i32; 2], frames: Vec<String>, rate: i32, }, Button(Button), Check { button: Button, check: Option<String>, }, Combo { button: Button, refs: [Option<String>; 3], }, Text(Text), Label(Label), ClipRegion { unknown: [i32; 2], content: Option<String>, }, Container { unknown: [i32; 3], refs: [Option<String>; 3], unknown_bools: [bool; 2], }, Edit { font: Option<String>, text: String, max_length: i32, unknown_bool: bool, unknown_string: String, }, Graph { unknown: [i32; 3], unknown_u32: u32, sprite_sheet: Option<String>, sprite: String, }, Layout { items: Vec<LayoutItem>, }, List { refs: [Option<String>; 2], sprite_sheet: Option<String>, sprite: String, unknown: [u32; 2], }, NumberEdit { font: Option<String>, unknown: [i32; 4], unknown_bool: bool, }, Number { font: Option<String>, color: u32, unknown_int: i32, unknown_float: f32, unknown_bool: bool, }, Slider { track: Option<String>, sprite_sheet: Option<String>, sprites: [String; 5], unknown: [i32; 2], range: [f32; 2], unknown_b0: i32, }, Spinner { refs: [Option<String>; 3], unknown: i32, }, Tab { refs: [Option<String>; 3], sprite_sheet: Option<String>, sprites: [String; 3], unknown: i32, tabs: Vec<(Option<String>, Option<String>)>, }, Progress { color: u32, sprite_sheet: Option<String>, sprites: [String; 6], unknown_ref: Option<String>, }, Scroll { sprite_sheet: Option<String>, sprites: [String; 9], vertical: bool, unknown: i32, unknown_u32: [u32; 2], }, Table { unknown: [i32; 3], cells: Vec<TableCell>, }, DocumentText(DocumentText),
}
Expand description

What an element description is, with the fields of its class.

Variants§

§

Group

Children laid out on top of each other, each by its alignment.

Fields

§children: Vec<Option<String>>

The children.

§

Page

Pages, of which one is shown.

Fields

§children: Vec<Option<String>>

The pages.

§page: i32

The page shown at first.

§

Radio

Radio buttons, of which one is selected.

Fields

§children: Vec<Option<String>>

The buttons.

§selected: i32

The button selected at first.

§

Ribbon

Children in a row or a column.

Fields

§vertical: bool

A column when true, a row when false.

§uniform: bool

Whether every cell has the size of the largest child.

§spacing: i32

The space between the cells, in pixels.

§children: Vec<Option<String>>

The children.

§

Border

A frame drawn from nine sprites.

Fields

§sprite_sheet: Option<String>

The sprite sheet.

§sprites: [String; 9]

The nine sprites, row by row: corners, edges and centre.

§

Image

One sprite.

Fields

§sprite_sheet: Option<String>

The sprite sheet.

§sprite: String

The sprite name.

§size: [i32; 2]

The size, in pixels.

§

FrustumOutline

The game’s FrustumOutlineDescription (MapUI’s camera outline): an image block whose element draws lines instead of the sprite.

Original: FUN_14006c7f0.

Fields

§sprite_sheet: Option<String>

The sprite sheet.

§sprite: String

The sprite the lines are drawn with.

§size: [i32; 2]

The size, in pixels.

§

AnimatedImage

A sequence of sprites played as an animation.

Fields

§sprite_sheet: Option<String>

The sprite sheet.

§sprite: String

The first frame’s sprite.

§size: [i32; 2]

The size, in pixels.

§frames: Vec<String>

The frames’ sprite names.

§rate: i32

The frame rate.

§

Button(Button)

A button.

§

Check

A check box.

Fields

§button: Button

The box.

§check: Option<String>

The tick, shown when checked.

§

Combo

A combo box: a button that opens a list.

Fields

§button: Button

The button that shows the choice.

§refs: [Option<String>; 3]

The list’s parts: the second is the text whose font the list uses, the third the choices.

§

Text(Text)

Text.

§

Label(Label)

Text with an optional icon.

§

ClipRegion

A window onto its content, cut at its edges.

Fields

§unknown: [i32; 2]

The window’s size, in pixels.

§content: Option<String>

The content.

§

Container

A scrolling area.

Fields

§unknown: [i32; 3]

The size (two values) and the space between the content and the bars.

§refs: [Option<String>; 3]

The horizontal bar, the vertical bar and the content.

§unknown_bools: [bool; 2]

Not identified yet.

§

Edit

An edit box.

Fields

§font: Option<String>

The font.

§text: String

The text at first.

§max_length: i32

The most characters it takes (0: no limit).

§unknown_bool: bool

Whether the text is drawn as *s (a password).

§unknown_string: String

The characters it takes, any when empty.

§

Graph

A graph of values over time.

Fields

§unknown: [i32; 3]

The size (two values) and the length of the ticks.

§unknown_u32: u32

Not identified yet.

§sprite_sheet: Option<String>

The sprite sheet of the lines.

§sprite: String

The sprite the lines are drawn with.

§

Layout

Children placed by anchors relative to the element.

Fields

§items: Vec<LayoutItem>

The children and their anchors.

§

List

A list of rows.

Fields

§refs: [Option<String>; 2]

The list’s parts: the first is the text whose font the rows use.

§sprite_sheet: Option<String>

The sprite sheet of the highlight.

§sprite: String

The highlight’s sprite.

§unknown: [u32; 2]

Not identified yet.

§

NumberEdit

An edit box for a number.

Fields

§font: Option<String>

The font.

§unknown: [i32; 4]

The value at first, the smallest and largest value, and the most digits.

§unknown_bool: bool

Whether the number may be below zero.

§

Number

A number shown as text.

Fields

§font: Option<String>

The font.

§color: u32

The colour, 0xAARRGGBB.

§unknown_int: i32

Not identified yet.

§unknown_float: f32

The value at first.

§unknown_bool: bool

Not identified yet.

§

Slider

A slider.

Fields

§track: Option<String>

The number shown next to the slider.

§sprite_sheet: Option<String>

The sprite sheet.

§sprites: [String; 5]

The sprites: the track’s ends and middle, the knob, and the knob under the pointer.

§unknown: [i32; 2]

The track’s vertical position and the inset of the knob’s travel.

§range: [f32; 2]

The smallest and the largest value.

§unknown_b0: i32

The steps across the range: a click on the track moves the value one step.

§

Spinner

A number with up and down arrows.

Fields

§refs: [Option<String>; 3]

The number and the two arrows.

§unknown: i32

How much an arrow changes the number.

§

Tab

Tabs: a header for each tab, and the page of the selected one.

Fields

§refs: [Option<String>; 3]

The elements drawn around the tabs.

§sprite_sheet: Option<String>

The sprite sheet.

§sprites: [String; 3]

The sprites of the tab headers.

§unknown: i32

The space between the headers, in pixels.

§tabs: Vec<(Option<String>, Option<String>)>

Each tab: its header and its page.

§

Progress

A progress bar.

Fields

§color: u32

The background’s colour, 0xAARRGGBB.

§sprite_sheet: Option<String>

The sprite sheet.

§sprites: [String; 6]

The sprites of the fill and the background.

§unknown_ref: Option<String>

The element drawn on top (usually a label).

§

Scroll

A scroll bar.

Fields

§sprite_sheet: Option<String>

The sprite sheet.

§sprites: [String; 9]

The sprites of the track, the thumb and the arrows.

§vertical: bool

A vertical bar when true.

§unknown: i32

The thumb’s inset at both ends of the track.

§unknown_u32: [u32; 2]

The thumb’s colour, and a value not identified yet.

§

Table

A table of cells in rows and columns.

Fields

§unknown: [i32; 3]

The number of columns, the number of rows, and the space between the cells.

§cells: Vec<TableCell>

The cells.

§

DocumentText(DocumentText)

A document with markup (the help pages and the tutorials).

Trait Implementations§

Source§

impl Clone for ElementKind

Source§

fn clone(&self) -> ElementKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ElementKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.