You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an application which has a toggle for when I'm debugging & when I'm testing and I noticed a problem with the function:
voidupdateMouseCursor(sf::Window& window)
I have my mouse cursor set to hidden when testing (and all ImGui windows not set to be created) but this function kept overriding the value. I narrowed it down to the following line:
With the above logic if you have your ImGui IO set to not draw the cursor it takes the else branch. Do I need to set both of these values in ImGui and disregard the SFML RenderWindow function?
ImGui::SetMouseCursor(ImGuiMouseCursor_None); // used this to get round the issue
io.MouseDrawCursor = false; // this was the line that made me aware of the issue
The text was updated successfully, but these errors were encountered:
ghost
changed the title
updateMouseCursor issue
updateMouseCursor overrides SFML setMouseCursorVisible(false) call
Jul 18, 2021
Hello
Yeah, I see no other way of handling this, unfortunately. When you set io.MouseDrawCursor to true, we definitely need to disable the cursor. And when users then set io.MouseDrawCursor to false, there's no way to recover from that properly without requiring users to manually call window.setMouseCursorVisible(true); afterwards which doesn't seem ideal to me.
If you have some idea of how changing the value io.MouseDrawCursor can be made invisible to the user (without requiring them to call window.setMouseCursorVisible(false/true); manually) , that'd be great.
I tried experimenting with it but I couldn't find a great alternative either, I guess for now calling it manually is the only way. May be worth leaving a comment about it somewhere just in case someone else runs into it. But aside from that, I can't see a better way to handle it either
I have an application which has a toggle for when I'm debugging & when I'm testing and I noticed a problem with the function:
I have my mouse cursor set to hidden when testing (and all ImGui windows not set to be created) but this function kept overriding the value. I narrowed it down to the following line:
With the above logic if you have your ImGui IO set to not draw the cursor it takes the else branch. Do I need to set both of these values in ImGui and disregard the SFML RenderWindow function?
The text was updated successfully, but these errors were encountered: