Enum bevy_doryen::ResizeMode
source · pub enum ResizeMode {
Nothing,
Automatic,
Callback(fn(_: &mut RootConsole, _: Resized)),
}
Expand description
How the DoryenPlugin
reacts to the resize event from Doryen.
Variants§
Nothing
Do nothing when the window is resized. This is the default behavior.
Automatic
Set the console size to match the window size automatically. This
retains the ratio defined between the console size and the screen size
as given in the AppOptions
at the start of the program.
Callback(fn(_: &mut RootConsole, _: Resized))
Call the given function when the resize event is triggered. Because
Doryen is sensitive to when the root console is resized, the safest
place to make a call to do so and always have the correct behavior is
during this resize callback which comes directly from Doryen itself. The
Resized
event is useful for reacting to resizing within Bevy
systems for other reasons, but will arrive at a point that is too late
to do the root console resizing correctly.
Trait Implementations§
source§impl Clone for ResizeMode
impl Clone for ResizeMode
source§fn clone(&self) -> ResizeMode
fn clone(&self) -> ResizeMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ResizeMode
impl Debug for ResizeMode
impl Copy for ResizeMode
Auto Trait Implementations§
impl RefUnwindSafe for ResizeMode
impl Send for ResizeMode
impl Sync for ResizeMode
impl Unpin for ResizeMode
impl UnwindSafe for ResizeMode
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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.