pub struct WindowLayer {
pub tilemap: Tilemap,
pub wx: u32,
pub wy: u32,
pub enabled: bool,
}Expand description
Window layer state.
Fields§
§tilemap: TilemapThe window’s tile map (same format as BG: 32×32 entries).
wx: u32Window X position register (WX). The window starts at screen column (wx - 7). Valid range: 0–166. A value of 7 means the window starts at screen column 0.
wy: u32Window Y position register (WY). The window starts at this screen row. Valid range: 0–143.
enabled: boolWhether the window layer is enabled.
Implementations§
Source§impl WindowLayer
impl WindowLayer
pub fn new() -> Self
Sourcepub fn screen_x(&self) -> u32
pub fn screen_x(&self) -> u32
The actual screen X where the window starts. WX=7 means column 0. WX<7 is clamped to 0.
Trait Implementations§
Source§impl Clone for WindowLayer
impl Clone for WindowLayer
Source§fn clone(&self) -> WindowLayer
fn clone(&self) -> WindowLayer
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 moreSource§impl Debug for WindowLayer
impl Debug for WindowLayer
Auto Trait Implementations§
impl Freeze for WindowLayer
impl RefUnwindSafe for WindowLayer
impl Send for WindowLayer
impl Sync for WindowLayer
impl Unpin for WindowLayer
impl UnsafeUnpin for WindowLayer
impl UnwindSafe for WindowLayer
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.