More graphical updates, some code cleanup, and minor fixes.
- The MenuButton class now fully supports hover effects (scale, fade, rotate) for Animations.
- Used a fixed location for the selection buttons in the song menu (previously based on the "back" button width, which varies widely in different skins).
- Added hover effects for "retry" and "exit" buttons in the ranking screen.
- Changed animation speed of back/skip buttons.
- Fixed a bug where main menu showed the incorrect number of songs loaded during searches.
- Removed unneeded draw() methods in Utils for color filters (since 69f5aa5).
- Moved Utils.drawCentered(Image, ...) into the Image class.
- Added overwritten Image class to Maven excludes.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -89,13 +89,13 @@ public class Circle implements HitObject {
|
||||
|
||||
float approachScale = 1 + scale * 3;
|
||||
color.a = 1 - scale;
|
||||
Utils.drawCentered(GameImage.APPROACHCIRCLE.getImage().getScaledCopy(approachScale), x, y, color);
|
||||
GameImage.APPROACHCIRCLE.getImage().getScaledCopy(approachScale).drawCentered(x, y, color);
|
||||
|
||||
float alpha = Utils.clamp((1 - scale) * 2, 0, 1);
|
||||
color.a = alpha;
|
||||
Utils.COLOR_WHITE_FADE.a = alpha;
|
||||
Utils.drawCentered(GameImage.HITCIRCLE.getImage(), x, y, color);
|
||||
Utils.drawCentered(GameImage.HITCIRCLE_OVERLAY.getImage(), x, y, Utils.COLOR_WHITE_FADE);
|
||||
GameImage.HITCIRCLE.getImage().drawCentered(x, y, color);
|
||||
GameImage.HITCIRCLE_OVERLAY.getImage().drawCentered(x, y, Utils.COLOR_WHITE_FADE);
|
||||
|
||||
color.a = oldAlpha;
|
||||
Utils.COLOR_WHITE_FADE.a = 1f;
|
||||
|
||||
@@ -174,12 +174,12 @@ public class Slider implements HitObject {
|
||||
|
||||
// end circle
|
||||
float[] endPos = curve.pointAt(1);
|
||||
Utils.drawCentered(hitCircle, endPos[0], endPos[1], color);
|
||||
Utils.drawCentered(hitCircleOverlay, endPos[0], endPos[1], Utils.COLOR_WHITE_FADE);
|
||||
hitCircle.drawCentered(endPos[0], endPos[1], color);
|
||||
hitCircleOverlay.drawCentered(endPos[0], endPos[1], Utils.COLOR_WHITE_FADE);
|
||||
|
||||
// start circle
|
||||
Utils.drawCentered(hitCircle, x, y, color);
|
||||
Utils.drawCentered(hitCircleOverlay, x, y, Utils.COLOR_WHITE_FADE);
|
||||
hitCircle.drawCentered(x, y, color);
|
||||
hitCircleOverlay.drawCentered(x, y, Utils.COLOR_WHITE_FADE);
|
||||
if (sliderClicked)
|
||||
; // don't draw current combo number if already clicked
|
||||
else
|
||||
@@ -213,7 +213,7 @@ public class Slider implements HitObject {
|
||||
if (timeDiff >= 0) {
|
||||
// approach circle
|
||||
color.a = 1 - scale;
|
||||
Utils.drawCentered(GameImage.APPROACHCIRCLE.getImage().getScaledCopy(approachScale), x, y, color);
|
||||
GameImage.APPROACHCIRCLE.getImage().getScaledCopy(approachScale).drawCentered(x, y, color);
|
||||
} else {
|
||||
float[] c = curve.pointAt(getT(trackPosition, false));
|
||||
float[] c2 = curve.pointAt(getT(trackPosition, false) + 0.01f);
|
||||
|
||||
@@ -174,11 +174,11 @@ public class CircumscribedCircle extends Curve {
|
||||
Image hitCircleOverlay = GameImage.HITCIRCLE_OVERLAY.getImage();
|
||||
for (int i = 0; i < step; i++) {
|
||||
float[] xy = pointAt(i / step);
|
||||
Utils.drawCentered(hitCircleOverlay, xy[0], xy[1], Utils.COLOR_WHITE_FADE);
|
||||
hitCircleOverlay.drawCentered(xy[0], xy[1], Utils.COLOR_WHITE_FADE);
|
||||
}
|
||||
for (int i = 0; i < step; i++) {
|
||||
float[] xy = pointAt(i / step);
|
||||
Utils.drawCentered(hitCircle, xy[0], xy[1], color);
|
||||
hitCircle.drawCentered(xy[0], xy[1], color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -164,9 +164,9 @@ public class LinearBezier extends Curve {
|
||||
Image hitCircle = GameImage.HITCIRCLE.getImage();
|
||||
Image hitCircleOverlay = GameImage.HITCIRCLE_OVERLAY.getImage();
|
||||
for (int i = curve.length - 2; i >= 0; i--)
|
||||
Utils.drawCentered(hitCircleOverlay, curve[i].x, curve[i].y, Utils.COLOR_WHITE_FADE);
|
||||
hitCircleOverlay.drawCentered(curve[i].x, curve[i].y, Utils.COLOR_WHITE_FADE);
|
||||
for (int i = curve.length - 2; i >= 0; i--)
|
||||
Utils.drawCentered(hitCircle, curve[i].x, curve[i].y, color);
|
||||
hitCircle.drawCentered(curve[i].x, curve[i].y, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user