mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Nav: Moving all nav inputs to io.NavInputs[] float array, new enum labelled for gamepad. (#323)
This commit is contained in:
parent
4ccc87c91d
commit
dcff032429
4 changed files with 136 additions and 108 deletions
|
|
@ -1528,6 +1528,9 @@ void ImGui::ShowTestWindow(bool* p_open)
|
|||
ImGui::Text("Keys mods: %s%s%s%s", io.KeyCtrl ? "CTRL " : "", io.KeyShift ? "SHIFT " : "", io.KeyAlt ? "ALT " : "", io.KeySuper ? "SUPER " : "");
|
||||
|
||||
ImGui::Text("NavUsable: %d, NavActive: %d", io.NavUsable, io.NavActive);
|
||||
ImGui::Text("NavInputs down:"); for (int i = 0; i < IM_ARRAYSIZE(io.NavInputs); i++) if (io.NavInputs[i] > 0.0f) { ImGui::SameLine(); ImGui::Text("[%d] %.2f", i, io.NavInputs[i]); }
|
||||
ImGui::Text("NavInputs pressed:"); for (int i = 0; i < IM_ARRAYSIZE(io.NavInputs); i++) if (io.NavInputsDownDuration[i] == 0.0f) { ImGui::SameLine(); ImGui::Text("[%d]", i); }
|
||||
ImGui::Text("NavInputs duration:"); for (int i = 0; i < IM_ARRAYSIZE(io.NavInputs); i++) if (io.NavInputsDownDuration[i] >= 0.0f) { ImGui::SameLine(); ImGui::Text("[%d] %.2f", i, io.NavInputsDownDuration[i]); }
|
||||
|
||||
ImGui::Button("Hovering me sets the\nkeyboard capture flag");
|
||||
if (ImGui::IsItemHovered())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue