drawSubsystemStatus

open fun drawSubsystemStatus(ship: ShipAPI, fill: Float, name: String, extraText: String, extraTextColor: Color, stateText: String, hotkey: String, briefText: String, showInfoText: Boolean, guiBarCount: Int, inputLoc: Vector2f, extraBarPadding: Float, rootLoc: Vector2f): Vector2f

Draws the status bar for a basic subsystem, imitating the shipsystem UI. If show info mode is enabled, it will take up an additional UI slot.

If the subsystem script attempts to render additional HUD elements (e.g. using the renderAuxiliaryStatusBar method) then they will not have an effect on the output location. This must be predetermined by the input guiBarCount parameter to make room for them.

Return

The output location (bottom left) of GUI element

Author

tomatopaste

Parameters

ship

Player ship

fill

Value 0 to 1, how full the bar is from left to right

name

Name of subsystem

extraText

Info string opportunity. Appears to the right of the status bar.

extraTextColor

color of extraText. if null, uses standard text color

stateText

Subsystem activity status. Appears to left of status bar.

hotkey

Hotkey string of key used to activate subsystem

briefText

A brief description of what the subsystem does

showInfoText

If the subsystem is in show info mode

guiBarCount

The number of gui bars this subsystem will use

inputLoc

the Input location (top left) of the subsystem GUI element

extraBarPadding
rootLoc

the Root location of subsystem GUI elements


open fun drawSubsystemStatus(ship: ShipAPI, fill: Float, name: String, hudColor: Color, extraText: String, extraTextColor: Color, stateText: String, hotkey: String, briefText: String, showInfoText: Boolean, guiBarCount: Int, inputLoc: Vector2f, extraBarPadding: Float, rootLoc: Vector2f): Vector2f

Draws the status bar for a basic subsystem, imitating the shipsystem UI. If show info mode is enabled, it will take up an additional UI slot.

If the subsystem script attempts to render additional HUD elements (e.g. using the renderAuxiliaryStatusBar method) then they will not have an effect on the output location. This must be predetermined by the input guiBarCount parameter to make room for them.

Return

The output location (bottom left) of GUI element

Author

tomatopaste

Parameters

ship

Player ship

fill

Value 0 to 1, how full the bar is from left to right

name

Name of subsystem

hudColor

Color of the subsystem bar and text.

extraText

Info string opportunity. Appears to the right of the status bar.

extraTextColor

color of extraText. if null, uses standard text color

stateText

Subsystem activity status. Appears to left of status bar.

hotkey

Hotkey string of key used to activate subsystem

briefText

A brief description of what the subsystem does

showInfoText

If the subsystem is in show info mode

guiBarCount

The number of gui bars this subsystem will use

inputLoc

the Input location (top left) of the subsystem GUI element

extraBarPadding
rootLoc

the Root location of subsystem GUI elements