Enum bevy_ui_navigation::events::NavRequest
source · pub enum NavRequest {
Move(Direction),
ScopeMove(ScopeDirection),
Action,
Cancel,
FocusOn(Entity),
Lock,
Unlock,
}
Expand description
Requests to send to the navigation system to update focus.
Variants§
Move(Direction)
Move in in provided direction according to the plugin’s navigation strategy.
Typically used by gamepads.
ScopeMove(ScopeDirection)
Move within the encompassing MenuSetting::scope
.
Action
Activate the currently focused Focusable
.
If a menu is reachable from
Cancel
Leave this submenu to enter the one it is reachable from.
FocusOn(Entity)
Move the focus to any arbitrary Focusable
entity.
Note that resolving a FocusOn
request is expensive,
make sure you do not spam FocusOn
messages in your input systems.
Avoid sending FocusOn messages when you know the target entity is
already focused.
Lock
Locks the navigation system.
A NavEvent::Locked
will be emitted as a response if the
navigation system was not already locked.
Unlock
Unlocks the navigation system.
A NavEvent::Unlocked
will be emitted as a response if the
navigation system was indeed locked.
Trait Implementations§
source§fn clone(&self) -> NavRequest
fn clone(&self) -> NavRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§fn eq(&self, other: &NavRequest) -> bool
fn eq(&self, other: &NavRequest) -> bool
self
and other
values to be equal, and is used
by ==
.Auto Trait Implementations§
Blanket Implementations§
§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.§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
.§fn 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
.§fn 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.§fn 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.