|
Robot Devastation
|
Manage game screens using SDL libraries.
#include <SDLScreenManager.hpp>
Public Member Functions | |
| virtual void | setCurrentScreen (Screen *screen) |
| Set a Screen as current Screen. | |
| virtual bool | show () |
| Display the current Screen on the game window. | |
| virtual bool | update (const std::string ¶meter, const std::string &value) |
| Update some Screen parameter through the ScreenManager. | |
| virtual bool | update (const std::string ¶meter, const Image &value) |
| Update some Screen parameter through the ScreenManager. | |
| virtual bool | update (const std::string ¶meter, const Player &value) |
| Update some Screen parameter through the ScreenManager. | |
| virtual bool | update (const std::string ¶meter, const std::vector< Player > &value) |
| Update some Screen parameter through the ScreenManager. | |
| virtual bool | update (const std::string ¶meter, const std::vector< Target > &value) |
| Update some Screen parameter through the ScreenManager. | |
| virtual bool | update (const std::string ¶meter, const Weapon &value) |
| Update some Screen parameter through the ScreenManager. | |
| virtual bool | configure (const std::string ¶meter, const std::string &value) |
| Configures a parameter with a value. | |
| virtual bool | start () |
| Start the ScreenManager. More... | |
| virtual bool | stop () |
| Stops the ScreenManager. | |
| virtual bool | isStopped () const |
| True if the manager is not active. | |
| virtual | ~SDLScreenManager () |
| Destructor. Used to reset the local static reference after destroying this manager. | |
Static Public Member Functions | |
| static bool | initSDL () |
| SDL initialization. | |
| static bool | cleanupSDL () |
| SDL Cleanup. | |
| static bool | RegisterManager () |
| Register this manager in the ScreenManager registry so that can be used. More... | |
Static Public Member Functions inherited from rd::ScreenManager | |
| static ScreenManager * | getScreenManager () |
| Get a reference to the ScreenManager. More... | |
| static ScreenManager * | getScreenManager (const std::string &id) |
| Get a reference to the ScreenManager. More... | |
| static bool | destroyScreenManager () |
| Deallocate all the registered ScreenManager. | |
Static Public Attributes | |
| static const std::string | PARAM_FULLSCREEN = "fullscreen" |
| static const std::string | id = "SDL" |
| String that identifies this manager. | |
Private Member Functions | |
| SDLScreenManager () | |
| Constructor. More... | |
| SDLScreenManager (const SDLScreenManager &) | |
| SDLScreenManager & | operator= (const SDLScreenManager &) |
Private Attributes | |
| bool | stopped |
| bool | sdl_initialized |
| bool | fullscreen |
| SDL_Window * | window |
| std::mutex | mutex |
Static Private Attributes | |
| static SDLScreenManager * | uniqueInstance = NULL |
| Stores the unique instance of the SDLScreenManager. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from rd::ScreenManager | |
| static bool | Register (ScreenManager *manager, const std::string &id) |
| This function allows subclasses to install their unique instances in the singleton register to be selected later by the user. | |
Protected Attributes inherited from rd::ScreenManager | |
| Screen * | screen |
|
private |
Constructor for this class is private, since the singleton can only be instantiated once, and the instantiation is done at the RegisterManager() method
|
static |
It ensures that only one manager of this type is created (unique instance)
|
virtual |
This function is supposed to be called after ScreenManager configuration.
Implements rd::ScreenManager.
1.8.17