Struct oxygengine_composite_renderer::component::CompositeUiElement [−][src]
pub struct CompositeUiElement {}Show fields
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: UiElementType
margin: UiMargin
padding: UiMargin
left_anchor: UiValue
right_anchor: UiValue
top_anchor: UiValue
bottom_anchor: UiValue
alignment: UiValueVec2
offset: UiValueVec2
fixed_width: Option<UiValue>
fixed_height: Option<UiValue>
scale: Vec2
alpha: UiValue
children: Vec<CompositeUiElement>
state: HashMap<Cow<'static, str>, Scalar>
Implementations
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
type Storage = VecStorage<Self>
type Storage = VecStorage<Self>
Associated storage type for this component.
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
fn from_prefab_with_extras(
data: Value,
_named_entities: &HashMap<String, Entity, RandomState>,
_state_token: ID<()>
) -> Result<Self, PrefabError>
[src]Auto Trait Implementations
impl RefUnwindSafe for CompositeUiElement
impl Send for CompositeUiElement
impl Sync for CompositeUiElement
impl Unpin for CompositeUiElement
impl UnwindSafe for CompositeUiElement
Blanket Implementations
impl<T> Any for T where
T: Any,
impl<T> Any for T where
T: Any,
pub fn get_type_id(&self) -> TypeId
Mutably borrows from an owned value. Read more
impl<T> TryDefault for T where
T: Default,
impl<T> TryDefault for T where
T: Default,
pub fn try_default() -> Result<T, String>
pub fn try_default() -> Result<T, String>
Tries to create the default.
fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls try_default
and panics on an error case.