2
0
Эх сурвалжийг харах

Made Mouse.Location read/write so it can WarpMouse.

Mark Sibly 8 жил өмнө
parent
commit
544857eecc

+ 6 - 0
modules/mojo/input/mouse.monkey2

@@ -104,9 +104,15 @@ Class MouseDevice Extends InputDevice
 	End
 
 	#rem monkeydoc The mouse location.
+	
+	This property may be written to warp the mouse to a new location.
+	
 	#end
 	Property Location:Vec2i()
 		Return _location
+	Setter( location:Vec2i )
+		_location=location
+		SDL_WarpMouseInWindow( Null,location.x,location.y )
 	End
 	
 	#rem monkeydoc The mouse wheel delta x value since the last app update.