diff --git a/src/dusk/imgui/ImGuiMenuGame.cpp b/src/dusk/imgui/ImGuiMenuGame.cpp index f2dda8ff71..c70c55c2fb 100644 --- a/src/dusk/imgui/ImGuiMenuGame.cpp +++ b/src/dusk/imgui/ImGuiMenuGame.cpp @@ -29,34 +29,6 @@ namespace dusk { ImGui::Checkbox("Show Input Viewer", &m_showInputViewer); - drawInterfaceMenu(); - - ImGui::Separator(); - - if (ImGui::MenuItem("Reset", hotkeys::DO_RESET)) { - JUTGamePad::C3ButtonReset::sResetSwitchPushing = true; - } - - if (!IsMobile && ImGui::MenuItem("Exit")) { - dusk::IsRunning = false; - } - - ImGui::EndMenu(); - } - } - - void ImGuiMenuGame::drawInterfaceMenu() { - if (ImGui::BeginMenu("Interface")) { - config::ImGuiCheckbox("Achievement Notifications", getSettings().game.enableAchievementNotifications); - config::ImGuiCheckbox("Skip Pre-Launch UI", getSettings().backend.skipPreLaunchUI); - config::ImGuiCheckbox("Show Pipeline Compilation", getSettings().backend.showPipelineCompilation); -#if DUSK_ENABLE_SENTRY_NATIVE - config::ImGuiCheckbox("Enable Crash Reporting", getSettings().backend.enableCrashReporting); -#endif - if (!IsMobile) { - config::ImGuiCheckbox("Pause on Focus Lost", getSettings().game.pauseOnFocusLost); - } - ImGui::EndMenu(); } } diff --git a/src/dusk/imgui/ImGuiMenuGame.hpp b/src/dusk/imgui/ImGuiMenuGame.hpp index ab905cf0c2..b5ecfa37c0 100644 --- a/src/dusk/imgui/ImGuiMenuGame.hpp +++ b/src/dusk/imgui/ImGuiMenuGame.hpp @@ -55,8 +55,6 @@ namespace dusk { static void resetForSpeedrunMode(); private: - void drawInterfaceMenu(); - struct { int m_selectedPort = 0; bool m_isReading = false; diff --git a/src/dusk/ui/settings.cpp b/src/dusk/ui/settings.cpp index fe47ec5119..2cdb2d50d9 100644 --- a/src/dusk/ui/settings.cpp +++ b/src/dusk/ui/settings.cpp @@ -7,6 +7,7 @@ #include "dusk/audio/DuskAudioSystem.h" #include "dusk/audio/DuskDsp.hpp" #include "dusk/config.hpp" +#include "dusk/imgui/ImGuiEngine.hpp" #include "dusk/livesplit.h" #include "m_Do/m_Do_main.h" #include "number_button.hpp" @@ -455,6 +456,11 @@ SettingsWindow::SettingsWindow() { value ? AURORA_VIEWPORT_FIT : AURORA_VIEWPORT_STRETCH); }, }); + config_bool_select(leftPane, rightPane, getSettings().game.pauseOnFocusLost, + { + .key = "Pause on Focus Lost", + .isDisabled = [] { return IsMobile; }, + }); leftPane.add_section("Resolution"); leftPane @@ -591,6 +597,39 @@ SettingsWindow::SettingsWindow() { .key = "Enable Mini-Map Shadows", }); }); + + // TODO: Reorganize all of this? + add_tab("Interface", [this](Rml::Element* content) { + auto& leftPane = add_child(content, Pane::Type::Controlled); + auto& rightPane = add_child(content, Pane::Type::Uncontrolled); + + config_bool_select(leftPane, rightPane, getSettings().game.enableAchievementNotifications, + { + .key = "Enable Achievement Notifications", + .helpText = "Display a toast when an achievement is unlocked.", + }); +#if DUSK_ENABLE_SENTRY_NATIVE + config_bool_select(leftPane, rightPane, getSettings().backend.enableCrashReporting, + { + .key = "Enable Crash Reporting", + .helpText = "Enable automatic reporting of crashes to the developers.

" + "Submissions include logs which may contain sensitive information. Refrain from " + "enabling reporting if you do not agree with the following inclusions:

" + "- Operating System
- CPU Architecture
- GPU Model & Driver Version
" + "- Account Username" + }); +#endif + leftPane.add_section("Advanced"); + config_bool_select(leftPane, rightPane, getSettings().backend.skipPreLaunchUI, + { + .key = "Skip Pre-Launch UI", + }); + config_bool_select(leftPane, rightPane, getSettings().backend.showPipelineCompilation, + { + .key = "Show Pipeline Compilation", + .helpText = "Show an overlay when shaders are being compiled for your hardware." + }); + }); } } // namespace dusk::ui