-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose control over cursor visibility and icon of winit::Window
#111
Comments
An interesting alternative, I think, would be to add a new
Yes, that sounds great! The enum could have a
Go ahead! Let me know if you need anything or have any questions! |
Thanks a lot for the quick turnaround @hecrj, very much appreciated! 🙇
👍
I think it might be worth waiting for #62 to be merged before tackling this. I looked into branching from On that same subject, excuse me if this issue is the wrong place to ask this, but is there a specific thing holding off the merge of #62? Is there anything I can help with? I am pretty new to Rust, but I can try my best to help get that moving along. Feel free to reply to this in #62 for visibility. |
@oguzkocer You are right, the new
This Just tonight, I have been able to make macOS work with the revamped redraw request API here: hecrj/winit@1c081d3. However, I still have to test it properly. If you want to help with iOS and Linux Wayland support, I am sure the In any case, I have pushed a commit to #62 which should fix the build issues on macOS for the time being and also fixed the conflicts with master. |
Thanks a lot for the clarification!
As much as I'd like to help with that, after checking out the conversation and some of the PRs around it, it looks like it could be a bit more than I could handle at this point. I am sorry about that. Hopefully I'll be a bit more comfortable with Rust and the ecosystem to get involved with more crates in the future.
Thank you for this as well! I intended to start working on the cursor changes tonight, but ended up debugging why the examples weren't working. I left a comment about it on #62, I hope it's helpful 🤞 |
There's no need to be sorry! 😄 I was completely clueless just some months ago!
My bad. I need to start testing everything on multiple platforms... 😅
Thank you for the catch! |
🙇
No worries, I liked the debugging session. Let me know if you ever need one more person to test on Windows or Mac OS. I am trying my best to spend an hour or two every day with ☕️ so should be able to help out, at least for now.
Glad it helped! |
This was implemented in #112 🎉 |
It'd be good if we could get access to set_cursor_visible and set_cursor_icon of
winit::Window
. This should be fairly simple to do once #62 is merged in.@hecrj I'd be happy to work on this if you are OK with this addition. I was thinking we could just add these two methods in
graphics::Window
, which would just call thewinit::Window
methods. For the CursorIconenum
, I am guessing we'd want to have anenum
incoffee
that maps one to one with thewinit::window::CursorIcon
since it doesn't look likewinit
is exposed to the consumers of this crate at all. If you have other ideas, I am happy to follow them as well, just let me know if you're interested.For context, the reason I am interested in these methods is to be able to show a different icon in specific cases. Although
set_cursor_icon
would be enough to show the standard cursor icons, I believeset_cursor_visible
is necessary to completely hide it to show a custom icon. I don't know which one I'll go with yet, but I think someone else might also find use for one or the other. Furthermore, a lot of games do hide the mouse icon completely, so the visibility control would be necessary for that as well.The text was updated successfully, but these errors were encountered: