pub struct EframeApp<GameState> { /* private fields */ }
Implementations§
Source§impl<GameState: PeterEngineApp> EframeApp<GameState>
impl<GameState: PeterEngineApp> EframeApp<GameState>
pub fn new(game_state: GameState, cc: &CreationContext<'_>) -> Self
Trait Implementations§
Source§impl<GameState: PeterEngineApp> App for EframeApp<GameState>
impl<GameState: PeterEngineApp> App for EframeApp<GameState>
Source§fn update(&mut self, egui_ctx: &Context, frame: &mut Frame)
fn update(&mut self, egui_ctx: &Context, frame: &mut Frame)
Called each time the UI needs repainting, which may be many times per second. Read more
Source§fn save(&mut self, _storage: &mut dyn Storage)
fn save(&mut self, _storage: &mut dyn Storage)
Called on shutdown, and perhaps at regular intervals. Allows you to save state. Read more
Source§fn on_close_event(&mut self) -> bool
fn on_close_event(&mut self) -> bool
Called when the user attempts to close the desktop window and/or quit the application. Read more
Source§fn on_exit(&mut self)
fn on_exit(&mut self)
Called once on shutdown, after
Self::save
. Read moreSource§fn auto_save_interval(&self) -> Duration
fn auto_save_interval(&self) -> Duration
Time between automatic calls to
Self::save
Source§fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]
fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]
Background color values for the app, e.g. what is sent to
gl.clearColor
. Read moreSource§fn persist_egui_memory(&self) -> bool
fn persist_egui_memory(&self) -> bool
Controls whether or not the egui memory (window positions etc) will be
persisted (only if the “persistence” feature is enabled).
Source§fn warm_up_enabled(&self) -> bool
fn warm_up_enabled(&self) -> bool
If
true
a warm-up call to Self::update
will be issued where
ctx.memory(|mem| mem.everything_is_visible())
will be set to true
. Read moreAuto Trait Implementations§
impl<GameState> Freeze for EframeApp<GameState>
impl<GameState> RefUnwindSafe for EframeApp<GameState>
impl<GameState> Send for EframeApp<GameState>where
GameState: Send,
impl<GameState> Sync for EframeApp<GameState>where
GameState: Send,
impl<GameState> Unpin for EframeApp<GameState>
impl<GameState> UnwindSafe for EframeApp<GameState>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.