diff --git a/src/yugecin/opsudance/sbv2/StoryboardMoveImpl.java b/src/yugecin/opsudance/sbv2/StoryboardMoveImpl.java index 5edefd8d..8ede9055 100644 --- a/src/yugecin/opsudance/sbv2/StoryboardMoveImpl.java +++ b/src/yugecin/opsudance/sbv2/StoryboardMoveImpl.java @@ -21,6 +21,7 @@ import itdelatrisu.opsu.objects.curves.Vec2f; import itdelatrisu.opsu.ui.Fonts; import org.newdawn.slick.Color; import org.newdawn.slick.Graphics; +import yugecin.opsudance.render.RenderUtils; import yugecin.opsudance.sbv2.movers.StoryboardMover; import java.util.ArrayList; @@ -210,11 +211,11 @@ public class StoryboardMoveImpl implements StoryboardMove { int dif = y; y += Fonts.SMALL.getLineHeight() * 1.1f; dif = y - dif; - g.fillRect(screenWidth - 20, y - dif / 2 - 5, 10, 10); + RenderUtils.fillCenteredRect(g, screenWidth - 20, y - dif / 2, 5); } g.setColor(Color.cyan); for (Vec2f point : midPoints) { - g.fillRect(point.x - POINTSIZE, point.y - POINTSIZE, POINTSIZE * 2 + 1, POINTSIZE * 2 + 1); + RenderUtils.fillCenteredRect(g, point.x, point.y, POINTSIZE); } } diff --git a/src/yugecin/opsudance/sbv2/movers/StoryboardMover.java b/src/yugecin/opsudance/sbv2/movers/StoryboardMover.java index e3a2f72f..b7653ee1 100644 --- a/src/yugecin/opsudance/sbv2/movers/StoryboardMover.java +++ b/src/yugecin/opsudance/sbv2/movers/StoryboardMover.java @@ -21,6 +21,7 @@ import itdelatrisu.opsu.Utils; import itdelatrisu.opsu.objects.curves.Vec2f; import org.newdawn.slick.Color; import org.newdawn.slick.Graphics; +import yugecin.opsudance.render.RenderUtils; public abstract class StoryboardMover { @@ -76,7 +77,7 @@ public abstract class StoryboardMover { g.setColor(renderColor); for (float t = 0; t <= 1f; t += StoryboardMover.CALC_DRAW_INTERVAL) { float[] p = getPointAt(t); - g.fillRect(p[0] - 1, p[1] - 1, 3, 3); + RenderUtils.fillCenteredRect(g, p[0], p[1], 1); } } diff --git a/src/yugecin/opsudance/sbv2/movers/StoryboardMultipointMover.java b/src/yugecin/opsudance/sbv2/movers/StoryboardMultipointMover.java index d54388d4..687c60bb 100644 --- a/src/yugecin/opsudance/sbv2/movers/StoryboardMultipointMover.java +++ b/src/yugecin/opsudance/sbv2/movers/StoryboardMultipointMover.java @@ -20,6 +20,7 @@ package yugecin.opsudance.sbv2.movers; import itdelatrisu.opsu.objects.curves.Vec2f; import org.newdawn.slick.Color; import org.newdawn.slick.Graphics; +import yugecin.opsudance.render.RenderUtils; import java.util.ArrayList; import java.util.List; @@ -77,9 +78,16 @@ public abstract class StoryboardMultipointMover extends StoryboardMover { @Override public void render(Graphics g) { + g.setColor(Color.gray); + Vec2f lastPoint = start; + for (Vec2f point : points) { + RenderUtils.drawDottedLine(g, lastPoint.x, lastPoint.y, point.x, point.y, 20, 0); + lastPoint = point; + } + RenderUtils.drawDottedLine(g, lastPoint.x, lastPoint.y, end.x, end.y, 20, 0); g.setColor(pointColor); for (Vec2f point : points) { - g.fillRect(point.x - POINTSIZE, point.y - POINTSIZE, POINTSIZE * 2 + 1, POINTSIZE * 2 + 1); + RenderUtils.fillCenteredRect(g, point.x, point.y, POINTSIZE); } super.render(g); }