Skip to content

UI ​

class in OpalScript

Read and write in-game UI elements by element id.

Methods ​

MemberDescription
UI.HasDoes the current scene UI contain this exact element id?
UI.IsVisibleRead an element's own visibility flag (a hidden parent can still hide it).
UI.GetTextRead a text element or button label by element id.
UI.GetValueRead a bar or slider value by element id.
UI.SetVisibleShow or hide a UI element during Play.
UI.SetTextSet a text element or button label and refresh its layout. Bound fields must be changed through their GameState value.
UI.SetValueSet a bar or slider value, clamped to its current range.
UI.SetRangeSet a slider's minimum and maximum, clamping its current value. Maximum must exceed minimum.
UI.SetBarSet a bar's value and positive maximum together.

See also ​