diff --git a/src/dusk/ui/settings.cpp b/src/dusk/ui/settings.cpp index e9ed1eadbe..ab7ffa5a50 100644 --- a/src/dusk/ui/settings.cpp +++ b/src/dusk/ui/settings.cpp @@ -103,6 +103,13 @@ constexpr std::array kMagicArmorModes = { "Cosmetic", }; +constexpr std::array kLetterboxModes = { + "Off", + "On", + "Only During Cutscenes", + "Only During Gameplay", +}; + bool try_parse_backend(std::string_view backend, AuroraBackend& outBackend) { if (backend == "auto") { outBackend = BACKEND_AUTO; @@ -889,11 +896,37 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) { "during some cutscenes, particularly on ultra-wide displays. " "Visuals beyond the original intended framing may appear buggy." }); - config_bool_select(leftPane, rightPane, getSettings().game.disableLetterboxing, - { + leftPane.register_control( + leftPane.add_select_button({ .key = "Disable Letterboxing", - .helpText = "Disable the top and bottom black bars during L-targeting, aiming, " - "cutscenes, dialogue, etc." + .getValue = + [] { + return kLetterboxModes[static_cast(getSettings().game.disableLetterboxing.getValue())]; + }, + .isModified = + [] { + return getSettings().game.disableLetterboxing.getValue() != + getSettings().game.disableLetterboxing.getDefaultValue(); + }, + }), + rightPane, [](Pane& pane) { + for (int i = 0; i < static_cast(kLetterboxModes.size()); i++) { + pane.add_button({ + .text = kLetterboxModes[i], + .isSelected = + [i] { + return getSettings().game.disableLetterboxing.getValue() == static_cast(i); + }, + }) + .on_pressed([i] { + mDoAud_seStartMenu(kSoundItemChange); + getSettings().game.disableLetterboxing.setValue(static_cast(i)); + config::save(); + }); + } + pane.add_rml( + "
Disable the top and bottom black bars during L-targeting, aiming, " + "cutscenes, dialogue, etc."); }); });