Skip to main content

KSPMenu

The KSPMenu class allows you to connect to a ui_menu in KSP.

import { KSPMenu, KSPMenuEntry } from kontakt

var menu = KSPMenu(id: "my_menu")

Constructors

constructor(id: String)

Connects to a ui_menu in KSP with the given control ID.

Properties

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.

entry_count: Int (get)

The number of entries.

id: Int (get)

The id is the name of the variable in KSP that corresponds to this control.

selected_entry: KSPMenuEntry (get)

The currently selected menu entry.

selected_index: Int (get/set)

The currently selected menu entry index.

visible_entries: [KSPMenuEntry] (get)

An array of all visible entries.