Syntax
MouseDevice.SetCursorLimits leftLimit, topLimit, rightLimit, bottomLimit
Description
Restrict the area in which the mouse cursor can be moved to the rectangle defined by leftLimit, topLimit, rightLimit, bottomLimit.
Comments
leftLimit, topLimit, rightLimit, bottomLimit are of type long
Valid values for leftLimit, topLimit, rightLimit, and bottomLimit are longs or variables of type long
When the mouse device is opened, the mouse cursor limits are initialized to the full screen.
To retrieve the current mouse cursor limits, use MouseDevice.GetCursorLimits
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychop...@googlegroups.com.
To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/psychopy-users?hl=en.
More hassle then eprime to be sure, but once you write a function to
do this you can reuse it in all your scripts :)
-----------------------------------------------------
Gary Lupyan - lup...@wisc.edu
Assistant Professor of Psychology
University of Wisconsin, Madison
http://mywebspace.wisc.edu/lupyan/web/
-----------------------------------------------------
Just a heads up on this: I believe the function to set the mouse
position (setPos) only works in pygame not pyglet. So, constraining
the position of the mouse using setPos won't work in pyglet. An
alternative is to use a custom mouse cursor (e.g., an image of a mouse
pointer whose position is set by reading off the mouse position
event).
You can then "freeze" the position of this cursor if the mouse moves
outside a bounding box using the method mentioned on the page in
Becky's message.
More hassle then eprime to be sure, but once you write a function to
do this you can reuse it in all your scripts :)