fade out sliders when hidden is enabled

This commit is contained in:
yugecin 2016-12-10 01:54:29 +01:00
parent 38daee002f
commit 7a45e1abbb

View File

@ -188,9 +188,14 @@ public class Slider implements GameObject {
Image hitCircle = GameImage.HITCIRCLE.getImage(); Image hitCircle = GameImage.HITCIRCLE.getImage();
Vec2f endPos = curve.pointAt(1); Vec2f endPos = curve.pointAt(1);
float oldWHITE_FADEalpha = Colors.WHITE_FADE.a;
float sliderAlpha = 1f;
if (GameMod.HIDDEN.isActive() && trackPosition > hitObject.getTime()) {
Colors.WHITE_FADE.a = color.a = sliderAlpha = Math.max(0f, 1f - ((float) (trackPosition - hitObject.getTime()) / (getEndTime() - hitObject.getTime())) * 1.05f);
}
float curveInterval = Options.isSliderSnaking() ? alpha : 1f; float curveInterval = Options.isSliderSnaking() ? alpha : 1f;
curve.draw(color,curveInterval); curve.draw(color,curveInterval);
color.a = alpha;
// end circle // end circle
Vec2f endCircPos = curve.pointAt(curveInterval); Vec2f endCircPos = curve.pointAt(curveInterval);
@ -202,6 +207,9 @@ public class Slider implements GameObject {
if (!overlayAboveNumber) if (!overlayAboveNumber)
hitCircleOverlay.drawCentered(x, y, Colors.WHITE_FADE); hitCircleOverlay.drawCentered(x, y, Colors.WHITE_FADE);
Colors.WHITE_FADE.a = oldWHITE_FADEalpha;
color.a = alpha;
// ticks // ticks
if (ticksT != null) { if (ticksT != null) {
float tickScale = 0.5f + 0.5f * AnimationEquation.OUT_BACK.calc(decorationsAlpha); float tickScale = 0.5f + 0.5f * AnimationEquation.OUT_BACK.calc(decorationsAlpha);
@ -226,8 +234,13 @@ public class Slider implements GameObject {
else else
data.drawSymbolNumber(hitObject.getComboNumber(), x, y, data.drawSymbolNumber(hitObject.getComboNumber(), x, y,
hitCircle.getWidth() * 0.40f / data.getDefaultSymbolImage(0).getHeight(), alpha); hitCircle.getWidth() * 0.40f / data.getDefaultSymbolImage(0).getHeight(), alpha);
if (overlayAboveNumber)
if (overlayAboveNumber) {
oldWHITE_FADEalpha = Colors.WHITE_FADE.a;
Colors.WHITE_FADE.a = sliderAlpha;
hitCircleOverlay.drawCentered(x, y, Colors.WHITE_FADE); hitCircleOverlay.drawCentered(x, y, Colors.WHITE_FADE);
Colors.WHITE_FADE.a = oldWHITE_FADEalpha;
}
// repeats // repeats
if (curveInterval == 1.0f) { if (curveInterval == 1.0f) {