Goonstation 13 - Modules - TypesVar Details - Proc Details

tgui_color_picker

Datum used for instantiating and using a TGUI-controlled color picker.

Vars

autofocusThe bool that controls if this modal should grab window focus
choiceThe color the user selected, null if no selection has been made
closedBoolean field describing if the tgui_color_picker was closed by the user.
defaultThe default choice, used if there is an existing value
messageThe message to show the user
start_timeThe time at which the tgui_color_picker was created, for displaying timeout progress.
timeoutThe lifespan of the tgui_color_picker, after which the window will close and delete itself.
titleThe title of the TGUI window

Procs

repeat_stringReturns string repeated times times
sanitize_hexcolorReturn color if it is a valid hex color, otherwise default
waitWaits for a user's response to the tgui_color_picker's prompt before returning. Returns early if the window was closed by the user.

Var Details

autofocus

The bool that controls if this modal should grab window focus

choice

The color the user selected, null if no selection has been made

closed

Boolean field describing if the tgui_color_picker was closed by the user.

default

The default choice, used if there is an existing value

message

The message to show the user

start_time

The time at which the tgui_color_picker was created, for displaying timeout progress.

timeout

The lifespan of the tgui_color_picker, after which the window will close and delete itself.

title

The title of the TGUI window

Proc Details

repeat_string

Returns string repeated times times

sanitize_hexcolor

Return color if it is a valid hex color, otherwise default

wait

Waits for a user's response to the tgui_color_picker's prompt before returning. Returns early if the window was closed by the user.