Skip to main content

KSPXYPad

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

import { KSPXYPad, KSPXYPadCursor } from kontakt

var xy_pad = KSPXYPad(id: "my_xy")

Constructors

constructor(id: String)

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

Properties

active_index: Int (get)

The actively controlled index.

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: Int (get)

Number of cursors.

cursors: [KSPXYPadCursor] (get)

An array of all cursors.

custom_id: Int (get)

The value of $CONTROL_PAR_CUSTOM_ID set on this control.

id: Int (get)

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

visible_cursors: [KSPXYPadCursor] (get)

An array of all visible cursors.

Methods

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.