(Formerly known as SetMouseBounds, which is now obsolete)
Mouse.SetBounds(int left, int top, int right, int bottom)
Restricts the area where the mouse can move on screen. The four parameters are
the relevant pixel co-ordinates of that edge of the bounding rectangle. They are
in the usual range (0,0) - (320,200).
You can pass (0,0,0,0) to disable the bounding rectangle and allow the mouse to move
everywhere, as usual.
NOTE: The effect of this function only lasts until the player leaves the screen,
at which point the cursor bounds will be reset.
Example:
mouse.SetBounds(160, 100, 320, 200);
will restrict the mouse cursor to the bottom-right quarter of the screen.
See Also: Mouse.SetPosition
|