hoffstadt / DearPyGui

Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies
https://dearpygui.readthedocs.io/en/latest/
MIT License
13.27k stars 689 forks source link

Ability to change the mouse cursor #2248

Open my1e5 opened 10 months ago

my1e5 commented 10 months ago

Dear ImGui has a function to set the mouse cursor but it's not exposed by DPG.

This feature was discussed in the Discord group (see link). The lack of ability to change the mouse cursor was a drawback when trying to create a custom adjustable splitter widget (similar to adjustable columns in tables).

User v-ein suggested:

[Such a function] would need to be bound to a widget, so that when the widget is hovered, mouse cursor changes. Not much work, but we can't add it to every widget, that would be a mess. It could be, for example, an argument to dpg.group, since a group is a pretty much universal container - we can wrap virtually anything with a group.

SamuMazzi commented 1 month ago

Hello @my1e5, I've implemented a solution, I'll make a PR asap :)