Skip to content

Commit

Permalink
Merge pull request #47 from DizzyJune/master
Browse files Browse the repository at this point in the history
made colors more consistent, contrasted, and also made negative score upload results red :)
  • Loading branch information
NSGolova authored Sep 11, 2024
2 parents 95b6255 + 63e229e commit 9dec119
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/UI/ScoreDetails/GeneralScoreDetails.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ string GetDetailsString(const Score& score) {
}

result << "<size=70%>";
if (score.fullCombo) result << "<color=#88FF88>Full Combo</color> ";
if (score.missedNotes > 0) result << "<color=#888888>Misses: <color=#FF8888>" << to_string(score.missedNotes) + "</color> ";
if (score.badCuts > 0) result << "<color=#888888>Bad cuts: <color=#FF8888>" << to_string(score.badCuts) + "</color> ";
if (score.bombCuts > 0) result << "<color=#888888>Bomb cuts: <color=#FF8888>" << to_string(score.bombCuts) + "</color> ";
if (score.wallsHit > 0) result << "<color=#888888>Walls hit: <color=#FF8888>" << to_string(score.wallsHit) + "</color> ";
if (score.fullCombo) result << "<color=#20BB20>Full Combo</color> ";
if (score.missedNotes > 0) result << "<color=#888888>Misses: <color=#BB2020>" << to_string(score.missedNotes) + "</color> ";
if (score.badCuts > 0) result << "<color=#888888>Bad cuts: <color=#BB2020>" << to_string(score.badCuts) + "</color> ";
if (score.bombCuts > 0) result << "<color=#888888>Bomb cuts: <color=#BB2020>" << to_string(score.bombCuts) + "</color> ";
if (score.wallsHit > 0) result << "<color=#888888>Walls hit: <color=#BB2020>" << to_string(score.wallsHit) + "</color> ";
result << "</size>";

return result.str();
Expand Down
8 changes: 4 additions & 4 deletions src/Utils/ReplayManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ void ReplayManager::ProcessReplay(Replay const &replay, PlayEndData status, bool
BeatLeaderLogger.info("{}",("Replay saved " + filename).c_str());

if(!UploadEnabled()) {
finished(ReplayUploadStatus::finished, "<color=#800000ff>Upload disabled. But replay was saved.</color>", 0, -1);
finished(ReplayUploadStatus::finished, "<color=#BB2020ff>Upload disabled. But replay was saved.</color>", 0, -1);
return;
}

if (replay.info.failTime > 0.001 || replay.info.speed > 0.001) {
finished(ReplayUploadStatus::finished, "<color=#800000ff>Failed attempt was saved!</color>", 0, -1);
finished(ReplayUploadStatus::finished, "<color=#BB2020ff>Failed attempt was saved!</color>", 0, -1);
}
if(skipUpload)
return;
Expand Down Expand Up @@ -70,7 +70,7 @@ void ReplayManager::TryPostReplay(string name, PlayEndData status, int tryIndex,
auto duration = chrono::duration_cast<std::chrono::milliseconds>(chrono::steady_clock::now() - replayPostStart).count();
BeatLeaderLogger.info("{}", ("Replay was posted! It took: " + to_string((int)duration) + "msec. \n").c_str());
if (runCallback) {
finished(ReplayUploadStatus::finished, "<color=#008000ff>Replay was posted!</color>", 100, statusCode);
finished(ReplayUploadStatus::finished, "<color=#20BB20ff>Replay was posted!</color>", 100, statusCode);
}
if (!getModConfig().SaveLocalReplays.GetValue()) {
remove(name.data());
Expand All @@ -82,7 +82,7 @@ void ReplayManager::TryPostReplay(string name, PlayEndData status, int tryIndex,
}
BeatLeaderLogger.error("{}", ("Replay was not posted! " + to_string(statusCode) + result).c_str());
if (runCallback) {
finished(ReplayUploadStatus::error, std::string("<color=#008000ff>Replay was not posted. " + result), 0, statusCode);
finished(ReplayUploadStatus::error, std::string("<color=#BB2020ff>Replay was not posted. " + result), 0, statusCode);
}
}
}, [finished, runCallback](float percent) {
Expand Down

0 comments on commit 9dec119

Please sign in to comment.