Switch
The Switchcomponent is the Komplete UI representation of a KSP ui_switch.
component Switch
Example
import { Switch } from kontakt_controls
export var main = Switch(control_id: "my_switch")
Constructor
constructor(control_id: String, text: String? = nil, style: SwitchStyle = default_switch_style, disabled: Bool = false, policy: TriggerPolicy = TriggerPolicy.on_down)
control_id: StringThis is the name that you assigned to the corresponding KSP
ui_switchcontrol.text: String? = nilThe text to display if any.
style: SwitchStyle = default_switch_styleCustomizes the appearance.
See SwitchStyle for more details.
disabled: Bool = falseDisables user interaction when set to [true]
policy: TriggerPolicy = TriggerPolicy.on_downConfigures whether to toggle on pointer down or up.
See TriggerPolicy