AftGangAglay Documentation


setcursor

Parameters

Parameter Type Description
visible int Whether the mouse cursor should be visible.
captured int Whether the mouse cursor should be captured.

Return Value

N/A

Description

Sets the mouse cursor visibility and capture mode. While captured, the mouse cursor will continue to report motion but cannot move beyond the main window bounds.

These modes are only in effect when the user has the main window focused - i.e. a user can still use other applications without being impeded by application capture/visibility.

Example

import agan

class game():
	def create(self):
		return self
	#
	def update(self):
		if(agan.getkey(agan.KEY_L)): agan.setcursor(0, 1)
		if(agan.getkey(agan.KEY_W)): agan.setcursor(1, 0)
	#
	def close(self):
		pass