Skip to main content

LuaGuiElementAddParams

Struct LuaGuiElementAddParams 

Source
pub struct LuaGuiElementAddParams {
Show 15 fields pub anchor: GuiAnchor, pub caption: String, pub elem_tooltip: ElemID, pub enabled: bool, pub game_controller_interaction: String, pub ignored_by_interaction: bool, pub index: u32, pub locked: bool, pub name: String, pub raise_hover_events: bool, pub style: String, pub tags: LuaAny, pub tooltip: String, pub type: GuiElementType, pub visible: bool,
}
Expand description

Add a new child element to this GuiElement.

Fields§

§anchor: GuiAnchor

Where to position the child element when in the relative element.

§caption: String

Text displayed on the child element. For frames, this is their title. For other elements, like buttons or labels, this is the content. Whilst this attribute may be used on all elements, it doesn’t make sense for tables and flows as they won’t display it.

§elem_tooltip: ElemID

Elem tooltip of the child element. Will be displayed above tooltip.

§enabled: bool

Whether the child element is enabled. Defaults to true.

§game_controller_interaction: String

How the element should interact with game controllers. Defaults to defines.game_controller_interaction.normal.

§ignored_by_interaction: bool

Whether the child element is ignored by interaction. Defaults to false.

§index: u32

Location in its parent that the child element should slot into. By default, the child will be appended onto the end.

§locked: bool

Whether the child element is locked. Defaults to false.

§name: String

Name of the child element. It must be unique within the parent element.

§raise_hover_events: bool

Whether this element will raise on_gui_hover and on_gui_leave. Defaults to false.

§style: String

The name of the style prototype to apply to the new element.

§tags: LuaAny

Tags associated with the child element.

§tooltip: String

Tooltip of the child element.

§type: GuiElementType

The kind of element to add, which potentially has its own attributes as listed below.

§visible: bool

Whether the child element is visible. Defaults to true.

Trait Implementations§

Source§

impl Clone for LuaGuiElementAddParams

Source§

fn clone(&self) -> LuaGuiElementAddParams

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 LuaGuiElementAddParams

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for LuaGuiElementAddParams

Source§

fn default() -> LuaGuiElementAddParams

Returns the “default value” for a type. 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.