imgui-ggez-starter icon indicating copy to clipboard operation
imgui-ggez-starter copied to clipboard

Let ImGui change the mouse cursor, and fix modifier keys

Open Bakutomo opened this issue 4 years ago • 0 comments

This allows the mouse cursor to change when hovering over certain GUI elements such as text boxes and the corners of resizable windows. You can test all the different cursors by going to the "Inputs, Navigation & Focus"->"Mouse Cursors" section of the ImGui demo window.

I also noticed that it was impossible to ctrl+click on widgets because the modifier key state was only updated correctly when another key was held down. I changed that logic, and you can test it in the "Inputs, Navigation & Focus"->"Keyboard, Mouse & Navigation State" section. I think it can still break if the window loses focus while keys are being held down. There's a focus_event in ggez so maybe it would be a good idea to clear all keyboard state whenever the window loses focus, but I'm not sure.

Bakutomo avatar Aug 18 '20 10:08 Bakutomo