GUI Class Reference

#include <GUI.h>

List of all members.

Public Member Functions

 GUI ()
 ~GUI ()
bool handleClick (SelectableObject *_val)
 Handles what to do when a particular object is clicked on. This will be called from the input manager.
void updateKPH (int _val)
 Updates the speedo (when it's displayed);.
void updateLapCount (int _current, int _remaining)
 Updates the lap counter (when it's displayed);.
void updateTimer (Ogre::Real _best, Ogre::Real _current, Ogre::Real _overall)
 Updates the timer (when it's displayed);.
void updateGameState (gameState _val)
 Changes menus depending on game state.
void createNonSelectable (Ogre::String _name, Ogre::String _materialName, GameObject *_object, Ogre::Real _width, Ogre::Real _height, Ogre::Real _scaleFactor)
 Epic, ugly hacky function to make non selectable gui items.
void createSelectable (Ogre::String _name, Ogre::String _materialName, SelectableObject *_object, Ogre::Real _width, Ogre::Real _height, Ogre::Real _scaleFactor, Ogre::Vector3 _selectorScale=Ogre::Vector3::UNIT_SCALE)

Protected Member Functions

bool handleStartClick ()
 Handles the start button being clicked on. Called from handleClick.
bool handleCancelClick ()
 Handles the cancel button being clicked.
bool handleLapsLeftClick ()
bool handleLapsRightClick ()
bool handleNodesLeftClick ()
bool handleNodesRightClick ()
bool handleBuildClick ()

Protected Attributes

GameObjectm_mainLogo
Ogre::OverlayContainer * m_speedoContainer
Ogre::Overlay * m_speedo
Ogre::OverlayElement * m_speedoText
Ogre::OverlayContainer * m_timerContainer
Ogre::Overlay * m_timer
Ogre::OverlayElement * m_timerText
Ogre::OverlayContainer * m_lapContainer
Ogre::Overlay * m_lap
Ogre::OverlayElement * m_lapText
SelectableObjectm_start
SelectableObjectm_numLapsLeftArrow
GameObjectm_numLaps
GameObjectm_numLapsText
SelectableObjectm_numLapsRightArrow
Ogre::OverlayContainer * m_numLapsOverlayContainer
Ogre::Overlay * m_numLapsOverlay
Ogre::OverlayElement * m_numLapsOverlayText
int m_numLapsVal
Ogre::OverlayContainer * m_numNodesOverlayContainer
Ogre::Overlay * m_numNodesOverlay
Ogre::OverlayElement * m_numNodesOverlayText
int m_numNodesVal
SelectableObjectm_numNodesLeftArrow
GameObjectm_numNodes
GameObjectm_numNodesText
SelectableObjectm_numNodesRightArrow
SelectableObjectm_cancel
SelectableObjectm_edit
SelectableObjectm_build
GameObjectm_finish
Trackm_fakeTrack

Detailed Description

GUI Object - manages all the gui elements and when and where they should be displayed. Little bit hacky, but it does the trick. Ideally this would be handled through a scripting component for the various buttons, or individual button classes. In this case, it's hard coded.

Definition at line 18 of file GUI.h.


Constructor & Destructor Documentation

GUI::GUI (  ) 

Definition at line 5 of file GUI.cpp.

GUI::~GUI (  ) 

Definition at line 189 of file GUI.cpp.


Member Function Documentation

void GUI::createNonSelectable ( Ogre::String  _name,
Ogre::String  _materialName,
GameObject _object,
Ogre::Real  _width,
Ogre::Real  _height,
Ogre::Real  _scaleFactor 
)

Epic, ugly hacky function to make non selectable gui items.

Definition at line 194 of file GUI.cpp.

void GUI::createSelectable ( Ogre::String  _name,
Ogre::String  _materialName,
SelectableObject _object,
Ogre::Real  _width,
Ogre::Real  _height,
Ogre::Real  _scaleFactor,
Ogre::Vector3  _selectorScale = Ogre::Vector3::UNIT_SCALE 
)

Definition at line 212 of file GUI.cpp.

bool GUI::handleBuildClick (  )  [protected]

Definition at line 490 of file GUI.cpp.

bool GUI::handleCancelClick (  )  [protected]

Handles the cancel button being clicked.

Definition at line 440 of file GUI.cpp.

bool GUI::handleClick ( SelectableObject _val  ) 

Handles what to do when a particular object is clicked on. This will be called from the input manager.

Definition at line 343 of file GUI.cpp.

bool GUI::handleLapsLeftClick (  )  [protected]

Definition at line 446 of file GUI.cpp.

bool GUI::handleLapsRightClick (  )  [protected]

Definition at line 456 of file GUI.cpp.

bool GUI::handleNodesLeftClick (  )  [protected]

Definition at line 466 of file GUI.cpp.

bool GUI::handleNodesRightClick (  )  [protected]

Definition at line 478 of file GUI.cpp.

bool GUI::handleStartClick (  )  [protected]

Handles the start button being clicked on. Called from handleClick.

Definition at line 356 of file GUI.cpp.

void GUI::updateGameState ( gameState  _val  ) 

Changes menus depending on game state.

Definition at line 254 of file GUI.cpp.

void GUI::updateKPH ( int  _val  ) 

Updates the speedo (when it's displayed);.

Definition at line 245 of file GUI.cpp.

void GUI::updateLapCount ( int  _current,
int  _remaining 
)

Updates the lap counter (when it's displayed);.

Definition at line 367 of file GUI.cpp.

void GUI::updateTimer ( Ogre::Real  _best,
Ogre::Real  _current,
Ogre::Real  _overall 
)

Updates the timer (when it's displayed);.

Definition at line 402 of file GUI.cpp.


Member Data Documentation

Definition at line 98 of file GUI.h.

Definition at line 94 of file GUI.h.

Definition at line 96 of file GUI.h.

Track* GUI::m_fakeTrack [protected]

Definition at line 102 of file GUI.h.

GameObject* GUI::m_finish [protected]

Definition at line 100 of file GUI.h.

Ogre::Overlay* GUI::m_lap [protected]

Definition at line 69 of file GUI.h.

Ogre::OverlayContainer* GUI::m_lapContainer [protected]

Definition at line 68 of file GUI.h.

Ogre::OverlayElement* GUI::m_lapText [protected]

Definition at line 70 of file GUI.h.

Definition at line 58 of file GUI.h.

GameObject* GUI::m_numLaps [protected]

Definition at line 75 of file GUI.h.

Definition at line 74 of file GUI.h.

Ogre::Overlay* GUI::m_numLapsOverlay [protected]

Definition at line 80 of file GUI.h.

Ogre::OverlayContainer* GUI::m_numLapsOverlayContainer [protected]

Definition at line 79 of file GUI.h.

Ogre::OverlayElement* GUI::m_numLapsOverlayText [protected]

Definition at line 81 of file GUI.h.

Definition at line 77 of file GUI.h.

Definition at line 76 of file GUI.h.

int GUI::m_numLapsVal [protected]

Definition at line 82 of file GUI.h.

Definition at line 90 of file GUI.h.

Definition at line 89 of file GUI.h.

Ogre::Overlay* GUI::m_numNodesOverlay [protected]

Definition at line 85 of file GUI.h.

Ogre::OverlayContainer* GUI::m_numNodesOverlayContainer [protected]

Definition at line 84 of file GUI.h.

Ogre::OverlayElement* GUI::m_numNodesOverlayText [protected]

Definition at line 86 of file GUI.h.

Definition at line 92 of file GUI.h.

Definition at line 91 of file GUI.h.

int GUI::m_numNodesVal [protected]

Definition at line 87 of file GUI.h.

Ogre::Overlay* GUI::m_speedo [protected]

Definition at line 61 of file GUI.h.

Ogre::OverlayContainer* GUI::m_speedoContainer [protected]

Definition at line 60 of file GUI.h.

Ogre::OverlayElement* GUI::m_speedoText [protected]

Definition at line 62 of file GUI.h.

Definition at line 72 of file GUI.h.

Ogre::Overlay* GUI::m_timer [protected]

Definition at line 65 of file GUI.h.

Ogre::OverlayContainer* GUI::m_timerContainer [protected]

Definition at line 64 of file GUI.h.

Ogre::OverlayElement* GUI::m_timerText [protected]

Definition at line 66 of file GUI.h.


The documentation for this class was generated from the following files:
Generated on Fri Aug 20 08:28:49 2010 for VecTRacer by  doxygen 1.6.3