AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgkPointer.Pos Property

Returns the current pointer position.

Syntax
Pascal
class property Pos: TAgkPoint;

If the device has a mouse then this returns the current position of the mouse. Otherwise the AGK will check for a touch screen and, if found, will return the position of the most recent touch event. If no events are taking place it is the last position recorded by a touch event. On devices that have neither mice nor touch screens the AGK will attempt to create some form of screen pointer controlled by analog sticks or similar. 

This position will be in view coordinates. If you are offsetting the view port you may want to convert it to world coordinates using TAgkScene.ScreenToWorld.

Copyright (c) 2012. All rights reserved.