KSPButton
The KSPButton
class allows you to connect to a ui_button
in KSP.
import { KSPButton } from kontakt
var button = KSPButton(id: "my_button")
Constructors
constructor(id: String)
Connects to a ui_button
in KSP with the given control ID.
Properties
checked: Bool (get/set)
Whether the button is checked.
connected: Bool (get)
Whether the control is connected. A control might not be connected if no corresponding control was found for the given id
.
custom_id: Int (get)
The value of $CONTROL_PAR_CUSTOM_ID
set on this control.
id: String (get)
The KSP control ID used this button is connected to.
Methods
toggle() -> ()
Toggles the checked state of the button.