orxonox::HUDBar Class Reference

#include <src/orxonox/overlays/hud/HUDBar.h>

Inheritance diagram for orxonox::HUDBar:

orxonox::OrxonoxOverlay orxonox::BaseObject orxonox::WindowEventListener orxonox::OrxonoxClass orxonox::OrxonoxClass orxonox::HUDHealthBar orxonox::HUDSpeedBar orxonox::UnderAttackHealthBar

List of all members.

Public Member Functions

void clearColours ()
bool getAutoColour () const
const std::stringgetBarTexture () const
const ColourValue & getCurrentBarColour () const
bool getRightToLeft () const
float getValue () const
 HUDBar (BaseObject *creator)
void setAutoColour (bool val)
void setBarTexture (const std::string &texture)
void setRightToLeft (bool r2l)
void setValue (float value)
virtual void XMLPort (Element &xmlElement, XMLPort::Mode mode)
 Loads the OrxonoxOverlay.
virtual ~HUDBar ()

Protected Member Functions

virtual void valueChanged ()

Private Member Functions

void addColour (BarColour *colour)
BarColourgetColour (unsigned int index)

Private Attributes

bool autoColour_
 whether bar changes colour automatically
Ogre::PanelOverlayElement * bar_
std::vector< BarColour * > barColours_
std::map< float, ColourValue > colours_
ColourValue currentColour_
bool right2Left_
Ogre::TextureUnitState * textureUnitState_
float value_
 progress of bar

Static Private Attributes

static unsigned int materialcount_s = 0


Constructor & Destructor Documentation

orxonox::HUDBar::HUDBar ( BaseObject creator  ) 

orxonox::HUDBar::~HUDBar (  )  [virtual]


Member Function Documentation

void orxonox::HUDBar::addColour ( BarColour colour  )  [private]

void orxonox::HUDBar::clearColours (  ) 

References colours_.

bool orxonox::HUDBar::getAutoColour (  )  const [inline]

Referenced by XMLPort().

const std::string & orxonox::HUDBar::getBarTexture (  )  const

References textureUnitState_.

Referenced by XMLPort().

BarColour * orxonox::HUDBar::getColour ( unsigned int  index  )  [private]

References barColours_.

Referenced by XMLPort().

const ColourValue& orxonox::HUDBar::getCurrentBarColour (  )  const [inline]

bool orxonox::HUDBar::getRightToLeft (  )  const [inline]

Referenced by XMLPort().

float orxonox::HUDBar::getValue (  )  const [inline]

Referenced by XMLPort().

void orxonox::HUDBar::setAutoColour ( bool  val  )  [inline]

Referenced by HUDBar(), and XMLPort().

void orxonox::HUDBar::setBarTexture ( const std::string texture  ) 

References textureUnitState_.

Referenced by XMLPort().

void orxonox::HUDBar::setRightToLeft ( bool  r2l  )  [inline]

Referenced by HUDBar(), and XMLPort().

void orxonox::HUDBar::setValue ( float  value  )  [inline]

void orxonox::HUDBar::valueChanged (  )  [protected, virtual]

void orxonox::HUDBar::XMLPort ( Element &  xmlElement,
XMLPort::Mode  mode 
) [virtual]

Loads the OrxonoxOverlay.

This has to be called before usage, otherwise strange behaviour is guaranteed! (there should be no segfaults however). XML loading and saving.

Parameters:
xmlelement The XML-element
loading Loading (true) or saving (false)
Returns:
The XML-element

Reimplemented from orxonox::OrxonoxOverlay.

Reimplemented in orxonox::HUDHealthBar, and orxonox::UnderAttackHealthBar.

References addColour(), getAutoColour(), getBarTexture(), getColour(), getRightToLeft(), getValue(), setAutoColour(), setBarTexture(), setRightToLeft(), setValue(), SUPER, XMLPortObject, and XMLPortParam.


Member Data Documentation

whether bar changes colour automatically

Referenced by valueChanged().

Ogre::PanelOverlayElement* orxonox::HUDBar::bar_ [private]

Referenced by HUDBar(), valueChanged(), and ~HUDBar().

std::vector<BarColour*> orxonox::HUDBar::barColours_ [private]

Referenced by addColour(), and getColour().

std::map<float, ColourValue> orxonox::HUDBar::colours_ [private]

ColourValue orxonox::HUDBar::currentColour_ [private]

Referenced by HUDBar(), and valueChanged().

unsigned int orxonox::HUDBar::materialcount_s = 0 [static, private]

Referenced by HUDBar().

Referenced by valueChanged().

Ogre::TextureUnitState* orxonox::HUDBar::textureUnitState_ [private]

float orxonox::HUDBar::value_ [private]

progress of bar

Referenced by HUDBar(), and valueChanged().


The documentation for this class was generated from the following files:

Generated on Tue Jul 28 16:22:35 2009 for Orxonox by  doxygen 1.5.6