Use map title to get initial rainbow colors

This commit is contained in:
yugecin 2016-10-01 15:00:12 +02:00
parent 38d5c64a26
commit 3a507453f9
3 changed files with 11 additions and 0 deletions

View File

@ -1331,6 +1331,9 @@ public class Game extends BasicGameState {
mirrorFrom = 0;
mirrorTo = gameObjects.length;
ObjectColorOverrides.reset(beatmap.getTitle());
CursorColorOverrides.reset(beatmap.getTitle());
skipButton.resetHover();
if (isReplay || GameMod.AUTO.isActive())
playbackSpeed.getButton().resetHover();

View File

@ -76,6 +76,10 @@ public enum CursorColorOverrides {
this.nr = nr;
}
public static void reset(String mapname) {
hue = mapname.hashCode() % 360;
}
@Override
public String toString() {
return displayText;

View File

@ -78,6 +78,10 @@ public enum ObjectColorOverrides {
this.nr = nr;
}
public static void reset(String mapname) {
hue = mapname.hashCode() % 360;
}
@Override
public String toString() {
return displayText;