ToggleButton
The ToggleButtoncomponent is the Komplete UI representation of a KSP ui_button.
component ToggleButton
Example
import { ToggleButton } from kontakt_controls
export var main = ToggleButton(control_id: "my_button")
Constructor
constructor(control_id: String, text: String? = nil, style: ToggleButtonStyle = default_toggle_button_style, disabled: Bool = false, policy: TriggerPolicy = TriggerPolicy.on_up)
control_id: StringThis is the name that you assigned to the corresponding KSP
ui_buttoncontrol.text: String? = nilThe text to display if any.
style: ToggleButtonStyle = default_toggle_button_styleCustomizes the appearance.
See ToggleButtonStyle for more details.
disabled: Bool = falseDisables user interaction when set to [true]
policy: TriggerPolicy = TriggerPolicy.on_upConfigures whether to toggle on pointer down or up.
See TriggerPolicy