pub struct VisibleTouchLabel<'a> {
pub slot: usize,
pub code: InputCode,
pub label: &'a str,
}Expand description
A label actually drawn for one output of an installed touch-control slot.
slot is the stable slice index passed to PlayerInput::set_touch_layout,
also used by super::super::touch_layout::TouchSlot. A stick can have
separate labels for its X and Y codes; a look region uses TouchDelta codes.
Labels describe the current drawing, including any customized geometry.
Omit controls whose labels are hidden. Merely installing a hit region does
not establish visibility.
use ferravex_render::input::{InputCode, VisibleTouchLabel};
let gas = VisibleTouchLabel { slot: 2, code: InputCode::Touch(14), label: "GAS" };
assert_eq!(gas.slot, 2); // Slot identity differs from output channel 14.Fields§
§slot: usize§code: InputCode§label: &'a strTrait Implementations§
Source§impl<'a> Clone for VisibleTouchLabel<'a>
impl<'a> Clone for VisibleTouchLabel<'a>
Source§fn clone(&self) -> VisibleTouchLabel<'a>
fn clone(&self) -> VisibleTouchLabel<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for VisibleTouchLabel<'a>
impl<'a> Debug for VisibleTouchLabel<'a>
Source§impl<'a> PartialEq for VisibleTouchLabel<'a>
impl<'a> PartialEq for VisibleTouchLabel<'a>
impl<'a> Copy for VisibleTouchLabel<'a>
impl<'a> Eq for VisibleTouchLabel<'a>
impl<'a> StructuralPartialEq for VisibleTouchLabel<'a>
Auto Trait Implementations§
impl<'a> Freeze for VisibleTouchLabel<'a>
impl<'a> RefUnwindSafe for VisibleTouchLabel<'a>
impl<'a> Send for VisibleTouchLabel<'a>
impl<'a> Sync for VisibleTouchLabel<'a>
impl<'a> Unpin for VisibleTouchLabel<'a>
impl<'a> UnwindSafe for VisibleTouchLabel<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more