|
VR-Engage
2.2
|
Renders a panel of text that can be updated with new lines
#include <debugRenderCommands.h>
Public Member Functions | |
| DebugDrawTextPanelCommand (const std::string &name, const DtColor &c, const double &time) | |
| virtual | ~DebugDrawTextPanelCommand () override |
| virtual void | draw (DtDebugCanvas &canvas) override |
| const std::string & | name () |
| void | addText (const std::string &point, bool scroll=false) |
| void | setScreenPosition (const DtVector &screenPos) |
Public Member Functions inherited from makVre::DtDebugDrawCommand | |
| DtDebugDrawCommand (DtColor color, DtColor::Fill fill, bool clip, const double &time, bool is3D) | |
| virtual | ~DtDebugDrawCommand () |
| virtual void | reduceTime (double delta) |
| virtual bool | ended () |
| virtual bool | get3D () |
Static Public Member Functions | |
| static float | thePanelSize () |
Protected Attributes | |
| double | myResetTime |
| std::string | myName |
| std::list< std::string > | myText |
| int | myCurrentText |
| DtVector | myScreenPosition |
Protected Attributes inherited from makVre::DtDebugDrawCommand | |
| DtVector | myEyepoint |
| DtColor | myColor |
| DtColor::Fill | myFill |
| double | myTime |
| bool | myClip |
| bool | my3D |
| makVre::DebugDrawTextPanelCommand::DebugDrawTextPanelCommand | ( | const std::string & | name, |
| const DtColor & | c, | ||
| const double & | time ) |
Constructor for text panel drawing command.
| name | Name of the text panel |
| c | Color of the text |
| time | Duration in seconds for this command to remain active |
References name().
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Pure virtual draw method that must be implemented by derived classes.
| drawList | Canvas to draw the debug visual on |
Implements makVre::DtDebugDrawCommand.
|
inline |
References myName.
Referenced by DebugDrawTextPanelCommand().
| void makVre::DebugDrawTextPanelCommand::addText | ( | const std::string & | point, |
| bool | scroll = false ) |
Adds a line of text to the panel.
| point | The text line to add |
| scroll | Whether to automatically scroll to show newest text |
|
inline |
References myScreenPosition.
|
inlinestatic |
Gets the default size of the text panel.
|
protected |
Time at which the panel should reset.
|
protected |
Name of the text panel.
Referenced by name().
|
protected |
Collection of text lines to display.
|
protected |
Current text index.
|
protected |
Position of the panel on the screen.
Referenced by setScreenPosition().