From eeed6d84f4324387597be05e6ed1df4b3adfca9c Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 7 Jul 2022 19:31:19 -0700 Subject: Changeset: 80 Add skeleton for keyboard management GUI in editor --- source/30-game/EditorCorePrivate.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/30-game/EditorCorePrivate.cpp') diff --git a/source/30-game/EditorCorePrivate.cpp b/source/30-game/EditorCorePrivate.cpp index b335c60..e52c795 100644 --- a/source/30-game/EditorCorePrivate.cpp +++ b/source/30-game/EditorCorePrivate.cpp @@ -407,7 +407,9 @@ struct CreatableGameObject { void SaveRendererBindings(const Renderer& renderer) { auto file = Utils::OpenCstdioFile("assets/GameRendererBindings.json", Utils::WriteTruncate); if (!file) return; - DEFER { fclose(file); }; + DEFER { + fclose(file); + }; char writerBuffer[65536]; rapidjson::FileWriteStream stream(file, writerBuffer, sizeof(writerBuffer)); @@ -459,6 +461,7 @@ void EditorInstance::Show() { ImGui::MenuItem("Command Palette", "Ctrl+Shift+P", &mWindowVisible_CommandPalette); ImGui::MenuItem("Inspector", nullptr, &mWindowVisible_Inspector); ImGui::MenuItem("Content Browser", "Ctrl+Space", &mWindowVisible_ContentBrowser); + ImGui::MenuItem("Keyboard Viewer", nullptr, &mWindowVisible_KeyboardViewer); ImGui::MenuItem("World Structure", nullptr, &mWindowVisible_WorldStructure); ImGui::MenuItem("World Properties", nullptr, &mWindowVisible_WorldProperties); ImGui::EndMenu(); @@ -483,6 +486,10 @@ void EditorInstance::Show() { mEdContentBrowser.Show(&mWindowVisible_ContentBrowser); } + if (mWindowVisible_KeyboardViewer) { + mEdKbViewer.Show(&mWindowVisible_KeyboardViewer); + } + auto& camera = *mApp->GetActiveCamera(); ImGuizmo::SetRect(0, 0, io.DisplaySize.x, io.DisplaySize.y); ImGuizmo::SetDrawlist(ImGui::GetBackgroundDrawList()); -- cgit v1.2.3-70-g09d2