HoverRace
2.0
|
Base class for "Please Wait" loading scenes. More...
#include <LoadingScene.h>
Public Member Functions | |
LoadingScene (Display::Display &display, GameDirector &director, const std::string &name="Loading") | |
virtual | ~LoadingScene () |
bool | IsMouseCursorEnabled () const override |
Determine if the mouse cursor is enabled for this scene. More... | |
void | OnPhaseTransition (double progress) override |
Fired during the starting and stopping phases, if SetPhaseTransitionDuration() was set. More... | |
void | PrepareRender () override |
void | Render () override |
std::shared_ptr< Util::Loader > | ShareLoader () const |
![]() | |
FormScene (Display::Display &display, const std::string &name="") | |
virtual | ~FormScene () |
void | AttachController (Control::InputEventController &controller, ConnList &conns) override |
Configure the controller mappings. More... | |
![]() | |
UiScene (const std::string &name="") | |
virtual | ~UiScene () |
void | AttachController (Control::InputEventController &controller, ConnList &conns) override |
Configure the controller mappings. More... | |
void | DetachController (Control::InputEventController &, ConnList &) override |
Remove the controller mappings. More... | |
bool | IsMouseCursorEnabled () const override |
Determine if the mouse cursor is enabled for this scene. More... | |
void | PrepareRender () override |
void | Render () override |
![]() | |
Scene (const std::string &name="Unnamed Scene") | |
Constructor. More... | |
virtual | ~Scene () |
void | AdvanceScene (Util::OS::timestamp_t tick) |
void | AttachInput (Control::InputEventController &controller) |
Attach the user input to the scene. More... | |
void | DetachInput (Control::InputEventController &controller) |
Detach the user input from the scene. More... | |
const std::string & | GetName () const |
Retrieve the name of the scene. More... | |
Phase | GetPhase () const |
State | GetState () const |
bool | MoveToBackground () |
Signal that the scene is moving into the background. More... | |
bool | MoveToForeground () |
Signal that the scene is moving into the foreground. More... | |
virtual void | OnScenePushed () |
Called when the scene is actually pushed to the stage. More... | |
Scene & | operator= (const Scene &)=delete |
virtual std::ostream & | OutputDebugText (std::ostream &oss) const |
Output a stream of debug information describing this scene. More... | |
void | PrepareScene () |
void | RenderScene () |
bool | SetPhase (Phase phase) |
Switch to another phase. More... | |
Protected Member Functions | |
void | OnPhaseChanged (Phase oldPhase) override |
Fired immediately after entering a new phase. More... | |
![]() | |
Display::Container * | GetRoot () const |
![]() | |
virtual void | Layout () |
Adjust the size and position of any child elements. More... | |
void | RequestLayout () |
Indicate that the current layout is out-of-date and needs to be adjusted. More... | |
void | SetFocusRoot (std::shared_ptr< Display::UiViewModel > root) |
Set the widget used as the root for all focus management. More... | |
![]() | |
virtual void | Advance (Util::OS::timestamp_t tick) |
Util::OS::timestamp_t | GetPhaseDuration (Util::OS::timestamp_t curTime=Util::OS::Time()) |
Calculate how much time we've spent in the current phase. More... | |
Util::OS::timestamp_t | GetStartingPhaseTime () |
Return how long the starting phase lasted. More... | |
Util::OS::timestamp_t | GetStateDuration (Util::OS::timestamp_t curTime=Util::OS::Time()) |
Calculate how much time we've spent in the current state. More... | |
virtual void | OnStateChanged (State oldState) |
Fired immediately after entering a new state. More... | |
virtual void | OnStateTransition (double progress) |
Fired during the raising and lowering states, if SetStateTransitionDuration() was set. More... | |
void | SetPhaseTransitionDuration (Util::OS::timestamp_t ms) |
Set the maximum duration of the starting or stopping phases. More... | |
void | SetStateTransitionDuration (Util::OS::timestamp_t ms) |
Set the maximum duration of the raising or lowering state. More... | |
Private Types | |
using | SUPER = FormScene |
Private Attributes | |
GameDirector & | director |
std::unique_ptr< Display::ScreenFade > | fader |
std::shared_ptr< Util::Loader > | loader |
bool | loading |
Additional Inherited Members | |
![]() | |
enum | Phase { Phase::INITIALIZING, Phase::STARTING, Phase::RUNNING, Phase::STOPPING, Phase::STOPPED } |
enum | State { State::INITIALIZING, State::BACKGROUND, State::RAISING, State::FOREGROUND, State::LOWERING } |
![]() | |
Display::Display & | display |
![]() | |
std::shared_ptr< Util::Profiler > | advanceProfiler |
std::shared_ptr< Util::Profiler > | prepareProfiler |
std::shared_ptr< Util::Profiler > | renderProfiler |
std::shared_ptr< Util::Profiler > | rootProfiler |
Base class for "Please Wait" loading scenes.
These scenes provide a way to wait for the previous scene stack to finish unloading resources then allow the new scene to load.
To use this scene, enqueue tasks to the loader, then push the scene that depends on the loader, then push this scene. When all of the resources have been loaded, this scene will automatically pop itself.
|
private |
HoverRace::Client::LoadingScene::LoadingScene | ( | Display::Display & | display, |
GameDirector & | director, | ||
const std::string & | name = "Loading" |
||
) |
|
virtual |
|
inlineoverridevirtual |
Determine if the mouse cursor is enabled for this scene.
true
if the cursor should be shown, false
if it should be hidden. Implements HoverRace::Client::Scene.
|
overrideprotectedvirtual |
Fired immediately after entering a new phase.
oldPhase | The previous phase. |
Reimplemented from HoverRace::Client::Scene.
|
overridevirtual |
Fired during the starting and stopping phases, if SetPhaseTransitionDuration() was set.
progress | The animation progress (during the STARTING phase this goes from 0.0 to 1.0, and in reverse for the STOPPING phase). |
Reimplemented from HoverRace::Client::Scene.
Reimplemented in HoverRace::Client::SessionLoadingScene.
|
overridevirtual |
Reimplemented from HoverRace::Client::FormScene.
|
overridevirtual |
Reimplemented from HoverRace::Client::FormScene.
|
inline |
|
private |
|
private |
|
private |
|
private |