![]() |
YAPOG
0.0.1
Yet Another Pokemon Online Game
|
A basic implementation of IGameScreen, a game phase. More...
#include <GameScreen.hpp>
Public Member Functions | |
| GameScreen (const ScreenType &type) | |
| Initializes a GameScreen with the ScreenType type. | |
| virtual | ~GameScreen () |
IGameScreen members. | |
| virtual void | Init () |
| Called once after the add into a IGameScreenManager. | |
| virtual void | Activate () |
| Called each time this IGameScreen is slected to be run. | |
| virtual void | Deactivate () |
| Called each time this IGameScreen is not running anymore. | |
| virtual void | NextFrame () |
| virtual const ScreenType & | Run (const Time &dt, IDrawingContext &context) |
| Performs one frame of the screen life. | |
| virtual const GuiManager & | GetGuiManager () const |
| Gets the root widget of this Screen. | |
| virtual GuiManager & | GetGuiManager () |
| Gets the root widget of this Screen. | |
| virtual const ScreenType & | GetType () const |
| Gets the unique type name of this Screen. | |
| virtual Event< IGameScreen & > & | OnGameExitedEvent () |
IEventHandler members. | |
| virtual bool | OnEvent (const GuiEvent &guiEvent) |
| Treats an event. Transferts the event before treating it. | |
| virtual bool | OnPriorityEvent (const GuiEvent &guiEvent) |
| Treats an event. Treats the event before transfering it. | |
Public Member Functions inherited from yap::IGameScreen | |
| virtual | ~IGameScreen () |
Public Member Functions inherited from yap::IEventHandler | |
| virtual | ~IEventHandler () |
Public Attributes | |
| Event< IGameScreen & > | OnGameExited |
Protected Member Functions | |
| void | ExitGame () |
| virtual void | CreateGuiManager () |
| virtual void | HandleRun (const Time &dt, IDrawingContext &context) |
| Behavior of Run. | |
| virtual void | HandleInit () |
| Behavior of Init. | |
| virtual void | HandleActivate () |
| Behavior of Activate. | |
| virtual void | HandleDeactivate () |
| Behavior of Deactivate. | |
| virtual bool | HandleOnEvent (const GuiEvent &guiEvent) |
| Behavior of OnEvent. | |
| virtual bool | HandleOnPriorityEvent (const GuiEvent &guiEvent) |
| Behavior of OnPriorityEvent. | |
Protected Attributes | |
| ScreenType | nextScreen_ |
| Type of the Screen to be executed on next frame. | |
| GuiManager * | guiManager_ |
| Root widget if this GameScreen. | |
Private Member Functions | |
| DISALLOW_COPY (GameScreen) | |
Private Attributes | |
| ScreenType | type_ |
| Type of this GameScreen. | |
A basic implementation of IGameScreen, a game phase.
Definition at line 10 of file GameScreen.hpp.
|
explicit |
Initializes a GameScreen with the ScreenType type.
| type | ScreenType of this GameScreen. |
Definition at line 7 of file GameScreen.cpp.
|
virtual |
Definition at line 14 of file GameScreen.cpp.
|
virtual |
Called each time this IGameScreen is slected to be run.
Implements yap::IGameScreen.
Definition at line 25 of file GameScreen.cpp.
|
protectedvirtual |
Reimplemented in ycl::GameplayScreen.
Definition at line 95 of file GameScreen.cpp.
|
virtual |
Called each time this IGameScreen is not running anymore.
Implements yap::IGameScreen.
Definition at line 30 of file GameScreen.cpp.
|
private |
|
protected |
|
virtual |
Gets the root widget of this Screen.
Implements yap::IGameScreen.
Definition at line 54 of file GameScreen.cpp.
|
virtual |
Gets the root widget of this Screen.
Implements yap::IGameScreen.
Definition at line 59 of file GameScreen.cpp.
|
virtual |
Gets the unique type name of this Screen.
Implements yap::IGameScreen.
Definition at line 64 of file GameScreen.cpp.
|
protectedvirtual |
Behavior of Activate.
Reimplemented in ycl::GameplayScreen, ycl::SplashScreen, ycl::BattleScreen, and ycl::UpdateScreen.
Definition at line 111 of file GameScreen.cpp.
|
protectedvirtual |
Behavior of Deactivate.
Reimplemented in ycl::GameplayScreen, ycl::BattleScreen, ycl::LoginScreen, and ycl::RegistrationScreen.
Definition at line 115 of file GameScreen.cpp.
|
protectedvirtual |
Behavior of Init.
Reimplemented in ycl::GameplayScreen, ycl::SplashScreen, ycl::UpdateScreen, ycl::BattleScreen, ycl::LoginScreen, ycl::RegistrationScreen, and ycl::MainMenuScreen.
Definition at line 106 of file GameScreen.cpp.
|
protectedvirtual |
Behavior of OnEvent.
Reimplemented in ycl::GameplayScreen, and ycl::SplashScreen.
Definition at line 119 of file GameScreen.cpp.
|
protectedvirtual |
Behavior of OnPriorityEvent.
Reimplemented in ycl::LoginScreen, and ycl::RegistrationScreen.
Definition at line 124 of file GameScreen.cpp.
|
protectedvirtual |
Behavior of Run.
Reimplemented in ycl::GameplayScreen, ycl::UpdateScreen, ycl::BattleScreen, ycl::LoginScreen, ycl::SplashScreen, ycl::RegistrationScreen, ycl::MainMenuScreen, ycl::CreditScreen, and ycl::LoadingScreen.
Definition at line 100 of file GameScreen.cpp.
|
virtual |
Called once after the add into a IGameScreenManager.
Implements yap::IGameScreen.
Definition at line 20 of file GameScreen.cpp.
|
virtual |
Implements yap::IGameScreen.
Definition at line 35 of file GameScreen.cpp.
|
virtual |
Treats an event. Transferts the event before treating it.
| guiEvent | The event to treat. |
Implements yap::IEventHandler.
Definition at line 74 of file GameScreen.cpp.
|
virtual |
Implements yap::IGameScreen.
Definition at line 69 of file GameScreen.cpp.
|
virtual |
Treats an event. Treats the event before transfering it.
| guiEvent | The event to treat. |
Implements yap::IEventHandler.
Definition at line 82 of file GameScreen.cpp.
|
virtual |
Performs one frame of the screen life.
| dt | Delta time elapsed since last frame. |
| context | Drawing context where are drawn graphical elements. |
Implements yap::IGameScreen.
Definition at line 40 of file GameScreen.cpp.
|
protected |
Root widget if this GameScreen.
Definition at line 71 of file GameScreen.hpp.
|
protected |
Type of the Screen to be executed on next frame.
Definition at line 69 of file GameScreen.hpp.
| Event<IGameScreen&> yap::GameScreen::OnGameExited |
Definition at line 45 of file GameScreen.hpp.
|
private |
Type of this GameScreen.
Definition at line 76 of file GameScreen.hpp.