mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:43:00 +08:00
Scale in the background fill alongside the icon
This commit is contained in:
parent
df9f49eef2
commit
66a6084d3f
@ -74,6 +74,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards.Buttons
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Masking = true,
|
Masking = true,
|
||||||
CornerRadius = BeatmapCard.CORNER_RADIUS,
|
CornerRadius = BeatmapCard.CORNER_RADIUS,
|
||||||
|
Scale = new Vector2(0.8f),
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@ -88,6 +89,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards.Buttons
|
|||||||
{
|
{
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
|
Scale = new Vector2(1.2f),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -127,7 +129,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards.Buttons
|
|||||||
bool isHovered = IsHovered && Enabled.Value;
|
bool isHovered = IsHovered && Enabled.Value;
|
||||||
|
|
||||||
hover.FadeTo(isHovered ? 1f : 0f, 500, Easing.OutQuint);
|
hover.FadeTo(isHovered ? 1f : 0f, 500, Easing.OutQuint);
|
||||||
Icon.ScaleTo(isHovered ? 1.2f : 1, 500, Easing.OutQuint);
|
content.ScaleTo(isHovered ? 1 : 0.8f, 500, Easing.OutQuint);
|
||||||
Icon.FadeColour(isHovered ? HoverColour : IdleColour, BeatmapCard.TRANSITION_DURATION, Easing.OutQuint);
|
Icon.FadeColour(isHovered ? HoverColour : IdleColour, BeatmapCard.TRANSITION_DURATION, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user