Skip to main content

KSPXYPad

The KSPXYPad class allows you to connect to a ui_xy in KSP.

class KSPXYPad

Example

import { KSPXYPad, KSPXYPadCursor } from kontakt

var xy_pad = KSPXYPad(id: "my_xy")

Constructor

constructor(id: String)

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

Properties

active_index

active_index: Int { get }

The actively controlled index.


connected

connected: Bool { get }

Whether the control is connected. A control might not be connected if no corresponding control was found for the given id.


cursor_count

cursor_count: Int { get }

Number of cursors.


cursors

cursors: [KSPXYPadCursor] { get }

An array of all cursors.


custom_id

custom_id: Int { get }

The value of $CONTROL_PAR_CUSTOM_ID set on this control.


id

id: Int { get }

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


visible_cursors

visible_cursors: [KSPXYPadCursor] { get }

An array of all visible cursors.

Methods

cursor

cursor(at index: Int) -> (KSPXYPadCursor)

Returns the cursor at the given index. The cursor must be a multiple of two, i.e. 0 is the first cursor and 2 is the second cursor.