Expand description
Indicates that this Node
entity’s front-to-back ordering is not controlled solely
by its location in the UI hierarchy. A node with a higher z-index will appear on top
of other nodes with a lower z-index.
UI nodes that have the same z-index will appear according to the order in which they appear in the UI hierarchy. In such a case, the last node to be added to its parent will appear in front of this parent’s other children.
Internally, nodes with a global z-index share the stacking context of root UI nodes
(nodes that have no parent). Because of this, there is no difference between using
[ZIndex::Local(n)
] and [ZIndex::Global(n)
] for root nodes.
Nodes without this component will be treated as if they had a value of [ZIndex::Local(0)
].
Variants
Local(i32)
Indicates the order in which this node should be rendered relative to its siblings.
Global(i32)
Indicates the order in which this node should be rendered relative to root nodes and all other nodes that have a global z-index.
Trait Implementations
impl Enum for ZIndex
impl Enum for ZIndex
fn field(&self, __name_param: &str) -> Option<&(dyn Reflect + 'static)>
fn field(&self, __name_param: &str) -> Option<&(dyn Reflect + 'static)>
fn field_at(&self, __index_param: usize) -> Option<&(dyn Reflect + 'static)>
fn field_at(&self, __index_param: usize) -> Option<&(dyn Reflect + 'static)>
fn field_mut(
&mut self,
__name_param: &str
) -> Option<&mut (dyn Reflect + 'static)>
fn field_mut(
&mut self,
__name_param: &str
) -> Option<&mut (dyn Reflect + 'static)>
fn field_at_mut(
&mut self,
__index_param: usize
) -> Option<&mut (dyn Reflect + 'static)>
fn field_at_mut(
&mut self,
__index_param: usize
) -> Option<&mut (dyn Reflect + 'static)>
fn index_of(&self, __name_param: &str) -> Option<usize>
fn index_of(&self, __name_param: &str) -> Option<usize>
fn name_at(&self, __index_param: usize) -> Option<&str>
fn name_at(&self, __index_param: usize) -> Option<&str>
fn iter_fields(&self) -> VariantFieldIter<'_>ⓘ
fn iter_fields(&self) -> VariantFieldIter<'_>ⓘ
fn variant_name(&self) -> &str
fn variant_name(&self) -> &str
fn variant_index(&self) -> usize
fn variant_index(&self) -> usize
fn variant_type(&self) -> VariantType
fn variant_type(&self) -> VariantType
fn clone_dynamic(&self) -> DynamicEnum
fn is_variant(&self, variant_type: VariantType) -> bool
fn is_variant(&self, variant_type: VariantType) -> bool
fn variant_path(&self) -> String
fn variant_path(&self) -> String
impl GetTypeRegistration for ZIndex
impl GetTypeRegistration for ZIndex
impl Reflect for ZIndex
impl Reflect for ZIndex
fn get_type_info(&self) -> &'static TypeInfo
fn get_type_info(&self) -> &'static TypeInfo
fn into_any(self: Box<ZIndex, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<ZIndex, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Any>
.fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut dyn Any
.fn into_reflect(self: Box<ZIndex, Global>) -> Box<dyn Reflect + 'static, Global>
fn into_reflect(self: Box<ZIndex, Global>) -> Box<dyn Reflect + 'static, Global>
fn as_reflect(&self) -> &(dyn Reflect + 'static)
fn as_reflect(&self) -> &(dyn Reflect + 'static)
fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
fn clone_value(&self) -> Box<dyn Reflect + 'static, Global>
fn clone_value(&self) -> Box<dyn Reflect + 'static, Global>
Reflect
trait object. Read morefn set(
&mut self,
__value_param: Box<dyn Reflect + 'static, Global>
) -> Result<(), Box<dyn Reflect + 'static, Global>>
fn set(
&mut self,
__value_param: Box<dyn Reflect + 'static, Global>
) -> Result<(), Box<dyn Reflect + 'static, Global>>
fn apply(&mut self, __value_param: &(dyn Reflect + 'static))
fn apply(&mut self, __value_param: &(dyn Reflect + 'static))
fn reflect_ref(&self) -> ReflectRef<'_>
fn reflect_ref(&self) -> ReflectRef<'_>
fn reflect_mut(&mut self) -> ReflectMut<'_>
fn reflect_mut(&mut self) -> ReflectMut<'_>
fn reflect_owned(self: Box<ZIndex, Global>) -> ReflectOwned
fn reflect_owned(self: Box<ZIndex, Global>) -> ReflectOwned
fn reflect_hash(&self) -> Option<u64>
fn reflect_hash(&self) -> Option<u64>
fn reflect_partial_eq(&self, value: &(dyn Reflect + 'static)) -> Option<bool>
fn reflect_partial_eq(&self, value: &(dyn Reflect + 'static)) -> Option<bool>
fn serializable(&self) -> Option<Serializable<'_>>
fn serializable(&self) -> Option<Serializable<'_>>
impl Copy for ZIndex
Auto Trait Implementations
impl RefUnwindSafe for ZIndex
impl Send for ZIndex
impl Sync for ZIndex
impl Unpin for ZIndex
impl UnwindSafe for ZIndex
Blanket Implementations
impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist. Read moresourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids(
components: &mut Components,
storages: &mut Storages,
ids: &mut impl FnMut(ComponentId)
)
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> Cwhere
F: for<'a> FnMut(&'a mut T) -> OwningPtr<'a>,
fn get_components(self, func: &mut impl FnMut(OwningPtr<'_>))
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read moreimpl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Self
using data from the given Worldimpl<T> GetPath for Twhere
T: Reflect,
impl<T> GetPath for Twhere
T: Reflect,
fn path<'r, 'p>(
&'r self,
path: &'p str
) -> Result<&'r (dyn Reflect + 'static), ReflectPathError<'p>>
fn path<'r, 'p>(
&'r self,
path: &'p str
) -> Result<&'r (dyn Reflect + 'static), ReflectPathError<'p>>
path
. Read morefn path_mut<'r, 'p>(
&'r mut self,
path: &'p str
) -> Result<&'r mut (dyn Reflect + 'static), ReflectPathError<'p>>
fn path_mut<'r, 'p>(
&'r mut self,
path: &'p str
) -> Result<&'r mut (dyn Reflect + 'static), ReflectPathError<'p>>
path
. Read morefn get_path<T, 'r, 'p>(
&'r self,
path: &'p str
) -> Result<&'r T, ReflectPathError<'p>>where
T: Reflect,
fn get_path<T, 'r, 'p>(
&'r self,
path: &'p str
) -> Result<&'r T, ReflectPathError<'p>>where
T: Reflect,
path
.fn get_path_mut<T, 'r, 'p>(
&'r mut self,
path: &'p str
) -> Result<&'r mut T, ReflectPathError<'p>>where
T: Reflect,
fn get_path_mut<T, 'r, 'p>(
&'r mut self,
path: &'p str
) -> Result<&'r mut T, ReflectPathError<'p>>where
T: Reflect,
path
. Read more