diff options
author | rtk0c <[email protected]> | 2022-07-07 19:31:19 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-07-07 19:31:19 -0700 |
commit | eeed6d84f4324387597be05e6ed1df4b3adfca9c (patch) | |
tree | 039f2ed112d8671001e2ba4d11533ea1406a41b0 /source/30-game/EditorAccessories.cpp | |
parent | a98b0495a957ed15900c052bcad00b3c48367546 (diff) |
Changeset: 80 Add skeleton for keyboard management GUI in editor
Diffstat (limited to 'source/30-game/EditorAccessories.cpp')
-rw-r--r-- | source/30-game/EditorAccessories.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/source/30-game/EditorAccessories.cpp b/source/30-game/EditorAccessories.cpp index 08d08ec..821d41e 100644 --- a/source/30-game/EditorAccessories.cpp +++ b/source/30-game/EditorAccessories.cpp @@ -1,6 +1,26 @@ #include "EditorAccessories.hpp" +#include "Input.hpp" + +#define GLFW_INCLUDE_NONE +#include <GLFW/glfw3.h> + #include <imgui.h> -void EditorSettings::Show() { +void EditorKeyboardViewer::Show(bool* open) { + ImGui::Begin("Keyboards", open); + + int count; + GLFWkeyboard** keyboards = glfwGetKeyboards(&count); + + for (int i = 0; i < count; ++i) { + GLFWkeyboard* keyboard = keyboards[i]; + auto attachment = static_cast<GlfwKeyboardAttachment*>(glfwGetKeyboardUserPointer(keyboard)); + + ImGui::BulletText("%s", glfwGetKeyboardName(keyboard)); + ImGui::Indent(); + ImGui::Unindent(); + } + + ImGui::End(); } |