Skip to content

Commit

Permalink
feat[Editor]: disable ALT key triggering nav menu
Browse files Browse the repository at this point in the history
Based on the solution seen in ocornut/imgui#3560

Co-Authored-By: gerard-queralt <79362519+gerard-queralt@users.noreply.github.com>
  • Loading branch information
UriMurcia and gerard-queralt committed Feb 13, 2023
1 parent da07675 commit c04fce0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Modules/ModuleEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "Windows/EditorWindows/WindowEditorControl.h"

#include <ImGui/imgui.h>
#include <ImGui/imgui_internal.h>
#include <ImGui/imgui_impl_sdl.h>
#include <ImGui/imgui_impl_opengl3.h>

Expand Down Expand Up @@ -109,6 +110,9 @@ update_status ModuleEditor::Update()
ImGui::DockSpace(dockSpaceId);
ImGui::End();

//disable ALT key triggering nav menu
ImGui::GetCurrentContext()->NavWindowingToggleLayer = false;

mainMenu->Draw();
for (int i = 0; i < windows.size(); ++i) {
bool windowEnabled = mainMenu->IsWindowEnabled(i);
Expand Down

0 comments on commit c04fce0

Please sign in to comment.