HoverRace
2.0
|
The title scene. More...
#include <MainMenuScene.h>
Public Member Functions | |
MainMenuScene (Display::Display &display, GameDirector &director, RulebookLibrary &rulebookLibrary) | |
virtual | ~MainMenuScene () |
void | Layout () override |
Adjust the size and position of any child elements. More... | |
void | OnStateChanged (State oldState) override |
Fired immediately after entering a new state. More... | |
void | OnStateTransition (double interval) override |
Fired during the raising and lowering states, if SetStateTransitionDuration() was set. More... | |
void | PrepareRender () override |
void | Render () override |
![]() | |
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... | |
Private Types | |
using | SUPER = FormScene |
Private Member Functions | |
std::shared_ptr< Display::Button > | AddButton (const std::string &text, bool enabled=true, bool focused=false) |
void | OnMultiplayerClicked () |
void | OnMutedClicked () |
void | OnPracticeClicked () |
void | OnSettingsClicked () |
Private Attributes | |
GameDirector & | director |
Display::Display & | display |
boost::signals2::scoped_connection | displayConfigChangedConn |
std::unique_ptr< Display::FillBox > | letterDownBox |
std::unique_ptr< Display::FillBox > | letterUpBox |
std::vector< std::shared_ptr< Display::Button > > | menuButtons |
std::shared_ptr< Display::Container > | menuContainer |
RulebookLibrary & | rulebookLibrary |
std::shared_ptr< Display::Container > | titleContainer |
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::Container * | GetRoot () const |
![]() | |
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 | OnPhaseChanged (Phase oldPhase) |
Fired immediately after entering a new phase. More... | |
virtual void | OnPhaseTransition (double progress) |
Fired during the starting and stopping phases, if SetPhaseTransitionDuration() 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... | |
![]() | |
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 |
The title scene.
|
private |
HoverRace::Client::MainMenuScene::MainMenuScene | ( | Display::Display & | display, |
GameDirector & | director, | ||
RulebookLibrary & | rulebookLibrary | ||
) |
|
virtual |
|
private |
|
overridevirtual |
Adjust the size and position of any child elements.
Subclasses with child elements that are relative to each other should override this function.
This is called automatically during the PrepareRender() phase if RequestLayout() has been called. It is also called the first time PrepareRender() is invoked. After this function is called, it will not be called again until another call to RequestLayout().
Reimplemented from HoverRace::Client::UiScene.
|
private |
|
private |
|
private |
|
private |
|
overridevirtual |
Fired immediately after entering a new state.
oldState | The previous state. |
Reimplemented from HoverRace::Client::Scene.
|
overridevirtual |
Fired during the raising and lowering states, if SetStateTransitionDuration() was set.
progress | The animation progress (during the RAISING phase this goes from 0.0 to 1.0, and in reverse for the LOWERING phase). |
Reimplemented from HoverRace::Client::Scene.
|
overridevirtual |
Reimplemented from HoverRace::Client::FormScene.
|
overridevirtual |
Reimplemented from HoverRace::Client::FormScene.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |