pyimgui icon indicating copy to clipboard operation
pyimgui copied to clipboard

None of the custom renderers change mouse cursor

Open denballakh opened this issue 1 year ago • 4 comments

imgui wants to change cursor state when it is hovering over something reactive (window edge for resizing, for example). pyimgui lacks this functionality and cursor is always the default one which feels counterintuitive.

I'm using windows 10. I've tested pygame and glfw renderers (Demo>Configuration>Backend Flags shows that HasMouseCursors flag is not set). sdl2 renderer doesnt work at all, it just shows white screen, so im not sure if it supports changing cursor state.

denballakh avatar Nov 20 '23 13:11 denballakh

Yeah, I noticed this issue as well with the glfw renderer. It's not too difficult to implement a software rendered cursor (probably not as fast as a hardware cursor but more than good enough for my use cases) with your own cursor images loaded from file, and drawn on top using the imgui foreground draw list. Would be good to have a builtin solution though.

Aman-Anas avatar Nov 21 '23 22:11 Aman-Anas

pyglet changes the cursor for me: image

learn-more avatar Nov 22 '23 20:11 learn-more

@KinoxKlark Against which branch should we make PR's for this?

learn-more avatar Nov 22 '23 20:11 learn-more

pyglet indeed has this feature, i can confirm it also has this feature: when imgui viewport is not focused and you interact with it in any way (hover over something, scroll something, ...), it responds. pygame and glfw backends process events only if their window is focused

it also works well with my gpu, i no longer see artifacts (they are not caused by imgui or pyimgui, i guess they are caused by bad gpu drivers) example of such artifact: image

denballakh avatar Nov 23 '23 18:11 denballakh