pub struct ListMenuRenderer {
pub frame: TextBoxFrame,
pub visible_count: u32,
pub scroll_offset: u32,
pub total_count: u32,
pub current_item: u32,
pub item_x: u32,
pub item_start_y: u32,
pub row_spacing: u32,
}Fields§
§frame: TextBoxFrame§visible_count: u32§scroll_offset: u32§total_count: u32§current_item: u32§item_x: u32§item_start_y: u32§row_spacing: u32Implementations§
Source§impl ListMenuRenderer
impl ListMenuRenderer
pub fn new(total_count: u32) -> Self
pub fn draw_frame(&self, buf: &mut ScreenTileBuffer)
pub fn clear_items(&self, buf: &mut ScreenTileBuffer)
pub fn draw_item( &self, buf: &mut ScreenTileBuffer, visible_index: u32, name_tiles: &[u8], )
pub fn draw_cancel(&self, buf: &mut ScreenTileBuffer, visible_index: u32)
pub fn draw_scroll_indicator(&self, buf: &mut ScreenTileBuffer)
pub fn draw_item_quantity( &self, buf: &mut ScreenTileBuffer, visible_index: u32, quantity: u8, )
pub fn cursor_position(&self) -> (u32, u32)
pub fn scroll_down(&mut self) -> bool
pub fn scroll_up(&mut self) -> bool
Trait Implementations§
Source§impl Clone for ListMenuRenderer
impl Clone for ListMenuRenderer
Source§fn clone(&self) -> ListMenuRenderer
fn clone(&self) -> ListMenuRenderer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ListMenuRenderer
impl RefUnwindSafe for ListMenuRenderer
impl Send for ListMenuRenderer
impl Sync for ListMenuRenderer
impl Unpin for ListMenuRenderer
impl UnsafeUnpin for ListMenuRenderer
impl UnwindSafe for ListMenuRenderer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.