diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index 86e76295..95f1d244 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -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; } diff --git a/src/itdelatrisu/opsu/ui/Cursor.java b/src/itdelatrisu/opsu/ui/Cursor.java index 9c15a2f0..6f1ae914 100644 --- a/src/itdelatrisu/opsu/ui/Cursor.java +++ b/src/itdelatrisu/opsu/ui/Cursor.java @@ -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); diff --git a/src/yugecin/opsudance/ReplayPlayback.java b/src/yugecin/opsudance/ReplayPlayback.java index 5a7095e5..df3d6a1f 100644 --- a/src/yugecin/opsudance/ReplayPlayback.java +++ b/src/yugecin/opsudance/ReplayPlayback.java @@ -27,6 +27,7 @@ import yugecin.opsudance.core.DisplayContainer; public class ReplayPlayback { + private final DisplayContainer container; public final Replay replay; public ReplayFrame currentFrame; public ReplayFrame nextFrame; @@ -38,7 +39,8 @@ public class ReplayPlayback { private boolean hr; private String player; - public ReplayPlayback(Replay replay, Color color) { + public ReplayPlayback(DisplayContainer container, Replay replay, Color color) { + this.container = container; this.replay = replay; resetFrameIndex(); this.color = color; @@ -116,7 +118,7 @@ public class ReplayPlayback { Fonts.SMALLBOLD.drawString(SQSIZE * 5, ypos, this.player, color); int y = currentFrame.getScaledY(); if (hr) { - y = DisplayContainer.instance.height - y; + y = container.height - y; } cursor.setCursorPosition(renderdelta, currentFrame.getScaledX(), y); cursor.draw(false);