Hi there !
Is there a way to change the mouse cursor on Cpp targets ?
It seems
Mouse.cursor = MouseCursor.BUTTON;
only works on Flash target…
I can’t imagine no one ever had to use the hand cursor on windows or macosx targets… it seems such a simple way to make the user understand where he can click !
…though I’m curious about this behavior. Once you set the Mouse.cursor manually, does Flash stop updating the cursor automatically? So a TextField doesn’t change to the text cursor, and it doesn’t change between the normal and hand cursors with buttons/sprites?
Thanks for your help, it seems a good point but… I’m using HaxePunk, and I’d like to switch cursor just over a specific zone of an Image (a graphic).
It’s not separated at all, and can’t be : it’s a kind of oldschool terminal typing text, and the link is just above one line (detecting mouse position and line position).
The best would have been to switch cursor, regardless of any object rollover.
Oh, I forgot – custom mouse cursors are supported in Lime 2, and therefore HTML5 and the “next” native target, but not on Lime 1 (legacy) which the C++ targets use by default right now
Oh, thanks for the intel.
It’s been bothering me for a while, but it’s not very important in the game I’m working on…
It can wait a few monthes for an update !
I might release my game this week on windows and macosx, and will post about it in the showcase section…
See you then
This is not supported at the moment, however, many standard cursors are supported. If you something custom, though, OpenFL is going to change the cursor back to whatever it needs by default (such as the pointer, hand or text cursors)
At the moment, I would recommend using a custom display object with your cursor, tracking the mouse position, and hiding the mouse. This should work fine cross-platform, and won’t be subject to changes from the OpenFL default cursor code
For other targets, we would need to hide the cursor and drag a custom one. It might make more sense (at least for OpenFL) to consider supporting custom cursors (if we did) using the latter method, for cross-platform compatibility.
However, Flash has no API for creating a custom cursor, so from an OpenFL perspective, I’d say this is a WONTFIX
Open to suggestions for a way we would consider this from the Lime side