Nav: Track nav input source more generally (gamepad vs keyboard) (#787) + update todos and demo tweaks

This commit is contained in:
omar
2018-03-19 12:13:22 +01:00
parent d8d93f6360
commit 33ad8b2f0c
5 changed files with 33 additions and 29 deletions

View File

@ -1048,7 +1048,7 @@ struct ImGuiIO
bool KeySuper; // Keyboard modifier pressed: Cmd/Super/Windows
bool KeysDown[512]; // Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
ImWchar InputCharacters[16+1]; // List of characters input (translated by user from keypress+keyboard state). Fill using AddInputCharacter() helper.
float NavInputs[ImGuiNavInput_COUNT]; // Gamepad inputs (keyboard keys will be auto-mapped and be written here by ImGui::NewFrame)
float NavInputs[ImGuiNavInput_COUNT]; // Gamepad inputs (keyboard keys will be auto-mapped and be written here by ImGui::NewFrame, all values will be cleared back to zero in ImGui::EndFrame)
// Functions
IMGUI_API void AddInputCharacter(ImWchar c); // Add new character into InputCharacters[]