![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
The UI manager. More...
#include <UiManager.h>
Classes | |
struct | UiPrototype |
A UI prototype. More... | |
Public Member Functions | |
UiManager () | |
Constructor. More... | |
virtual | ~UiManager () |
Destructor. More... | |
void | Initialise () |
Initializes the manager. More... | |
void | Input (const VGears::Event &event) override |
Handles an input event. More... | |
void | UpdateDebug () override |
Updates the elements in the manager with debug information. More... | |
void | OnResize () |
Handles resizing events. More... | |
void | ClearField () override |
Clears all field UI elements in the manager. More... | |
void | ClearBattle () override |
Clears all battle UI elements in the manager. More... | |
void | ClearWorld () override |
Clears all world map UI elements in the manager. More... | |
void | AddFont (UiFont *font) |
Adds a font to the manager. More... | |
UiFont * | GetFont (const Ogre::String &name) |
Retrieves a font by name. More... | |
void | AddPrototype (const Ogre::String &name, TiXmlNode *prototype) |
Adds a prototype to the manager. More... | |
TiXmlNode * | GetPrototype (const Ogre::String &name) const |
Retrieves a prototype by name. More... | |
void | AddWidget (UiWidget *widget) |
Adds a UI widget to the manager. More... | |
UiWidget * | GetWidget (const Ogre::String &name) |
Retrieves a UI widget by name. More... | |
UiWidget * | ScriptGetWidget (const char *name) |
Retrieves a UI widget by name. More... | |
void | renderQueueStarted (Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool &skipThisInvocation) |
Updates the render queue. More... | |
![]() | |
Manager () | |
Constructor. More... | |
virtual | ~Manager () |
Destructor. More... | |
Module | GetModule () const |
Retrieves the currently selected module. More... | |
bool | IsModule (const Module module) const |
Checks the currently selected module. More... | |
bool | IsFieldModule () const |
Checks if the currently selected module is the field module. More... | |
bool | IsBattleModule () const |
Checks if the currently selected module is the battle module. More... | |
bool | IsWorldModule () const |
Checks if the currently selected module is the world module. More... | |
void | SetModule (const Module module) |
Sets the current module for the entity manager. More... | |
void | SetFieldModule () |
Sets the current module to the field mode. More... | |
void | SetBattleModule () |
Sets the current module to the battle mode. More... | |
void | SetWorldModule () |
Sets the current module to the world map mode. More... | |
void | SetPreviousModule () |
Sets the module that was loaded before a battle. More... | |
virtual void | Input (const VGears::Event &event)=0 |
Handles an input event. More... | |
void | Update () |
Called every frame, performs an update on the things controlled by the manager. More... | |
virtual void | UpdateDebug ()=0 |
Called every frame, performs an update on the things controlled by the manager. More... | |
virtual void | OnResize ()=0 |
Handles resizing events. More... | |
void | Clear () |
Clears the manager. More... | |
void | Clear (const Module module) |
Clears the manager. More... | |
virtual void | ClearField ()=0 |
Clear all field information in the manager. More... | |
virtual void | ClearBattle ()=0 |
Clear all battle information in the manager. More... | |
virtual void | ClearWorld ()=0 |
Clear all world map information in the manager. More... | |
void | ClearAll () |
Clears the manager. More... | |
void | ScriptSetPaused (const bool paused) |
Handles game pausing. More... | |
Private Member Functions | |
void | UpdateField () override |
Updates the field UI elements in the manager. More... | |
void | UpdateBattle () override |
Updates the battle UI elements in the manager. More... | |
void | UpdateWorld () override |
Updates the world map UI elements in the manager. More... | |
Private Attributes | |
std::vector< UiFont * > | fonts_ |
List of fonts in the manager. More... | |
std::vector< UiPrototype > | prototypes_ |
List of prototypes. More... | |
std::vector< UiWidget * > | widgets_ |
List of widgets. More... | |
Additional Inherited Members | |
![]() | |
enum | Module { FIELD = 0 , BATTLE = 1 , WORLD = 2 } |
The modules the entity manager can handle. More... | |
![]() | |
virtual void | UpdateField ()=0 |
Updates the field entities in the manager. More... | |
virtual void | UpdateBattle ()=0 |
Updates the battle entities in the manager. More... | |
virtual void | UpdateWorld ()=0 |
Updates the world map entities in the manager. More... | |
void | Update (Module module) |
Updates the entities of one module in the manager. More... | |
![]() | |
Module | module_ |
The currently selected module. More... | |
Module | prev_module_ |
The previous module. More... | |
bool | paused_ |
Indicates if the game is paused. More... | |
The UI manager.
UiManager::UiManager | ( | ) |
Constructor.
|
virtual |
Destructor.
void UiManager::AddFont | ( | UiFont * | font | ) |
Adds a font to the manager.
[in] | font | The font to add. |
void UiManager::AddPrototype | ( | const Ogre::String & | name, |
TiXmlNode * | prototype | ||
) |
Adds a prototype to the manager.
[in] | name | The prototype manager. |
[in] | prototype | The prototyme, as an XML node. |
void UiManager::AddWidget | ( | UiWidget * | widget | ) |
Adds a UI widget to the manager.
[in] | widget | The widget to add. |
|
overridevirtual |
Clears all battle UI elements in the manager.
Implements Manager.
|
overridevirtual |
Clears all field UI elements in the manager.
Implements Manager.
|
overridevirtual |
Clears all world map UI elements in the manager.
Implements Manager.
UiFont * UiManager::GetFont | ( | const Ogre::String & | name | ) |
Retrieves a font by name.
[in] | name | Name of the font. |
TiXmlNode * UiManager::GetPrototype | ( | const Ogre::String & | name | ) | const |
Retrieves a prototype by name.
[in] | name | Name of the prototype. |
UiWidget * UiManager::GetWidget | ( | const Ogre::String & | name | ) |
Retrieves a UI widget by name.
[in] | name | Name of the widget. |
void UiManager::Initialise | ( | ) |
Initializes the manager.
Loads all available fonts and screens from _fonts.xml and screens.xml, respectably.
|
overridevirtual |
|
virtual |
Handles resizing events.
Implements Manager.
void UiManager::renderQueueStarted | ( | Ogre::uint8 | queueGroupId, |
const Ogre::String & | invocation, | ||
bool & | skipThisInvocation | ||
) |
Updates the render queue.
[in] | queueGroupId | The queue group ID. |
[in] | invocation | Unused. |
[in] | skipThisInvocation | Unused. |
UiWidget * UiManager::ScriptGetWidget | ( | const char * | name | ) |
Retrieves a UI widget by name.
[in] | name | Name of the widget. |
|
overrideprivatevirtual |
Updates the battle UI elements in the manager.
Implements Manager.
|
overridevirtual |
Updates the elements in the manager with debug information.
Implements Manager.
|
overrideprivatevirtual |
Updates the field UI elements in the manager.
Implements Manager.
|
overrideprivatevirtual |
Updates the world map UI elements in the manager.
Implements Manager.
|
private |
List of fonts in the manager.
|
private |
List of prototypes.
|
private |
List of widgets.