#include <CenterScreenDisplay.h>
Inheritance diagram for random_racer::CenterScreenDisplay:

Public Member Functions | |
| CenterScreenDisplay (VRS::SO< VRS::Canvas > canvas) | |
| Ctor. | |
| virtual | ~CenterScreenDisplay () |
| Dtor. | |
| void | showText (unsigned int msecs, const std::string &line1, const std::string &line2=std::string()) |
| Shows the given 2 lines of text for msecs milliseconds. | |
Private Member Functions | |
| virtual void | timerTick () |
| This is the method the timer calls and which fades out the text periodically. | |
| void | handleResizeEvents () |
| This class replaces the camera on ResizeEvents, so that the text always stays at the same size in the center of the screen. | |
Private Attributes | |
| VRS::SO< VRS::SceneThing > | m_thing |
| VRS::SO< VRS::Font > | m_font |
| VRS::SO< VRS::BehaviorCallback > | m_eventCallback |
| VRS::SO< VRS::Camera > | m_cam |
| VRS::SO< VRS::ShapeMaterialGL > | m_material |
| VRS::SO< VRS::Text > | m_line1 |
| VRS::SO< VRS::Text > | m_line2 |
| bool | m_newTimer |
Static Private Attributes | |
| static const float | c_pixelsPerChar |
Definition at line 30 of file CenterScreenDisplay.h.
| random_racer::CenterScreenDisplay::CenterScreenDisplay | ( | VRS::SO< VRS::Canvas > | canvas | ) |
Ctor.
| random_racer::CenterScreenDisplay::~CenterScreenDisplay | ( | ) | [virtual] |
| void random_racer::CenterScreenDisplay::timerTick | ( | ) | [private, virtual] |
This is the method the timer calls and which fades out the text periodically.
Implements random_utils::TimeableObject.
Definition at line 73 of file CenterScreenDisplay.cpp.
References m_material, m_newTimer, m_thing, random_utils::TimeableObject::startTimer(), and random_utils::TimeableObject::stopTimer().
Here is the call graph for this function:

| void random_racer::CenterScreenDisplay::handleResizeEvents | ( | ) | [private] |
This class replaces the camera on ResizeEvents, so that the text always stays at the same size in the center of the screen.
Definition at line 103 of file CenterScreenDisplay.cpp.
References c_pixelsPerChar, m_cam, m_eventCallback, and m_thing.
| void random_racer::CenterScreenDisplay::showText | ( | unsigned int | msecs, | |
| const std::string & | line1, | |||
| const std::string & | line2 = std::string() | |||
| ) |
Shows the given 2 lines of text for msecs milliseconds.
Definition at line 124 of file CenterScreenDisplay.cpp.
References m_line1, m_line2, m_material, m_newTimer, m_thing, and random_utils::TimeableObject::startTimer().
Here is the call graph for this function:

VRS::SO<VRS::SceneThing> random_racer::CenterScreenDisplay::m_thing [private] |
Definition at line 33 of file CenterScreenDisplay.h.
Referenced by handleResizeEvents(), showText(), and timerTick().
VRS::SO<VRS::Font> random_racer::CenterScreenDisplay::m_font [private] |
Definition at line 34 of file CenterScreenDisplay.h.
VRS::SO<VRS::BehaviorCallback> random_racer::CenterScreenDisplay::m_eventCallback [private] |
VRS::SO<VRS::Camera> random_racer::CenterScreenDisplay::m_cam [private] |
VRS::SO<VRS::ShapeMaterialGL> random_racer::CenterScreenDisplay::m_material [private] |
VRS::SO<VRS::Text> random_racer::CenterScreenDisplay::m_line1 [private] |
VRS::SO<VRS::Text> random_racer::CenterScreenDisplay::m_line2 [private] |
bool random_racer::CenterScreenDisplay::m_newTimer [private] |
const float random_racer::CenterScreenDisplay::c_pixelsPerChar [static, private] |
1.5.1