Closed arran-nz closed 1 year ago
Hi, thanks for the PR. I'm working on the next version in the develop
branch, so the Dictionary has been changed to a switch statement, and stuff has been reorganized.
I think this would actually be a great place to use an extension method, so usage would look like:
if (ImGui.IsKeyPressed(Godot.Key.A.ToImGuiKey()))
If you want to get a PR merged, it's probably simplest to just open a new one on the develop branch. In ImGuiGD.cs, add:
public static ImGuiKey ToImGuiKey(this Key key)
and the same for JoyButton, using the Convert* methods in ImGuiGDInternal.
Otherwise, I'll take care of that myself in the next few days.
Thanks for the reply, I've implemented it as you suggusted - Great idea.
Hey there, awesome project - This is a game changer for me!
The PR allows for Godot developers to check against Godot keycodes in an ImGUI window.
For example:
Otherwise using the
ImGuiKey
enumeration in our projects increases coupling.