Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Anyway to know the system mouse pointer X and Y?

Author
Message
Supertino
6
Years of Service
User Offline
Joined: 22nd Jun 2017
Location: Behind you!
Posted: 12th Sep 2017 10:06
In windowed mode is there anyway to return if the mouse cursor is outside of the window render area?

For example in my game I replace the system pointer with a sprite and use SetRawMouseVisible(FALSE) to hide the system pointer, this has different results on different platforms when the mouse is moved outside of the window.

Linux (ubuntu) - works as intended, mouse moves outside of the window (canvas) area and the system pointer shows
MAC - system pointer remains hidden until focus from the game is lost (i.e click the mouse on the desktop)
PC - system pointer also remains hidden when within the window title bar (hard to click close, minimise) but does show when moves out of the window entirely

Ideally I'd also want to hide the sprite pointer when the system pointer is outside the window so some kind of function to check for this would be great. I looked in the docs but could not find one.
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 16th Sep 2017 11:58
hmm, if you check the app windows min and max, and if the mouse is outside then show it?
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 16th Sep 2017 12:24
Quote: "PC - system pointer also remains hidden when within the window title bar (hard to click close, minimise) but does show when moves out of the window entirely
"


same problem here, very annoying ...
--------------------------------
Join us on dedicated AppGameKit WeeKChat :
https://week.chat/room/AppGameKit
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 16th Sep 2017 16:40
Yeah we could use a 'GetRawMouseDesktopX/Y', I had to use a plugin!

Login to post a reply

Server time is: 2024-03-29 15:43:41
Your offset time is: 2024-03-29 15:43:41