aboutsummaryrefslogtreecommitdiff
path: root/source/30-game/EditorAccessories.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/30-game/EditorAccessories.cpp')
-rw-r--r--source/30-game/EditorAccessories.cpp22
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();
}