use renderutils
This commit is contained in:
parent
a392875940
commit
c219f078fb
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user