|
|
|
@ -484,12 +484,7 @@ namespace SohImGui {
|
|
|
|
|
io->ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef __SWITCH__
|
|
|
|
|
bool enableControllerNavigation = true;
|
|
|
|
|
#else
|
|
|
|
|
bool enableControllerNavigation = CVar_GetS32("gControlNav", 0);
|
|
|
|
|
#endif
|
|
|
|
|
if (enableControllerNavigation && CVar_GetS32("gOpenMenuBar", 0)) {
|
|
|
|
|
if (CVar_GetS32("gControlNav", 0) && CVar_GetS32("gOpenMenuBar", 0)) {
|
|
|
|
|
io->ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad | ImGuiConfigFlags_NavEnableKeyboard;
|
|
|
|
|
} else {
|
|
|
|
|
io->ConfigFlags &= ~ImGuiConfigFlags_NavEnableGamepad;
|
|
|
|
@ -921,19 +916,15 @@ namespace SohImGui {
|
|
|
|
|
|
|
|
|
|
ImGui::DockSpace(dockId, ImVec2(0.0f, 0.0f), ImGuiDockNodeFlags_None | ImGuiDockNodeFlags_NoDockingInCentralNode);
|
|
|
|
|
|
|
|
|
|
if (ImGui::IsKeyPressed(TOGGLE_BTN) || ImGui::IsKeyPressed(TOGGLE_PAD_BTN)) {
|
|
|
|
|
if (ImGui::IsKeyPressed(TOGGLE_BTN) ||
|
|
|
|
|
(ImGui::IsKeyPressed(TOGGLE_PAD_BTN) && CVar_GetS32("gControlNav", 0))) {
|
|
|
|
|
bool menu_bar = CVar_GetS32("gOpenMenuBar", 0);
|
|
|
|
|
CVar_SetS32("gOpenMenuBar", !menu_bar);
|
|
|
|
|
needs_save = true;
|
|
|
|
|
GlobalCtx2::GetInstance()->GetWindow()->SetMenuBar(menu_bar);
|
|
|
|
|
ShowCursor(menu_bar, Dialogues::dMenubar);
|
|
|
|
|
GlobalCtx2::GetInstance()->GetWindow()->GetControlDeck()->SaveControllerSettings();
|
|
|
|
|
#ifdef __SWITCH__
|
|
|
|
|
bool enableControllerNavigation = true;
|
|
|
|
|
#else
|
|
|
|
|
bool enableControllerNavigation = CVar_GetS32("gControlNav", 0);
|
|
|
|
|
#endif
|
|
|
|
|
if (enableControllerNavigation && CVar_GetS32("gOpenMenuBar", 0)) {
|
|
|
|
|
if (CVar_GetS32("gControlNav", 0) && CVar_GetS32("gOpenMenuBar", 0)) {
|
|
|
|
|
io->ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad | ImGuiConfigFlags_NavEnableKeyboard;
|
|
|
|
|
} else {
|
|
|
|
|
io->ConfigFlags &= ~ImGuiConfigFlags_NavEnableGamepad;
|
|
|
|
|