Torque3D Documentation / _generateds / GuiCrossHairHud

GuiCrossHairHud

Engine/source/T3D/fps/guiCrossHairHud.cpp

Vary basic cross hair hud.

More...

Private Types

Protected Functions

drawDamage(Point2I offset, F32 damage, F32 opacity)

Display a damage bar ubove the shape.

Public Functions

DECLARE_CATEGORY("Gui Game" )
DECLARE_DESCRIPTION("Basic cross hair hud. Reacts <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> state of <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object.\n</a>" "Also displays health bar <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> named objects under the cross hair." )
onRender(Point2I offset, const RectI & updateRect)

Called when this control is to render itself.

Public Static Functions

Detailed Description

Vary basic cross hair hud.

Uses the base bitmap control to render a bitmap, and decides whether to draw or not depending on the current control object and it's state. If there is ShapeBase object under the cross hair and it's named, then a small health bar is displayed.

Private Types

typedef GuiBitmapCtrl Parent 

Private Attributes

LinearColorF mDamageFillColor 
LinearColorF mDamageFrameColor 
Point2I mDamageOffset 
Point2I mDamageRectSize 

Protected Functions

drawDamage(Point2I offset, F32 damage, F32 opacity)

Display a damage bar ubove the shape.

This is a support funtion, called by onRender.

Public Functions

GuiCrossHairHud()

DECLARE_CATEGORY("Gui Game" )

DECLARE_CONOBJECT(GuiCrossHairHud )

DECLARE_DESCRIPTION("Basic cross hair hud. Reacts <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> state of <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">object.\n</a>" "Also displays health bar <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> named objects under the cross hair." )

onRender(Point2I offset, const RectI & updateRect)

Reimplemented from: GuiBitmapCtrl

Public Static Functions

initPersistFields()