HoverRace
2.0
|
Main game shell. More...
#include <ClientApp.h>
Public Types | |
enum | ExitMode { ExitMode::QUITTING, ExitMode::SOFT_RESTART } |
![]() | |
using | sessionChangedSignal_t = boost::signals2::signal< void(std::shared_ptr< HoverScript::MetaSession >)> |
Public Member Functions | |
ClientApp () | |
virtual | ~ClientApp () |
Control::InputEventController * | GetController () const override |
Display::Display * | GetDisplay () const override |
Scene * | GetForegroundScene () const override |
Gets foreground scene, if available. More... | |
Roster * | GetParty () const override |
Retrieve the list of players connected to this game instance. More... | |
sessionChangedSignal_t & | GetSessionChangedSignal () override |
Access the signal that indicates that the gameplay session started or stopped. More... | |
VideoServices::VideoBuffer * | GetVideoBuffer () const override |
ExitMode | MainLoop () |
Control::InputEventController * | ReloadController () override |
Reload the control settings. More... | |
void | RequestAnnouncement (std::shared_ptr< Announcement > ann) override |
Request an announcement to be displayed. More... | |
void | RequestMainMenu (std::shared_ptr< LoadingScene > loadingScene=std::shared_ptr< LoadingScene >()) override |
Request a return to the main menu. More... | |
void | RequestNewPracticeSession (std::shared_ptr< Rules > rules, std::shared_ptr< LoadingScene > loadingScene=std::shared_ptr< LoadingScene >()) override |
Request a new local practice session. More... | |
void | RequestPopScene () override |
Return to the previous scene, if any. More... | |
void | RequestPushScene (const std::shared_ptr< Scene > &scene) override |
Push a new scene to the foreground. More... | |
void | RequestReplaceScene (const std::shared_ptr< Scene > &scene) override |
Replace the current scene and all background scenes with a new foreground scene. More... | |
void | RequestShutdown () override |
Request an orderly shutdown the of app. More... | |
void | RequestSoftRestart () override |
Request a restart of the app without restarting the whole process. More... | |
void | RequestStatusPresentation () override |
Request that the status (logged-in players, etc.) be momentarily displayed to remind the user what's going on. More... | |
std::shared_ptr< Player::AvatarGallery > | ShareAvatarGallery () const override |
Retrieve the global avatar gallery. More... | |
std::shared_ptr< Player::Player > | ShareUiPilot () const override |
Retrieve the current local player who is in control of the UI at the moment. More... | |
![]() | |
virtual | ~GameDirector () |
Private Types | |
using | sceneStack_t = std::list< std::shared_ptr< Scene >> |
using | SUPER = GameDirector |
Private Member Functions | |
void | AdvanceScenes (Util::OS::timestamp_t tick) |
std::string | GetWindowTitle () |
void | IncFrameCount () |
Increment the frame counter for stats purposes. More... | |
void | LoadInitialProfile () |
Attempt to load the default profile to the roster. More... | |
void | OnConsoleToggle () |
void | OnWindowResize (int w, int h) |
Handle when the window is resized. More... | |
void | PopScene () |
Return to the previous scene, if any. More... | |
void | PrepareScenes () |
void | PushScene (const std::shared_ptr< Scene > &scene) |
Push a new scene to the foreground. More... | |
void | RenderFrame () |
void | RenderScenes () |
void | ReplaceScene (const std::shared_ptr< Scene > &scene) |
Replace the current scene and all background scenes with a new foreground scene. More... | |
void | SetForegroundScene () |
Remove the foreground scene. More... | |
void | SetForegroundScene (const std::shared_ptr< Scene > &iter) |
Switch which scene has input focus. More... | |
void | TerminateAllScenes () |
Immediately remove all scenes. More... | |
Main game shell.
|
private |
|
private |
|
strong |
Enumerator | |
---|---|
QUITTING |
Normal exit. |
SOFT_RESTART |
Create and run a new ClientApp instance. |
HoverRace::Client::ClientApp::ClientApp | ( | ) |
|
virtual |
|
private |
|
inlineoverridevirtual |
Implements HoverRace::Client::GameDirector.
|
inlineoverridevirtual |
Implements HoverRace::Client::GameDirector.
|
inlineoverridevirtual |
Gets foreground scene, if available.
nullptr
if no scene is active, else the foreground scene. Implements HoverRace::Client::GameDirector.
|
inlineoverridevirtual |
Retrieve the list of players connected to this game instance.
nullptr
). Implements HoverRace::Client::GameDirector.
|
inlineoverridevirtual |
Access the signal that indicates that the gameplay session started or stopped.
Subscribers to this signal will get the ClientSession instance if the session is starting or nullptr
if the session has ended.
Implements HoverRace::Client::GameDirector.
|
overridevirtual |
Implements HoverRace::Client::GameDirector.
|
private |
|
private |
Increment the frame counter for stats purposes.
This should be called once per frame.
|
private |
Attempt to load the default profile to the roster.
ClientApp::ExitMode HoverRace::Client::ClientApp::MainLoop | ( | ) |
|
private |
|
private |
Handle when the window is resized.
w | The new width. |
h | The new height. |
|
private |
Return to the previous scene, if any.
|
private |
|
private |
Push a new scene to the foreground.
scene | The scene to push. |
|
overridevirtual |
Reload the control settings.
Implements HoverRace::Client::GameDirector.
|
private |
|
private |
|
private |
Replace the current scene and all background scenes with a new foreground scene.
scene | The scene to push. |
|
overridevirtual |
Request an announcement to be displayed.
ann | The announcement (may not be nullptr ). |
Implements HoverRace::Client::GameDirector.
|
overridevirtual |
Request a return to the main menu.
loadingScene | Optional loading scene instead of default. |
Implements HoverRace::Client::GameDirector.
|
overridevirtual |
Request a new local practice session.
rules | The settings for the session. |
loadingScene | Optional loading scene instead of default. |
Implements HoverRace::Client::GameDirector.
|
overridevirtual |
Return to the previous scene, if any.
Implements HoverRace::Client::GameDirector.
|
overridevirtual |
Push a new scene to the foreground.
scene | The scene to push. |
Implements HoverRace::Client::GameDirector.
|
overridevirtual |
Replace the current scene and all background scenes with a new foreground scene.
scene | The scene to push. |
Implements HoverRace::Client::GameDirector.
|
overridevirtual |
Request an orderly shutdown the of app.
This call returns immediately; the shutdown will actually occur later, possibly when you least expect it. All normal "Are you sure?" confirmation prompts will be skipped.
Implements HoverRace::Client::GameDirector.
|
overridevirtual |
Request a restart of the app without restarting the whole process.
Implements HoverRace::Client::GameDirector.
|
overridevirtual |
Request that the status (logged-in players, etc.) be momentarily displayed to remind the user what's going on.
Implements HoverRace::Client::GameDirector.
|
private |
Remove the foreground scene.
|
private |
Switch which scene has input focus.
scene | The new foreground scene. |
|
inlineoverridevirtual |
Retrieve the global avatar gallery.
nullptr
). Implements HoverRace::Client::GameDirector.
|
overridevirtual |
Retrieve the current local player who is in control of the UI at the moment.
nullptr
if nobody has seized control). Implements HoverRace::Client::GameDirector.
|
private |
Immediately remove all scenes.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
The scene that currently has input focus.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Display dev release warning on next menu.
|
private |
Check locale and warn on next menu.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |