Mouse tethering/bounding box in Feature Requests
|
|
|
|
| Status: |
Open
Issue hasn't been assigned a status value.
|
|
|
Suggestion: Allowing control of the mouse location to create your own tether, or create a bounding box (ie: the map). This would allow fast paced games to keep the mouse within the map, and not click outside of it. An example would be a game I recently did:
http://www.byond.com/games/Megablaze/Freeze_Bomb
It could also be useful in other scenarios as dragging something across the map, it would allow the dragged object to stay within the bounds of the map, or bounds of the window.
|
The way I'd suggest handling it is by giving maps a new true/false setting. While true, the focused map prevents the user's cursor from going outside of the map. Setting the flag to false simply releases the cursor, allowing the user to scroll outside of the map once more. If the flag is set to true while the player's cursor is already outside of the map, simply "snap" the cursor to the nearest edge of the focused map.