IO: added AddKeyAnalogEvent() and support for ImGuiKey_GamepadXXXX. (#4858, #787)

This commit is contained in:
ocornut
2022-01-19 13:14:40 +01:00
parent 6e63fcaca3
commit f33bb99821
5 changed files with 141 additions and 52 deletions

View File

@ -5693,8 +5693,8 @@ static void ShowDemoWindowMisc()
}
// Display Keyboard/Mouse state
IMGUI_DEMO_MARKER("Inputs, Navigation & Focus/Keyboard & Navigation State");
if (ImGui::TreeNode("Keyboard & Navigation State"))
IMGUI_DEMO_MARKER("Inputs, Navigation & Focus/Keyboard, Gamepad & Navigation State");
if (ImGui::TreeNode("Keyboard, Gamepad & Navigation State"))
{
// We iterate both legacy native range and named ImGuiKey ranges, which is a little odd but this allow displaying the data for old/new backends.
// User code should never have to go through such hoops: old code may use native keycodes, new code may use ImGuiKey codes.