Browse Source

Add instafade_sliders convar

kiwec 2 months ago
parent
commit
4f0d465fe8
4 changed files with 21 additions and 13 deletions
  1. 12 6
      src/App/Osu/Changelog.cpp
  2. 2 1
      src/App/Osu/OptionsMenu.cpp
  3. 2 2
      src/App/Osu/Osu.cpp
  4. 5 4
      src/App/Osu/Slider.cpp

+ 12 - 6
src/App/Osu/Changelog.cpp

@@ -29,17 +29,23 @@ Changelog::Changelog() : ScreenBackable() {
     CHANGELOG latest;
     latest.title =
         UString::format("%.2f (%s, %s)", convar->getConVarByName("osu_version")->getFloat(), __DATE__, __TIME__);
-    latest.changes.push_back("- Added keybind to toggle current map background");
-    latest.changes.push_back("- Fixed beatmaps not getting selected properly in some cases");
-    latest.changes.push_back("- Fixed crash when osu! folder couldn't be found");
-    latest.changes.push_back("- Fixed mod selection not being restored properly");
-    latest.changes.push_back("- Fixed skin selection menu being drawn behind back button");
+    latest.changes.push_back("- Added slider instafade setting");
     changelogs.push_back(latest);
 
+    CHANGELOG v35_09;
+    v35_09.title = "35.09 (2024-07-03)";
+    v35_09.changes.push_back("- Added keybind to toggle current map background");
+    v35_09.changes.push_back("- Fixed beatmaps not getting selected properly in some cases");
+    v35_09.changes.push_back("- Fixed crash when osu! folder couldn't be found");
+    v35_09.changes.push_back("- Fixed mod selection not being restored properly");
+    v35_09.changes.push_back("- Fixed skin selection menu being drawn behind back button");
+    changelogs.push_back(v35_09);
+
     CHANGELOG v35_08;
     v35_08.title = "35.08 (2024-06-28)";
     v35_08.changes.push_back("- Added ability to import .osk and .osz files (drop them onto the neosu window)");
-    v35_08.changes.push_back("- Added persistent map database (downloaded or imported maps stay after restarting the game)");
+    v35_08.changes.push_back(
+        "- Added persistent map database (downloaded or imported maps stay after restarting the game)");
     v35_08.changes.push_back("- Added skin folder");
     v35_08.changes.push_back("- Now publishing 32-bit releases (for PCs running Windows 7)");
     v35_08.changes.push_back("- Fixed songs failing to restart");

+ 2 - 1
src/App/Osu/OptionsMenu.cpp

@@ -835,7 +835,8 @@ OptionsMenu::OptionsMenu() : ScreenBackable() {
     hitResultScaleSlider->setKeyDelta(0.01f);
     addCheckbox("Draw Numbers", convar->getConVarByName("osu_draw_numbers"));
     addCheckbox("Draw Approach Circles", convar->getConVarByName("osu_draw_approach_circles"));
-    addCheckbox("Instafade", convar->getConVarByName("instafade"));
+    addCheckbox("Instafade Circles", convar->getConVarByName("instafade"));
+    addCheckbox("Instafade Sliders", convar->getConVarByName("instafade_sliders"));
     addSpacer();
     addCheckbox("Ignore Beatmap Sample Volume",
                 "Ignore beatmap timingpoint effect volumes.\nQuiet hitsounds can destroy accuracy and concentration, "

+ 2 - 2
src/App/Osu/Osu.cpp

@@ -59,7 +59,7 @@ Osu *osu = NULL;
 
 // release configuration
 ConVar auto_update("auto_update", true, FCVAR_DEFAULT);
-ConVar osu_version("osu_version", 35.09f, FCVAR_DEFAULT | FCVAR_HIDDEN);
+ConVar osu_version("osu_version", 35.10f, FCVAR_DEFAULT | FCVAR_HIDDEN);
 
 #ifdef _DEBUG
 ConVar osu_debug("osu_debug", true, FCVAR_DEFAULT);
@@ -147,6 +147,7 @@ ConVar normalize_loudness("normalize_loudness", false, FCVAR_DEFAULT, "normalize
 ConVar restart_sound_engine_before_playing("restart_sound_engine_before_playing", false, FCVAR_DEFAULT,
                                            "jank fix for users who experience sound issues after playing for a while");
 ConVar instafade("instafade", false, FCVAR_DEFAULT, "don't draw hitcircle fadeout animations");
+ConVar instafade_sliders("instafade_sliders", false, FCVAR_DEFAULT, "don't draw slider fadeout animations");
 ConVar sort_skins_by_name("sort_skins_by_name", true, FCVAR_DEFAULT, "set to false to use old behavior");
 
 ConVar use_https("use_https", true, FCVAR_DEFAULT);
@@ -158,7 +159,6 @@ ConVar submit_after_pause("submit_after_pause", true, FCVAR_DEFAULT);
 
 // If catboy.best doesn't work for you, here are some alternatives:
 // - https://api.osu.direct/d/
-// - https://chimu.moe/d/
 // - https://api.nerinyan.moe/d/
 // - https://osu.gatari.pw/d/
 // - https://osu.sayobot.cn/osu.php?s=

+ 5 - 4
src/App/Osu/Slider.cpp

@@ -366,8 +366,9 @@ void Slider::draw(Graphics *g) {
     }
 
     // slider body fade animation, draw start/end circle hit animation
-    bool is_instafade = convar->getConVarByName("instafade")->getBool();
-    if(!is_instafade && m_fEndSliderBodyFadeAnimation > 0.0f && m_fEndSliderBodyFadeAnimation != 1.0f &&
+    bool instafade_slider_body = convar->getConVarByName("instafade_sliders")->getBool();
+    bool instafade_slider_head = convar->getConVarByName("instafade")->getBool();
+    if(!instafade_slider_body && m_fEndSliderBodyFadeAnimation > 0.0f && m_fEndSliderBodyFadeAnimation != 1.0f &&
        !osu->getModHD()) {
         std::vector<Vector2> emptyVector;
         std::vector<Vector2> alwaysPoints;
@@ -380,7 +381,7 @@ void Slider::draw(Graphics *g) {
                                  1.0f - m_fEndSliderBodyFadeAnimation, getTime());
     }
 
-    if(!is_instafade && osu_slider_sliderhead_fadeout.getBool() && m_fStartHitAnimation > 0.0f &&
+    if(!instafade_slider_head && osu_slider_sliderhead_fadeout.getBool() && m_fStartHitAnimation > 0.0f &&
        m_fStartHitAnimation != 1.0f && !osu->getModHD()) {
         float alpha = 1.0f - m_fStartHitAnimation;
 
@@ -419,7 +420,7 @@ void Slider::draw(Graphics *g) {
         g->popTransform();
     }
 
-    if(!is_instafade && m_fEndHitAnimation > 0.0f && m_fEndHitAnimation != 1.0f && !osu->getModHD()) {
+    if(!instafade_slider_head && m_fEndHitAnimation > 0.0f && m_fEndHitAnimation != 1.0f && !osu->getModHD()) {
         float alpha = 1.0f - m_fEndHitAnimation;
 
         float scale = m_fEndHitAnimation;