From 297232d21594b138bb368a42b5b0d085ff9ed6aa Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 19 Oct 2023 22:50:07 -0700 Subject: The great renaming: switch to "module style" --- src/brussel.engine/EditorAccessories.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/brussel.engine/EditorAccessories.cpp (limited to 'src/brussel.engine/EditorAccessories.cpp') diff --git a/src/brussel.engine/EditorAccessories.cpp b/src/brussel.engine/EditorAccessories.cpp new file mode 100644 index 0000000..821d41e --- /dev/null +++ b/src/brussel.engine/EditorAccessories.cpp @@ -0,0 +1,26 @@ +#include "EditorAccessories.hpp" + +#include "Input.hpp" + +#define GLFW_INCLUDE_NONE +#include + +#include + +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(glfwGetKeyboardUserPointer(keyboard)); + + ImGui::BulletText("%s", glfwGetKeyboardName(keyboard)); + ImGui::Indent(); + ImGui::Unindent(); + } + + ImGui::End(); +} -- cgit v1.2.3-70-g09d2