[][src]Struct oxygengine_composite_renderer::component::CompositeUiElement

pub struct CompositeUiElement {
    pub id: Option<Cow<'static, str>>,
    pub theme: Option<Cow<'static, str>>,
    pub camera_name: Cow<'static, str>,
    pub interactive: Option<Cow<'static, str>>,
    pub element_type: UiElementType,
    pub margin: UiMargin,
    pub padding: UiMargin,
    pub left_anchor: UiValue,
    pub right_anchor: UiValue,
    pub top_anchor: UiValue,
    pub bottom_anchor: UiValue,
    pub alignment: UiValueVec2,
    pub offset: UiValueVec2,
    pub fixed_width: Option<UiValue>,
    pub fixed_height: Option<UiValue>,
    pub scale: Vec2,
    pub alpha: UiValue,
    pub hidden: bool,
    pub children: Vec<CompositeUiElement>,
    pub state: HashMap<Cow<'static, str>, Scalar>,
    // some fields omitted
}

Fields

id: Option<Cow<'static, str>>theme: Option<Cow<'static, str>>camera_name: Cow<'static, str>interactive: Option<Cow<'static, str>>element_type: UiElementTypemargin: UiMarginpadding: UiMarginleft_anchor: UiValueright_anchor: UiValuetop_anchor: UiValuebottom_anchor: UiValuealignment: UiValueVec2offset: UiValueVec2fixed_width: Option<UiValue>fixed_height: Option<UiValue>scale: Vec2alpha: UiValuehidden: boolchildren: Vec<CompositeUiElement>state: HashMap<Cow<'static, str>, Scalar>

Implementations

impl CompositeUiElement[src]

pub fn rebuild(&mut self)[src]

pub fn find(&self, id: &str) -> Option<&CompositeUiElement>[src]

pub fn find_mut(&mut self, id: &str) -> Option<&mut CompositeUiElement>[src]

pub fn calculate_rect(
    &self,
    parent_rect: Rect,
    themes: &CompositeUiThemes,
    states: &[&HashMap<Cow<'static, str>, Scalar>]
) -> Rect
[src]

pub fn calculate_value(
    &self,
    state: &UiValue,
    states: &[&HashMap<Cow<'static, str>, Scalar>]
) -> Scalar
[src]

pub fn calculate_value_vec2(
    &self,
    state: &UiValueVec2,
    states: &[&HashMap<Cow<'static, str>, Scalar>]
) -> Vec2
[src]

pub fn build_rects_tree<'a>(
    &'a self,
    parent_rect: Rect,
    themes: &CompositeUiThemes,
    states: &mut Vec<&'a HashMap<Cow<'static, str>, Scalar>>
) -> Option<UiRectsTree>
[src]

pub fn build_commands<'a>(
    &'a self,
    parent_rect: Rect,
    interactibles: &mut CompositeUiInteractibles,
    themes: &CompositeUiThemes,
    states: &mut Vec<&'a HashMap<Cow<'static, str>, Scalar>>
) -> (Vec<Command<'static>>, Rect)
[src]

Trait Implementations

impl Clone for CompositeUiElement[src]

impl Component for CompositeUiElement[src]

type Storage = VecStorage<Self>

Associated storage type for this component.

impl Debug for CompositeUiElement[src]

impl Default for CompositeUiElement[src]

impl<'de> Deserialize<'de> for CompositeUiElement[src]

impl Prefab for CompositeUiElement[src]

impl PrefabComponent for CompositeUiElement[src]

impl Serialize for CompositeUiElement[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, C> ComponentContainerModify<'a, ComponentContainer<'a, C>> for C where
    C: Component, 
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: Any, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryDefault for T where
    T: Default

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,