Creates an on-screen joystick that can be controlled by a touch screen, mouse, or other pointer device.
constructor Create(const Owner: TAgkObject; const X: Single; const Y: Single; const Size: Single); overload;
|
Parameters |
Description |
|
const Owner: TAgkObject |
the owner of the virtual joystick (eg. a TAgkScene object). |
|
const X: Single |
The X position of the center of the joystick in screen coordinates. |
|
const Y: Single |
The Y position of the center of the joystick in screen coordinates. |
|
const Size: Single |
The diameter of the joystick in screen coordinates. |
These are separate to physical joysticks. You may have up to 4 virtual joysticks on screen at the same time. Creating a 5th virtual joystick will raise an exception.
If a virtual joystick is on screen and is clicked or touched the joystick will capture that event and TAgkRawMouse.LeftDown will return False (up), and a touch event will not be generated for that action.
TAgkVirtualJoystick
|
Copyright (c) 2012. All rights reserved.
|