2 registered members (Ayumi, 1 invisible),
584
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Lock the mouse pointer inside the game window?
[Re: Mo222]
#415485
01/19/13 14:13
01/19/13 14:13
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
You cannot and - more importantly - SHOULD not restrict the mouse movement to a certain window. If the player is choosing windowed mode he does so for a reason and you'd take just this reason away with the restriction. To your problem: on every mouse click check if the mouse is within the bounds of the window. If it is not just ignore the click. You can use http://www.conitec.net/beta/amouse_valid.htm for this purpose.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Lock the mouse pointer inside the game window?
[Re: Superku]
#415514
01/19/13 19:12
01/19/13 19:12
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
However, the mouse should unlock when the engine window loses focus That's exactly the point for me. Many people do not know how to change the currently focused window, besides clicking another one.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
|