post merge stuff

This commit is contained in:
yugecin
2017-03-30 00:06:13 +02:00
parent 3629dfd4d7
commit 9df139bded
3 changed files with 17 additions and 4 deletions

View File

@@ -1492,7 +1492,7 @@ public class Game extends ComplexOpsuState {
EventBus.post(new BubbleNotificationEvent("could not load replay " + file.getName(), BubbleNotificationEvent.COMMONCOLOR_RED));
continue;
}
replays.add(new ReplayPlayback(r, new Color(java.awt.Color.getHSBColor((hue) / 360f, 1.0f, 1.0f).getRGB())));
replays.add(new ReplayPlayback(displayContainer, r, new Color(java.awt.Color.getHSBColor((hue) / 360f, 1.0f, 1.0f).getRGB())));
hue += hueshift;
}

View File

@@ -67,6 +67,8 @@ public class Cursor {
private boolean isMirrored;
private Color filter;
public Cursor() {
this(false);
}
@@ -76,6 +78,11 @@ public class Cursor {
this.isMirrored = isMirrored;
}
public Cursor(Color filter) {
this(false);
this.filter = filter;
}
/**
* Draws the cursor.
* @param mousePressed whether or not the mouse button is pressed
@@ -130,6 +137,10 @@ public class Cursor {
lastCursorColor = filter = Dancer.cursorColorOverride.getColor();
}
if (this.filter != null) {
filter = this.filter;
}
// draw a fading trail
float alpha = 0f;
float t = 2f / trail.size();
@@ -138,7 +149,7 @@ public class Cursor {
cursorTrail.startUse();
for (Point p : trail) {
alpha += t;
cursorTrail.setImageColor(filter.r, filter.g, filter.b, alpha);
cursorTrail.setImageColor(filter.r, filter.g, filter.b, alpha * 0.2f);
cursorTrail.drawEmbedded(
p.x - (cursorTrailWidth / 2f), p.y - (cursorTrailHeight / 2f),
cursorTrailWidth, cursorTrailHeight, cursorTrailRotation);