Orxonox: orxonox::OverlayText Class Reference

# orxonox::OverlayText Class Reference

`#include <src/orxonox/overlays/OverlayText.h>`

Inheritance diagram for orxonox::OverlayText:

List of all members.

## Public Types

enum | Alignment { Left, Right, Center }

## Public Member Functions

OverlayText::Alignment | getAlignment () const
std::string | getAlignmentString () const
std::string | getCaption () const
const ColourValue & | getColour () const
const std::string & | getFont () const
float | getSpaceWidth () const
float | getTextSize () const
| OverlayText (BaseObject *creator)
void | setAlignment (OverlayText::Alignment alignment)
void | setAlignmentString (const std::string &alignment)
void | setCaption (const std::string &caption)
void | setColour (const ColourValue &colour)
void | setFont (const std::string &font)
void | setSpaceWidth (float width)
void | setTextSize (float size)
virtual void | XMLPort (Element &xmlElement, XMLPort::Mode mode)
| Loads the OrxonoxOverlay.
virtual | ~OverlayText ()

## Protected Member Functions

virtual void | changedCaption ()
virtual void | changedColour ()
virtual void | sizeChanged ()
| Sets the overlay size using the actual corrected size.

## Protected Attributes

Ogre::TextAreaOverlayElement * | text_

## Member Enumeration Documentation

enum orxonox::OverlayText::Alignment

Enumerator:

  Left |
  Right |
  Center |

## Constructor & Destructor Documentation

orxonox::OverlayText::OverlayText | ( | BaseObject * | creator | ) |

References orxonox::OrxonoxOverlay::background_, orxonox::MT_Type::ColourValue, orxonox::getUniqueNumberString(), RegisterObject, setAlignmentString(), setCaption(), setColour(), setFont(), setTextSize(), and text_.

orxonox::OverlayText::~OverlayText | ( |  | ) | `[virtual]`

References orxonox::BaseObject::isInitialized(), and text_.

## Member Function Documentation

virtual void orxonox::OverlayText::changedCaption | ( |  | ) | `[inline, protected, virtual]`

Reimplemented in orxonox::FadeoutText.

Referenced by orxonox::FadeoutText::changedCaption(), and setCaption().

virtual void orxonox::OverlayText::changedColour | ( |  | ) | `[inline, protected, virtual]`

Reimplemented in orxonox::FadeoutText.

Referenced by orxonox::FadeoutText::changedColour(), and setColour().

OverlayText::Alignment orxonox::OverlayText::getAlignment | ( |  | ) | const

References text_.

std::string orxonox::OverlayText::getAlignmentString | ( |  | ) | const

References orxonox::MouseButtonCode::Left, orxonox::MouseButtonCode::Right, and text_.

Referenced by XMLPort().

std::string orxonox::OverlayText::getCaption | ( |  | ) | const

References text_.

Referenced by XMLPort().

const ColourValue & orxonox::OverlayText::getColour | ( |  | ) | const

References text_.

Referenced by orxonox::FadeoutText::changedColour(), orxonox::FadeoutText::reset(), orxonox::FadeoutText::tick(), and XMLPort().

const std::string & orxonox::OverlayText::getFont | ( |  | ) | const

References text_.

Referenced by XMLPort().

float orxonox::OverlayText::getSpaceWidth | ( |  | ) | const

References text_.

Referenced by XMLPort().

float orxonox::OverlayText::getTextSize | ( |  | ) | const`[inline]`

Referenced by XMLPort().

void orxonox::OverlayText::setAlignment | ( | OverlayText::Alignment | alignment | ) |

References text_.

Referenced by setAlignmentString().

void orxonox::OverlayText::setAlignmentString | ( | const std::string & | alignment | ) |

References Center, Left, Right, and setAlignment().

Referenced by OverlayText(), orxonox::UnderAttackHealthBar::UnderAttackHealthBar(), and XMLPort().

void orxonox::OverlayText::setCaption | ( | const std::string & | caption | ) |

References changedCaption(), and text_.

Referenced by orxonox::AnnounceMessage::announcemessage(), orxonox::UnderAttackHealthBar::changedOwner(), orxonox::DeathMessage::deathmessage(), orxonox::HUDHealthBar::HUDHealthBar(), orxonox::KillMessage::killmessage(), OverlayText(), orxonox::NotificationOverlay::processNotification(), orxonox::CreateLines::setDeaths(), orxonox::CreateLines::setPlayerName(), orxonox::CreateLines::setScore(), orxonox::TeamBaseMatchScore::tick(), orxonox::PongScore::tick(), orxonox::HUDTimer::tick(), orxonox::HUDHealthBar::tick(), orxonox::GametypeStatus::tick(), orxonox::DebugRTRText::tick(), orxonox::DebugFPSText::tick(), and XMLPort().

void orxonox::OverlayText::setColour | ( | const ColourValue & | colour | ) |

References changedColour(), and text_.

Referenced by orxonox::CreateLines::CreateLines(), OverlayText(), orxonox::HUDHealthBar::setTextColour(), orxonox::HUDHealthBar::setTextUseBarColour(), orxonox::HUDHealthBar::tick(), orxonox::UnderAttackHealthBar::UnderAttackHealthBar(), and XMLPort().

void orxonox::OverlayText::setFont | ( | const std::string & | font | ) |

References text_.

Referenced by orxonox::NotificationOverlay::defineOverlay(), OverlayText(), orxonox::UnderAttackHealthBar::UnderAttackHealthBar(), and XMLPort().

void orxonox::OverlayText::setSpaceWidth | ( | float | width | ) |

References text_.

Referenced by XMLPort().

void orxonox::OverlayText::setTextSize | ( | float | size | ) | `[inline]`

References orxonox::MT_Type::Vector2.

Referenced by orxonox::CreateLines::CreateLines(), orxonox::NotificationOverlay::defineOverlay(), OverlayText(), orxonox::UnderAttackHealthBar::UnderAttackHealthBar(), and XMLPort().

void orxonox::OverlayText::sizeChanged | ( |  | ) | `[protected, virtual]`

Sets the overlay size using the actual corrected size.

Reimplemented from orxonox::OrxonoxOverlay.

References orxonox::OrxonoxOverlay::Horizontal, orxonox::OrxonoxOverlay::overlay_, orxonox::OrxonoxOverlay::positionChanged(), orxonox::OrxonoxOverlay::rotState_, orxonox::OrxonoxOverlay::size_, orxonox::OrxonoxOverlay::sizeCorrection_, and orxonox::OrxonoxOverlay::Vertical.

void orxonox::OverlayText::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::FadeoutText, orxonox::PongScore, and orxonox::TeamBaseMatchScore.

References getAlignmentString(), getCaption(), getColour(), getFont(), getSpaceWidth(), getTextSize(), setAlignmentString(), setCaption(), setColour(), setFont(), setSpaceWidth(), setTextSize(), SUPER, and XMLPortParam.

## Member Data Documentation

Ogre::TextAreaOverlayElement* orxonox::OverlayText::text_`[protected]`

Referenced by getAlignment(), getAlignmentString(), getCaption(), getColour(), getFont(), getSpaceWidth(), OverlayText(), orxonox::FadeoutText::reset(), setAlignment(), setCaption(), setColour(), setFont(), setSpaceWidth(), orxonox::FadeoutText::tick(), orxonox::ChatOverlay::updateOverlayText(), and ~OverlayText().

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

- src/orxonox/overlays/OverlayText.h
- src/orxonox/overlays/OverlayText.cc