GuiClockHud

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

Inherit:
GuiControl

Description

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

Example:

newGuiClockHud(){
   fillColor = "0.0 1.0 0.0 1.0"; // Fills with a solid green colorframeColor = "1.0 1.0 1.0 1.0"; // Solid white frame colortextColor = "1.0 1.0 1.0 1.0"; // Solid white text ColorshowFill = "true";
   showFrame = "true";
};

Methods

float GuiClockHud::getTime()

Returns the current time, in seconds.

Returns:timeInseconds Current time, in seconds

Example:

// Get the current time from the GuiClockHud control
%timeInSeconds = %guiClockHud.getTime();
void GuiClockHud::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)
void GuiClockHud::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)

Example:

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

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

Fields

ColorF GuiClockHud::fillColor

Standard color for the background of the control.

ColorF GuiClockHud::frameColor

Color for the control’s frame.

bool GuiClockHud::showFill

If true, draws a background color behind the control.

bool GuiClockHud::showFrame

If true, draws a frame around the control.

ColorF GuiClockHud::textColor

Color for the text on this control.