Add Help->ImGui->Clear Settings

This commit is contained in:
Luke Street 2021-05-29 02:04:02 -04:00
parent 1bf00f1444
commit 953876393c
2 changed files with 19 additions and 4 deletions

View File

@ -188,8 +188,12 @@ private:
as->specialKeyDown(key, mods, isRepeat);
}
}
if (key == boo::ESpecialKey::Enter && True(mods & boo::EModifierKey::Alt)) {
m_fullscreenToggleRequested = true;
if (True(mods & boo::EModifierKey::Alt)) {
if (key == boo::ESpecialKey::Enter) {
m_fullscreenToggleRequested = true;
} else if (key == boo::ESpecialKey::F4) {
m_windowInvalid = true;
}
}
m_imguiCallback.specialKeyDown(key, mods, isRepeat);
}

View File

@ -8,6 +8,11 @@
#include "ImGuiEngine.hpp"
namespace ImGui {
// Internal functions
void ClearIniSettings();
}
#include "TCastTo.hpp" // Generated file, do not modify include path
namespace metaforce {
@ -586,8 +591,6 @@ void ImGuiConsole::ShowAppMainMenuBar(bool canInspect) {
ImGui::MenuItem("Inspect", nullptr, &m_showInspectWindow, canInspect);
ImGui::MenuItem("Items", nullptr, &m_showItemsWindow, canInspect);
ImGui::MenuItem("Layers", nullptr, &m_showLayersWindow, canInspect);
ImGui::Separator();
ImGui::MenuItem("Demo", nullptr, &m_showDemoWindow);
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Debug")) {
@ -623,6 +626,14 @@ void ImGuiConsole::ShowAppMainMenuBar(bool canInspect) {
ImGui::Spacing();
if (ImGui::BeginMenu("Help")) {
ImGui::MenuItem("About", nullptr, &m_showAboutWindow);
ImGui::Separator();
if (ImGui::BeginMenu("ImGui")) {
if (ImGui::MenuItem("Clear Settings")) {
ImGui::ClearIniSettings();
}
ImGui::MenuItem("Show Demo", nullptr, &m_showDemoWindow);
ImGui::EndMenu();
}
ImGui::EndMenu();
}
ImGui::EndMainMenuBar();