Skip to content

Commit

Permalink
Make combos optional + fix mistake
Browse files Browse the repository at this point in the history
Added sar_rhythmgame_combo and fixed a mistake in the last commit
  • Loading branch information
AlexAdvDev committed Oct 14, 2024
1 parent 847ce3c commit 3930002
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Features/Hud/RhythmGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

Variable sar_rhythmgame("sar_rhythmgame", "0", "Show a HUD indicating your groundframes as rhythm game like popups.\n");

// Customization
Variable sar_rhythmgame_combo("sar_rhythmgame_combo", "1", "Show a combo counter on the rhythm game HUD.\n");

bool RhythmGameHud::ShouldDraw() {
return sar_rhythmgame.GetBool();
}
Expand Down Expand Up @@ -66,7 +69,8 @@ void RhythmGameHud::Paint(int slot) {

surface->DrawTxt(font, x, y, popupColor, popupText.c_str());
if (popup.streak > 1 && popup.type == 0) {
std::string combo = "(" + std::to_string(popup.streak) + "x)";
std::string combo = "";
if (sar_rhythmgame_combo.GetBool()) combo = "(" + std::to_string(popup.streak) + "x)";
surface->DrawTxt(font, x + (surface->GetFontLength(font, popupText.c_str()) / 2) - (surface->GetFontLength(font, combo.c_str()) / 2), y + fh, Color{232, 179, 45, static_cast<uint8_t>(popup.alpha)}, combo.c_str());
}

Expand Down Expand Up @@ -110,6 +114,7 @@ void RhythmGameHud::OnJump(int slot) {
} else if (groundframes >= 3 && groundframes <= 6) {
popup.type = 3;
} else {
perfectsInARow[slot] = 0;
return;
}

Expand Down

0 comments on commit 3930002

Please sign in to comment.