Hi,
Would it be possible to make changes to how the mouse is handled with screens? I would like to simply use the standard system cursor in my game, but it doesn't seem to be possible. I know I can use the WindowMouseX, etc. functions with OpenWindowedScreen(), but this is not an option for full screen. I understand that the intention is for us to supply our own sprite as a cursor, but I would still really like to be able to use the standard system cursor.
Is there a reason the system cursor is hidden when using ExamineMouse()? Could we not have the option as to whether or not it should be hidden? (Such as a HideMouse(true) function.)
Also, unless I'm doing something wrong, I cannot get the mouse to leave the game window (OpenWindowedScreen()) to go to another application. It would be nice for this to be possible without having to make the user press a key to allow it.
I obviously don't know the reasoning behind the way PureBasic does it, and I'm sure there was a good reason, but it would be very nice to have more flexibility with regards to handling the mouse.
Thank you for considering these changes.
Mouse handling with screens
Re: Mouse handling with screens
What you want is ReleaseMouse().
By default it captures the mouse, as that's the usual use case for most games, but you can release it if you want.
By default it captures the mouse, as that's the usual use case for most games, but you can release it if you want.
Re: Mouse handling with screens
If I call ReleaseMouse() at the end of my main loop, then none of the mouse functions work. I understand about capturing the mouse, but I am requesting the ability to use the standard system cursor if I so desire.
Re: Mouse handling with screens
Look at the top of the mouse library documentation.wombats wrote:If I call ReleaseMouse() at the end of my main loop, then none of the mouse functions work. I understand about capturing the mouse, but I am requesting the ability to use the standard system cursor if I so desire.
The way these mouse functions work prohibits the standard cursor being present; this is capturing the mouse. If you want the standard OS mouse cursor, then you have to interact with the OS closer to the way a normal application does. This means using WindowMouseX(), WindowMouseY() and EventType(), or using direct OS API calls.
Unfortunately, there is no middle ground. The game style mouse functions require mouse capturing.
Re: Mouse handling with screens
like void said already ... but to be clear:wombats wrote:If I call ReleaseMouse() at the end of my main loop, then none of the mouse functions work. I understand about capturing the mouse, but I am requesting the ability to use the standard system cursor if I so desire.
If you want to use the system-mouse ... just use it.
Already possible with WindowMouseX(), WindowMouseY()
and so on. If you want to use the DirectInput-Mouse, then
use that with MouseX(), MouseY() and so on.

Feature already implemented

MFG PMV
Re: Mouse handling with screens
And if I want to use the system mouse in full screen? It's possible in other engines. I can't use WindowMouseX(), etc. there, as I said in the first post. I don't see why it's necessary for PureBasic to force the capture of the mouse.
Re: Mouse handling with screens
The feature request you want to make at this point is for an easier "windowed full screen" option, which would more readily permit using WindowMouseX() etc.wombats wrote:And if I want to use the system mouse in full screen? It's possible in other engines. I can't use WindowMouseX(), etc. there, as I said in the first post. I don't see why it's necessary for PureBasic to force the capture of the mouse.
The thing you actually asked for, using the game mouse functions with the OS mouse in actual fullscreen, is not possible because that's not how the API provided to PureBasic works.
PureBasic cannot change that.