pub struct Play {
pub stretch: Option<Stretch>,
pub wgpu_context: Option<WgpuContext>,
/* private fields */
}Fields§
§stretch: Option<Stretch>§wgpu_context: Option<WgpuContext>Implementations§
Source§impl Play
impl Play
pub fn new( name: String, viewport_width: i32, viewport_height: i32, layout_mode: LayoutMode, ) -> Self
pub fn init_wgpu(&mut self)
Sourcepub fn init_wgpu_with_surface(
&mut self,
window: impl Into<SurfaceTarget<'static>>,
width: u32,
height: u32,
)
pub fn init_wgpu_with_surface( &mut self, window: impl Into<SurfaceTarget<'static>>, width: u32, height: u32, )
Initialize wgpu with a window surface for rendering to screen
Sourcepub fn resize(&mut self, width: u32, height: u32)
pub fn resize(&mut self, width: u32, height: u32)
Resize the rendering surface and update projection matrix
pub fn new_layer( name: String, w: u32, h: u32, event_handler: Option<Box<dyn EventHandler>>, ) -> Layer
pub fn add_new_layer_to_stage(&mut self, stage_name: &String, layer: Layer)
pub fn set_visible_stage(&mut self, name: &String, visible: bool)
pub fn add_stage(&mut self, stage: Layer) -> String
pub fn handle_input(&mut self, key: Key)
pub fn render(&mut self)
Auto Trait Implementations§
impl !Freeze for Play
impl !RefUnwindSafe for Play
impl !Send for Play
impl !Sync for Play
impl Unpin for Play
impl !UnwindSafe for Play
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more