Difference between revisions of "Component: Joystick 2D (Controls)"
From Flowcode Help
Jump to navigationJump to search| (6 intermediate revisions by the same user not shown) | |||
| Line 22: | Line 22: | ||
==Detailed description== | ==Detailed description== | ||
| + | |||
| + | |||
| Line 50: | Line 52: | ||
==Examples== | ==Examples== | ||
| + | |||
| + | |||
| Line 77: | Line 81: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
==Macro reference== | ==Macro reference== | ||
| + | ===ReadAxisAsFloat=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 99: | Line 118: | ||
| − | + | ===ReadAxisAsInt=== | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 145: | Line 137: | ||
| − | + | ===SimMoveThumbStick=== | |
| − | |||
| − | == | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 253: | Line 164: | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| Line 311: | Line 202: | ||
|- | |- | ||
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
| − | | width="90%" | | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Pointer |
|- | |- | ||
| − | |||
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
| − | | width="90%" | | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Fill |
|- | |- | ||
| − | |||
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] |
| − | | width="90%" | | + | | width="90%" | Colour |
|- | |- | ||
| − | | colspan="2" | | + | | colspan="2" | Specifies the fill colour of the shape |
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] |
| − | | width="90%" | | + | | width="90%" | Gradient |
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-12-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-12-icon.png]] | ||
| − | | width="90%" | Style | + | | width="90%" | Gradient Style |
|- | |- | ||
| − | | colspan="2" | | + | | colspan="2" | |
| − | |||
| − | |||
| − | |||
|- | |- | ||
| − | | width="10%" align="center" style="background-color:# | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
| − | | width="90%" style="background-color:# | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Outline |
|- | |- | ||
| − | |||
|- | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-type-12-icon.png]] | ||
| + | | width="90%" | Style | ||
|- | |- | ||
| − | | | + | | colspan="2" | Outline line style |
| − | |||
|- | |- | ||
| − | | | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] |
| + | | width="90%" | Thickness | ||
|- | |- | ||
| − | | | + | | colspan="2" | Thickness of the outline |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| − | | width="10% | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] |
| − | | width="90% | + | | width="90%" | Colour |
| − | |||
| − | |||
|- | |- | ||
| + | | colspan="2" | The outline colour of the shape | ||
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] |
| − | | width="90%" | | + | | width="90%" | Gradient |
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-type-12-icon.png]] |
| − | + | | width="90%" | Gradient Style | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | | width="90%" | | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Slide Area |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| − | |||
|- | |- | ||
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Fill |
|- | |- | ||
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] |
| − | | width="90%" | | + | | width="90%" | Colour |
|- | |- | ||
| − | | colspan="2" | | + | | colspan="2" | Specifies the fill colour of the shape |
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] |
| − | | width="90%" | | + | | width="90%" | Gradient |
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-12-icon.png]] |
| − | | width="90%" | | + | | width="90%" | Gradient Style |
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
| − | | width="90%" | | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Outline |
|- | |- | ||
| − | |||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-12-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-12-icon.png]] | ||
| Line 463: | Line 285: | ||
|- | |- | ||
| colspan="2" | Outline line style | | colspan="2" | Outline line style | ||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| − | | width="10% | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] |
| − | | width="90% | + | | width="90%" | Thickness |
|- | |- | ||
| − | | colspan="2" | | + | | colspan="2" | Thickness of the outline |
|- | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] | ||
| + | | width="90%" | Colour | ||
|- | |- | ||
| − | | | + | | colspan="2" | The colour of the shape outline |
| − | |||
|- | |- | ||
| − | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] | |
| − | + | | width="90%" | Gradient | |
| − | | width="10%" align="center | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | width="90% | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| − | + | | width="10%" align="center" | [[File:Fc9-type-12-icon.png]] | |
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="90%" | Gradient Style |
| − | | width="90%" | | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
| − | | width="90%" | | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Background |
|- | |- | ||
| − | |||
|- | |- | ||
| − | | width="10%" align="center | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
| − | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Fill | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | width="90% | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| − | |||
|- | |- | ||
| − | | width="10%" align="center | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] |
| − | | width="90% | + | | width="90%" | Colour |
|- | |- | ||
| + | | colspan="2" | Specifies the fill colour of the shape | ||
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] |
| − | | width="90%" | | + | | width="90%" | Gradient |
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-12-icon.png]] |
| − | | width="90%" | | + | | width="90%" | Gradient Style |
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Outline |
|- | |- | ||
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-12-icon.png]] |
| − | | width="90%" | | + | | width="90%" | Style |
|- | |- | ||
| − | | colspan="2" | | + | | colspan="2" | Outline line style |
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] |
| − | | width="90%" | | + | | width="90%" | Thickness |
|- | |- | ||
| − | | colspan="2" | | + | | colspan="2" | Thickness of the outline |
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] |
| − | | width="90%" | | + | | width="90%" | Colour |
|- | |- | ||
| − | | colspan="2" | | + | | colspan="2" | The outline colour of the shape |
|- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] |
| − | | width="90%" | | + | | width="90%" | Gradient |
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-12-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-12-icon.png]] | ||
| − | | width="90%" | Style | + | | width="90%" | Gradient Style |
|- | |- | ||
| − | | colspan="2" | | + | | colspan="2" | |
|} | |} | ||
Latest revision as of 11:57, 3 November 2023
| Author | Matrix TSL |
| Version | 1.0 |
| Category | Controls |
Contents
Joystick 2D component
A simple joystick component allowing for easy mouse or touchscreen based analogue control.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Joystick_2dgi.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Joystick_2dgi.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
ReadAxisAsFloat
| ReadAxisAsFloat | |
| Reads a single axis of the joystick and returns as a floating point value. | |
| Axis | |
| Range 0-1 Where 0=X, 1=Y | |
| Return | |
ReadAxisAsInt
| ReadAxisAsInt | |
| Reads a single axis of the joystick and returns as a signed integer value. | |
| Axis | |
| Range 0-1 Where 0=X, 1=Y | |
| Return | |
SimMoveThumbStick
| SimMoveThumbStick | |
| X | |
| Y | |
| Component | |
| Return | |