AftGangAglay Documentation


getpos

New in 2.2.0

Parameters

N/A

Return Value

Type Description
int[2] A list of 2 ints containing the mouse cursor screen position.

Description

Retrieves the mouse cursor position in screen coordinates.

Example

import agan

class game():
	def create(self):
		return self
	#
	def update(self):
		m = agan.getpos()
		#
		agan.log("Mouse is at X:")
		agan.log(m[0])
		agan.log("Y:")
		agan.log(m[1])
	#
	def close(self):
		pass