-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Mouse cursor types #155
Comments
That's done. The hardest part was embedding the cursors in code (imgui can draw cursors for you which is convenient on an embedded system/console) and then reducing the code space, first version took 200 lines. Ended up with this beauty:
I have yet to make the example honor the cursor type at the OS level. |
I initially intended to have the example apps honor the cursor shapes using OS cursor facilities but it's too much work to consider portability and without straying off standard OS cursor shapes. So this is the user responsibility to decide how they want to handle that. The "software" cursor rendering is always available and useful on console or embedded platforms. I don't expect people to use it on computers because it'll be tied to the application framerate where the OS one isn't. Closing now because it's really low priority and hasn't been requested. |
Thanks :) I will use this when my target OS doesn't support it (as you stated as one of the use-cases above) |
Hi Omar. |
ImGui can already render a software mouse cursor, but those don't refresh as smoothly as a hardware cursor. Prefer to use OS cursor facilities if you can. |
@ocornut is ImGuiMouseCursor_Move removed in the latest version? Can't seem to find it. |
@aeris170 There was never a |
@ocornut forgive me if I'm not getting something here. In your second post, the one with the code, I see the enum "ImGuiMouseCursor_Move", but now you say it was never there to begin with. Can you explain why this is the case? Also, if there is not a move cursor (something like ✊, not 👆), how can I render it? |
You are correct The way cursor look depend on the OS and Back-end, I don't think we ever see a ✊ in Windows, I don't think it has an explicit Move cursor. Win32: SDL: GLFW: Neither SDL, GLFW or Win32 api have a "Move" cursor. |
OK, now I see. I was looking for "ResizeAll". Thank you for your help! :) |
Add a way for tell the application of which type of mouse cursor to display.
Applications can handle it or not.
The windows examples can support this.
Proposed enumeration
Extra (can't think of where imgui can send this, but nice to have so the cursor can "set" it themselves)
Applications are free to handle all the "resize" cursor the same way.
( Suggested here: #154 )
The text was updated successfully, but these errors were encountered: