Torque3D Documentation / _generateds / GuiCrossHairHud

GuiCrossHairHud

consoledoc.h

Basic cross hair hud. Reacts to state of control object. Also displays health bar for named objects under the cross hair.

More...

Damage

LinearColorF

As the health bar depletes, this color will represent the health loss amount.

LinearColorF

Color for the health bar's frame.

Point2I

Size for the health bar portion of the control.

Point2I

Offset for drawing the damage portion of the health control.

Detailed Description

Basic cross hair hud. Reacts to state of control object. Also displays health bar for named objects under the cross hair.

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.

 new GuiCrossHairHud(){
   damageFillColor = "1.0 0.0 0.0 1.0"; // Fills with a solid red color
   damageFrameColor = "1.0 1.0 1.0 1.0"; // Solid white frame color
   damageRect = "15 5";
   damageOffset = "0 -10";
};

Damage

LinearColorF damageFillColor 

As the health bar depletes, this color will represent the health loss amount.

LinearColorF damageFrameColor 

Color for the health bar's frame.

Point2I damageRect 

Size for the health bar portion of the control.

Point2I damageOffset 

Offset for drawing the damage portion of the health control.