Why wont the cursor leave the screen?
-
..::Origin::..
- Enthusiast

- Posts: 125
- Joined: Sat Jun 17, 2006 3:15 pm
Why wont the cursor leave the screen?
One thing i always fine when using the Mouse functions ( for games ) is that the mouse will never leave the window/screen.. This is kind of stupid, is there a way to allow it to leave?
- netmaestro
- PureBasic Bullfrog

- Posts: 8452
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
It's only an issue for windowed screens, as it would be odd indeed if the mouse would leave a fullscreen game. For windowed screens, if you don't use InitMouse() and ExamineMouse() the pointer will go anywhere on the desktop. You just have to use the API equivalents for the mouse functions, such as GetAsyncKeystate, GetCursorPos, etc.
BERESHEIT
-
..::Origin::..
- Enthusiast

- Posts: 125
- Joined: Sat Jun 17, 2006 3:15 pm
Alright, but ReleaseMouse() pretty much freezes the game itself...And no its not different for fullscreens, sorry if i added some confusion.
Incase your wondering, This is for a map editor/maker, i'm using API on the outside, but using a screen on the window.
It would be fine to freeze it when its lost focus, but.. the question is how on earth do they defocus it without Alt+Shift?
Incase your wondering, This is for a map editor/maker, i'm using API on the outside, but using a screen on the window.
It would be fine to freeze it when its lost focus, but.. the question is how on earth do they defocus it without Alt+Shift?
