From 25c5eac5e6ca1035db1eddd7bea9ac78531da57e Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 28 Dec 2023 11:23:49 -0500 Subject: Delete manuals! Good riddance! These are hosted on files.dthompson.us now! --- manuals/sly/Joystick.html | 188 ---------------------------------------------- 1 file changed, 188 deletions(-) delete mode 100644 manuals/sly/Joystick.html (limited to 'manuals/sly/Joystick.html') diff --git a/manuals/sly/Joystick.html b/manuals/sly/Joystick.html deleted file mode 100644 index 68748c3..0000000 --- a/manuals/sly/Joystick.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - -Sly: Joystick - - - - - - - - - - - - - - - - - - - - -
-

-Previous: , Up: Input   [Contents][Index]

-
-
- -

4.4.3 Joystick

- -
-
(use-modules (sly input joystick))
-
- -

Joystick hooks, signals, and procedures. -

-

Before using joystick procedures, you must first call the -initialization procedure enable-joystick. -

-
-
Scheme Procedure: enable-joystick
-

Initialize joystick module. -

- -
-
Scheme Procedure: joystick-num-axes idx
-

Get number of axes of joystick at idx. -

- -
-
Scheme Procedure: joystick-num-buttons idx
-

Get number of buttons of joystick at idx. -

- -
-
Scheme Variable: joystick-axis-hook
-

This hook is run whenever a joystick motion occurs. Procedures added -to this hook should accept three arguments: which, the joystick -ID; axis, the axis ID; and value, the motion coordinate. -

- -
-
Scheme Variable: joystick-button-press-hook
-

This hook is run whenever a joystick button is pressed. Procedures -added to this hook should accept two arguments: which, the -joystick ID; button, the button ID. -

- -
-
Scheme Variable: joystick-button-release-hook
-

This hook is run whenever a joystick button is released. Procedures -added to this hook should accept two arguments: which, the -joystick ID; button, the button ID. -

- -
-
Scheme Variable: raw-axis-min
-

-32768 -

- -
-
Scheme Variable: raw-axis-max
-

32767 -

- -
-
Scheme Procedure: axis-value-raw idx axis
-

Create a signal on the axis at axis of the joystick at -idx; joystick axis values are stored in a signed 16 bit integer -and so, values range from [raw-axis-min, raw-axis-max]. -

- -
-
Scheme Procedure: axis-value idx axis
-

Create a signal for the value of axis on joystick idx; -values are scaled to the range [-1,1]. -

- -
-
Scheme Procedure: button-down? idx n
-

Create a signal for the state of button n on joystick at -idx. -

- -
-
Scheme Procedure: make-directional-signal idx x-axis y-axis
-

Create a signal for a directional pad or analog stick with x -and y axes. Values are scaled to the range [-1,1]. -

- -
-
Scheme Procedure: make-directional-signal-raw idx x-axis y-axis
-

Create a signal for a directional pad or analog stick with x -and y axes. Values range from [raw-axis-min, -raw-axis-max]. -

- -
-
Scheme Procedure: axis-scale raw-value
-

Map raw-value in the range [raw-axis-min, -raw-axis-max] to a value in the range [-1, 1]. -

- -
-
Scheme Procedure: joystick-name joystick
-

Return the name of joystick. -

- -
-
Scheme Procedure: num-joysticks
-

Return the number of joysticks available. -

-
-
-

-Previous: , Up: Input   [Contents][Index]

-
- - - - - -- cgit v1.2.3