AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgkJoystick.SetJoystickPosition Method (TAgkPoint, Single)

Sets the screen position of a virtual joystick if needed.

Syntax
Pascal
class procedure SetJoystickPosition(const P: TAgkPoint; const Size: Single); overload;
Parameters 
Description 
const P: TAgkPoint 
The new position in screen coordinates. 
const Size: Single 
The diameter of the joystick in screen coordinates. 

This method positions a virtual joystick on screen only if it is necessary to emulate this input. For example if a real joystick or keyboard are available then this method has no noticable effect. It is recommended that you always call this method anyway if you intend to use a joystick, just incase a virtual joystick is needed. Any virtual joystick will be centered on the given X and Y position.

Copyright (c) 2012. All rights reserved.