AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgkVirtualJoystick.Create Constructor (TAgkObject, TAgkPoint, Single)

Creates an on-screen joystick that can be controlled by a touch screen, mouse, or other pointer device.

Syntax
Pascal
constructor Create(const Owner: TAgkObject; const P: TAgkPoint; const Size: Single); overload;
Parameters 
Description 
const Owner: TAgkObject 
the owner of the virtual joystick (eg. a TAgkScene object). 
const P: TAgkPoint 
The 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.

Copyright (c) 2012. All rights reserved.