#include <src/orxonox/overlays/OverlayText.h>
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_ |
orxonox::OverlayText::OverlayText | ( | BaseObject * | creator | ) |
orxonox::OverlayText::~OverlayText | ( | ) | [virtual] |
References orxonox::BaseObject::isInitialized(), and text_.
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 |
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 |
float orxonox::OverlayText::getTextSize | ( | ) | const [inline] |
Referenced by XMLPort().
void orxonox::OverlayText::setAlignment | ( | OverlayText::Alignment | alignment | ) |
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 | ) |
void orxonox::OverlayText::setFont | ( | const std::string & | font | ) |
References text_.
Referenced by orxonox::NotificationOverlay::defineOverlay(), OverlayText(), orxonox::UnderAttackHealthBar::UnderAttackHealthBar(), and XMLPort().
void orxonox::OverlayText::setTextSize | ( | float | size | ) | [inline] |
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.
xmlelement | The XML-element | |
loading | Loading (true) or saving (false) |
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.
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().