#include <HealthBar.h>
Public Member Functions | |
HealthBar (Ogre::ManualObject *mObj, float percent, bool startOnLeft) | |
HealthBar (const HealthBar &orig) | |
virtual | ~HealthBar () |
void | Draw (Ogre::Vector3 pos) |
void | Hide () |
void | ClearVertices () |
HealthBar (Ogre::ManualObject *mObj, float percent, bool startOnLeft) | |
HealthBar (const HealthBar &orig) | |
virtual | ~HealthBar () |
void | Draw (Ogre::Vector3 pos) |
void | Hide () |
void | ClearVertices () |
HealthBar (Ogre::ManualObject *mObj, float percent, bool startOnLeft) | |
HealthBar (const HealthBar &orig) | |
virtual | ~HealthBar () |
void | Draw (Ogre::Vector3 pos) |
void | Hide () |
void | ClearVertices () |
HealthBar (Ogre::ManualObject *mObj, float percent, bool startOnLeft) | |
HealthBar (const HealthBar &orig) | |
virtual | ~HealthBar () |
void | Draw (Ogre::Vector3 pos) |
void | Hide () |
void | ClearVertices () |
HealthBar (Ogre::ManualObject *mObj, float percent, bool startOnLeft) | |
HealthBar (const HealthBar &orig) | |
virtual | ~HealthBar () |
void | Draw (Ogre::Vector3 pos) |
void | Hide () |
void | ClearVertices () |
Public Attributes | |
Rect * | fullBar |
Rect * | emptyBar |
float | percent |
bool | startOnLeft |
Rect * | fullBar |
Rect * | emptyBar |
Rect * | fullBar |
Rect * | emptyBar |
Rect * | fullBar |
Rect * | emptyBar |
Rect * | fullBar |
Rect * | emptyBar |
Definition at line 17 of file HealthBar.h.
HealthBar::HealthBar | ( | Ogre::ManualObject * | mObj, | |
float | percent = 100.0f , |
|||
bool | startOnLeft = true | |||
) |
Constructs an object for displaying a set of health bars
mObj | A pointer to an object containing all the vertices of all health bars to draw. | |
percent | the default percent at which the health bar shoul be "filled" | |
startOnLeft | switch that determines if the health bar fills from the right or left |
Definition at line 10 of file HealthBar.cpp.
HealthBar::HealthBar | ( | const HealthBar & | orig | ) |
Definition at line 16 of file HealthBar.cpp.
HealthBar::~HealthBar | ( | ) | [virtual] |
Definition at line 20 of file HealthBar.cpp.
HealthBar::HealthBar | ( | Ogre::ManualObject * | mObj, | |
float | percent, | |||
bool | startOnLeft | |||
) |
Constructs an object for displaying a set of health bars
mObj | A pointer to an object containing all the vertices of all health bars to draw. | |
percent | the default percent at which the health bar shoul be "filled" | |
startOnLeft | switch that determines if the health bar fills from the right or left |
HealthBar::HealthBar | ( | const HealthBar & | orig | ) |
virtual HealthBar::~HealthBar | ( | ) | [virtual] |
HealthBar::HealthBar | ( | Ogre::ManualObject * | mObj, | |
float | percent, | |||
bool | startOnLeft | |||
) |
Constructs an object for displaying a set of health bars
mObj | A pointer to an object containing all the vertices of all health bars to draw. | |
percent | the default percent at which the health bar shoul be "filled" | |
startOnLeft | switch that determines if the health bar fills from the right or left |
HealthBar::HealthBar | ( | const HealthBar & | orig | ) |
virtual HealthBar::~HealthBar | ( | ) | [virtual] |
HealthBar::HealthBar | ( | Ogre::ManualObject * | mObj, | |
float | percent, | |||
bool | startOnLeft | |||
) |
Constructs an object for displaying a set of health bars
mObj | A pointer to an object containing all the vertices of all health bars to draw. | |
percent | the default percent at which the health bar shoul be "filled" | |
startOnLeft | switch that determines if the health bar fills from the right or left |
HealthBar::HealthBar | ( | const HealthBar & | orig | ) |
virtual HealthBar::~HealthBar | ( | ) | [virtual] |
HealthBar::HealthBar | ( | Ogre::ManualObject * | mObj, | |
float | percent, | |||
bool | startOnLeft | |||
) |
Constructs an object for displaying a set of health bars
mObj | A pointer to an object containing all the vertices of all health bars to draw. | |
percent | the default percent at which the health bar shoul be "filled" | |
startOnLeft | switch that determines if the health bar fills from the right or left |
HealthBar::HealthBar | ( | const HealthBar & | orig | ) |
virtual HealthBar::~HealthBar | ( | ) | [virtual] |
void HealthBar::Draw | ( | Ogre::Vector3 | pos | ) |
Adds a new HealthBar to be drawn at the given position. The proportion of the red/green bars is determined by percent.
ClearVirtices
pos | The position at which to draw the health bar. |
Definition at line 24 of file HealthBar.cpp.
References Rect::Draw(), emptyBar, fullBar, Rect::length, and percent.
Referenced by OgreGFX::UIMgr::decorateSelectedEntities().
void HealthBar::Hide | ( | ) | [inline] |
Makes the health bar objects invisible, without actually destroying the vertices used to draw the rectangles.
ClearVirtices
Definition at line 49 of file HealthBar.h.
References emptyBar, fullBar, and Rect::Hide().
void HealthBar::ClearVertices | ( | ) |
Deletes all health bars drawn in an object.
Definition at line 40 of file HealthBar.cpp.
References Rect::ClearVertices(), emptyBar, and fullBar.
Referenced by OgreGFX::UIMgr::frameEnded().
void HealthBar::Draw | ( | Ogre::Vector3 | pos | ) |
void HealthBar::Hide | ( | ) | [inline] |
Makes the health bar objects invisible, without actually destroying the vertices used to draw the rectangles.
ClearVirtices
Definition at line 49 of file HealthBar.h.
References emptyBar, fullBar, and Rect::Hide().
void HealthBar::Draw | ( | Ogre::Vector3 | pos | ) |
void HealthBar::Hide | ( | ) | [inline] |
Makes the health bar objects invisible, without actually destroying the vertices used to draw the rectangles.
ClearVirtices
Definition at line 49 of file HealthBar.h.
References emptyBar, fullBar, and Rect::Hide().
void HealthBar::Draw | ( | Ogre::Vector3 | pos | ) |
void HealthBar::Hide | ( | ) | [inline] |
Makes the health bar objects invisible, without actually destroying the vertices used to draw the rectangles.
ClearVirtices
Definition at line 49 of file HealthBar.h.
References emptyBar, fullBar, and Rect::Hide().
void HealthBar::Draw | ( | Ogre::Vector3 | pos | ) |
void HealthBar::Hide | ( | ) | [inline] |
Makes the health bar objects invisible, without actually destroying the vertices used to draw the rectangles.
ClearVirtices
Definition at line 49 of file HealthBar.h.
References emptyBar, fullBar, and Rect::Hide().
A green rectangle that represents the "full" part of the bar.
Definition at line 31 of file HealthBar.h.
Referenced by ClearVertices(), Draw(), Hide(), and OgreGFX::UIMgr::UIMgr().
float HealthBar::percent |
A red rectangle connected to the green rectangle, representing the "empty" part of the bar
Definition at line 32 of file HealthBar.h.
Referenced by OgreGFX::UIMgr::decorateSelectedEntities(), and Draw().
Percent of the bar that should be shown as full.
Definition at line 33 of file HealthBar.h.
Definition at line 30 of file HealthBar.h.
A green rectangle that represents the "full" part of the bar.
Definition at line 31 of file HealthBar.h.
Definition at line 30 of file HealthBar.h.
A green rectangle that represents the "full" part of the bar.
Definition at line 31 of file HealthBar.h.
Definition at line 30 of file HealthBar.h.
A green rectangle that represents the "full" part of the bar.
Definition at line 31 of file HealthBar.h.
Definition at line 30 of file HealthBar.h.
A green rectangle that represents the "full" part of the bar.
Definition at line 31 of file HealthBar.h.