#include <OpenGUI_ScreenManager.h>
Public Member Functions | |
| Screen * | createScreen (const std::string &screenName, const FVector2 &initialSize, Viewport *viewport=0) |
Creates a new screen with the given screenName at the given initialSize, rendering to the given viewport. | |
| void | destroyScreen (Screen *screenPtr) |
| destroys the given screen | |
| Screen * | getScreen (const std::string &screenName) |
| returns the requested screen by name, or 0 on failure | |
| void | updateScreens () |
| performs an update on all screens that are auto updating | |
| void | updateTime () |
| performs time injections on all screens that are auto timing using TimerManager as the time source | |
| iterator | getIterator () |
| returns an iterator to walk the current list of screens | |
| float | statGetFPS () |
| Returns the current FPS. | |
Static Public Member Functions | |
| static ScreenManager & | getSingleton (void) |
| Retrieve the current singleton, if one exists. If none exists, this will cause an error. | |
| static ScreenManager * | getSingletonPtr (void) |
| Retrieve a pointer to the current singleton, if one exists. If none exists, this will return 0. | |
| void OpenGUI::ScreenManager::destroyScreen | ( | Screen * | screenPtr | ) |
destroys the given screen
| iterator OpenGUI::ScreenManager::getIterator | ( | ) | [inline] |
| Screen * OpenGUI::ScreenManager::getScreen | ( | const std::string & | screenName | ) |
returns the requested screen by name, or 0 on failure
| ScreenManager & OpenGUI::ScreenManager::getSingleton | ( | void | ) | [static] |
Retrieve the current singleton, if one exists. If none exists, this will cause an error.
| ScreenManager * OpenGUI::ScreenManager::getSingletonPtr | ( | void | ) | [static] |
Retrieve a pointer to the current singleton, if one exists. If none exists, this will return 0.
| float OpenGUI::ScreenManager::statGetFPS | ( | ) |
Returns the current FPS.
The FPS value returned is an average over the last 5 frames. If less than 5 frames have been rendered, then the average is based on as many frames as available. If no frames have been rendered, the returned value will be 0.0f.
The results of all statistics are dependent on the accuracy of the TimerManager. Feeding inaccurate information to TimerManager will result in inaccurate results for all statistics.
| void OpenGUI::ScreenManager::updateScreens | ( | ) |
performs an update on all screens that are auto updating
| void OpenGUI::ScreenManager::updateTime | ( | ) |
performs time injections on all screens that are auto timing using TimerManager as the time source