aboutsummaryrefslogtreecommitdiff
path: root/src/brussel.engine/EditorAccessories.cpp
blob: 821d41e24d137226dbedb50b143276c918dcb3b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "EditorAccessories.hpp"

#include "Input.hpp"

#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>

#include <imgui.h>

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();
}