ImGuiNET / ImGui.NET

An ImGui wrapper for .NET.
MIT License
1.8k stars 298 forks source link

Breaking Changes For Handling Inputs > v1.90.0.0 #451

Open NoahGWood opened 7 months ago

NoahGWood commented 7 months ago

ImGuiIOPtr no longer has KeysDown or KeyMap, and that's probably going to cause people problems. The affected code is generated from C++ and has apparently been labelled obsolete in the C++ library.

If you're using OpenTK.Windowing.GraphicsLibraryFramework (GLFW), you'll need to use io.AddKeyEvent() to bind your key presses or revert to version 1.89.9.3 or below.

There may have been other breaking changes, would recommend seeing the Transition Guide for more info.

Last Working: https://github.com/ImGuiNET/ImGui.NET/blob/069363672fed940ebdaa02f9b032c282b66467c7/src/ImGui.NET/Generated/ImGuiIO.gen.cs#L74 Current: https://github.com/ImGuiNET/ImGui.NET/blob/f04c11e97b82bfe485fca4f799f46fe7ddcf1813/src/ImGui.NET/Generated/ImGuiIO.gen.cs#L74 C++ Reference: https://github.com/ocornut/imgui/blob/3733b5064e1820dc8517fedba2b34bfbdef569ab/imconfig.h#L31C3-L31C3

Typical Errors Caused: ImGuiIOPtr' does not contain a definition for 'KeyMap' and no accessible extension method 'KeyMap' accepting a first argument of type 'ImGuiIOPtr' could be found (are you missing a using directive or an assembly reference?)

'ImGuiIOPtr' does not contain a definition for 'KeysDown' and no accessible extension method 'KeysDown' accepting a first argument of type 'ImGuiIOPtr' could be found (are you missing a using directive or an assembly reference?)