From ab6a03869abde67eb4d1520edaf6f8d8dff3fb07 Mon Sep 17 00:00:00 2001 From: baxlek <115663151+baxlek@users.noreply.github.com> Date: Sun, 16 Aug 2026 19:15:24 -0500 Subject: [PATCH] Implement Always Greatspin feature in settings Added Always Greatspin option to settings UI with modes. --- src/dusk/ui/settings.cpp | 42 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/src/dusk/ui/settings.cpp b/src/dusk/ui/settings.cpp index 423909f821..10b05690f5 100644 --- a/src/dusk/ui/settings.cpp +++ b/src/dusk/ui/settings.cpp @@ -95,6 +95,12 @@ constexpr std::array kMenuScalingModeLabels = { "Dusklight", }; +constexpr std::array kAlwaysGreatspinModes = { + "Off", + "Always", + "After Skill", +}; + constexpr std::array kMagicArmorModes = { "Normal", "On Damage", @@ -1300,8 +1306,40 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) { "Moon Jump (R+A)", getSettings().game.moonJump, "Hold R and A to rise into the air."); addCheat("Super Clawshot", getSettings().game.superClawshot, "Extends Clawshot behavior beyond the normal game rules."); - addCheat("Always Greatspin", getSettings().game.alwaysGreatspin, - "Allows the Great Spin attack without requiring full health."); + leftPane.register_control( + leftPane.add_select_button({ + .key = "Always Greatspin", + .getValue = + [] { + return kAlwaysGreatspinModes[static_cast( + getSettings().game.alwaysGreatspin.getValue())]; + }, + .isDisabled = [] { return getSettings().game.speedrunMode.getValue(); }, + .isModified = + [] { + return getSettings().game.alwaysGreatspin.getValue() != + getSettings().game.alwaysGreatspin.getDefaultValue(); + }, + }), + rightPane, [](Pane& pane) { + for (int i = 0; i < static_cast(kAlwaysGreatspinModes.size()); i++) { + pane.add_button({ + .text = kAlwaysGreatspinModes[i], + .isSelected = + [i] { + return getSettings().game.alwaysGreatspin.getValue() == + static_cast(i); + }, + }) + .on_pressed([i] { + mDoAud_seStartMenu(kSoundItemChange); + getSettings().game.alwaysGreatspin.setValue( + static_cast(i)); + config::save(); + }); + } + pane.add_rml("
Allows the Great Spin attack without requiring full health."); + }); addCheat("Fast Iron Boots", getSettings().game.enableFastIronBoots, "Speeds up movement while heavy, including wearing the Iron Boots, holding the Ball and Chain, wearing Magic Armor without rupees, etc."); addCheat("Can Transform Anywhere", getSettings().game.canTransformAnywhere,