Component: Joystick (Controls)

From Flowcode Help
Jump to navigationJump to search


Author Matrix TSL
Version 1.0 (Release)
Category Controls


Image Joystick component

A simple joystick component allowing for easy mouse or touchscreen based analogue control.

Examples

No additional examples


Downloadable macro reference

This component does not contain any downloadable macros

Simulation macro reference

ReadAxisAsFloat

Reads a single axis of the joystick and returns as a floating point value.

Parameters

BYTE Axis
Range 0-1 Where 0=X, 1=Y


Return value

FLOAT


ReadAxisAsInt

Reads a single axis of the joystick and returns as a signed integer value.

Parameters

BYTE Axis
Range 0-1 Where 0=X, 1=Y


Return value

INT



Property reference

Joystick Type

This property is of type Fixed list of ints and can be referenced with the variable name JoyType.

Defines the directions the joystick can travel.

Return To Center

This property is of type True or false and can be referenced with the variable name ReturnToCenter.

Decides if the joystick automatically returns to the center position when released.

Yes: The joystick will return to the center when released.

No: The joystick will remain in the current position when released.

Y Min

This property is of type Floating point and can be referenced with the variable name YMin.

No additional information


Y Max

This property is of type Floating point and can be referenced with the variable name YMax.

No additional information


Box Colour

This property is of type Color picker and can be referenced with the variable name BoxCol.

No additional information


Shaft Colour

This property is of type Color picker and can be referenced with the variable name ShaftCol.

No additional information


Knob Colour

This property is of type Color picker and can be referenced with the variable name KnobCol.

No additional information