afxGuiTextHud
Engine/source/afx/ui/afxGuiTextHud.h
Displays name & damage above shape objects.
Classes:
Private Types
Parent
Private Static Attributes
Vector< HudTextSpec >
Private Attributes
Protected Functions
Public Functions
DECLARE_CATEGORY("AFX" )
Public Static Functions
addTextItem(const Point3F & pos, const char * text, LinearColorF & color, SceneObject * obj)
Detailed Description
Displays name & damage above shape objects.
This control displays the name and damage value of all named ShapeBase objects on the client. The name and damage of objects within the control's display area are overlayed above the object.
This GUI control must be a child of a TSControl, and a server connection and control object must be present.
This is a stand-alone control and relies only on the standard base GuiControl.
Private Types
typedef GuiControl Parent
Private Static Attributes
Vector< HudTextSpec > text_items
Private Attributes
F32 mDistanceFade
bool mEnableControlObjectOcclusion
LinearColorF mFillColor
LinearColorF mFrameColor
bool mLabelAllShapes
bool mShowFill
bool mShowFrame
LinearColorF mTextColor
F32 mVerticalOffset
Protected Functions
drawName(Point2I offset, const char * buf, F32 opacity, LinearColorF * color)
Render object names.
Helper function for GuiShapeNameHud::onRender
Parameters:
offset | Screen coordinates to render name label. (Text is centered horizontally about this location, with bottom of text at specified y position.) |
name | String name to display. |
opacity | Opacity of name (a fraction). |
Public Functions
afxGuiTextHud()
DECLARE_CATEGORY("AFX" )
DECLARE_CONOBJECT(afxGuiTextHud )
onRender(Point2I offset, const RectI & updateRect)
Reimplemented from: GuiControl
Public Static Functions
addTextItem(const Point3F & pos, const char * text, LinearColorF & color, SceneObject * obj)
initPersistFields()
reset()