GuiClockHud

consoledoc.h

Basic HUD clock. Displays the current simulation time offset from some base.

More...

Misc

bool

If true, draws a background color behind the control.

bool

If true, draws a frame around the control.

LinearColorF

Standard color for the background of the control.

LinearColorF

Color for the control's frame.

LinearColorF

Color for the text on this control.

Public Functions

float

Returns the current time, in seconds.

void
setReverseTime(float timeInSeconds)

Sets a time for a countdown clock.

void
setTime(float timeInSeconds)

Sets the current base time for the clock.

Detailed Description

Basic HUD clock. Displays the current simulation time offset from some base.

 new GuiClockHud(){
   fillColor = "0.0 1.0 0.0 1.0"; // Fills with a solid green color
   frameColor = "1.0 1.0 1.0 1.0"; // Solid white frame color
   textColor = "1.0 1.0 1.0 1.0"; // Solid white text Color
   showFill = "true";
   showFrame = "true";
};

Misc

bool showFill 

If true, draws a background color behind the control.

bool showFrame 

If true, draws a frame around the control.

LinearColorF fillColor 

Standard color for the background of the control.

LinearColorF frameColor 

Color for the control's frame.

LinearColorF textColor 

Color for the text on this control.

Public Functions

getTime()

Returns the current time, in seconds.

return:

timeInseconds Current time, in seconds

// Get the current time from the GuiClockHud control
%timeInSeconds = %guiClockHud.getTime();

setReverseTime(float timeInSeconds)

Sets a time for a countdown clock.

Setting the time like this will cause the clock to count backwards from the specified time.

Parameters:

timeInSeconds

Time to set the clock, in seconds (IE: 00:02 would be 120)

setTime(float timeInSeconds)

Sets the current base time for the clock.

Parameters:

timeInSeconds

Time to set the clock, in seconds (IE: 00:02 would be 120)

// Define the time, in seconds
%timeInSeconds = 120;

// Change the time on the GuiClockHud control
%guiClockHud.setTime(%timeInSeconds);