mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:52:55 +08:00
Move alpha handling to state
This commit is contained in:
parent
1c4bcdda96
commit
7504cd589d
@ -41,25 +41,23 @@ namespace osu.Game.Tests.Visual
|
||||
{
|
||||
Size = new Vector2(0.5f, 245),
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Top = 20,
|
||||
}
|
||||
});
|
||||
|
||||
AddStep("hide", () =>
|
||||
{
|
||||
infoWedge.State = Visibility.Hidden;
|
||||
Content.FadeOut(100);
|
||||
Margin = new MarginPadding { Top = 20 }
|
||||
});
|
||||
|
||||
AddStep("show", () =>
|
||||
{
|
||||
Content.FadeInFromZero(250);
|
||||
infoWedge.State = Visibility.Visible;
|
||||
infoWedge.UpdateBeatmap(beatmap);
|
||||
});
|
||||
|
||||
AddWaitStep(3);
|
||||
|
||||
AddStep("hide", () => { infoWedge.State = Visibility.Hidden; });
|
||||
|
||||
AddWaitStep(3);
|
||||
|
||||
AddStep("show", () => { infoWedge.State = Visibility.Visible; });
|
||||
|
||||
foreach (var rulesetInfo in rulesets.AvailableRulesets)
|
||||
{
|
||||
var ruleset = rulesetInfo.CreateInstance();
|
||||
|
@ -35,6 +35,7 @@ namespace osu.Game.Screens.Select
|
||||
Masking = true;
|
||||
BorderColour = new Color4(221, 255, 255, 255);
|
||||
BorderThickness = 2.5f;
|
||||
Alpha = 0;
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
Type = EdgeEffectType.Glow,
|
||||
@ -50,12 +51,14 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
this.MoveToX(0, 800, Easing.OutQuint);
|
||||
this.RotateTo(0, 800, Easing.OutQuint);
|
||||
this.FadeIn(250);
|
||||
}
|
||||
|
||||
protected override void PopOut()
|
||||
{
|
||||
this.MoveToX(-100, 800, Easing.InQuint);
|
||||
this.RotateTo(10, 800, Easing.InQuint);
|
||||
this.MoveToX(-100, 800, Easing.In);
|
||||
this.RotateTo(10, 800, Easing.In);
|
||||
this.FadeOut(500, Easing.In);
|
||||
}
|
||||
|
||||
public void UpdateBeatmap(WorkingBeatmap beatmap)
|
||||
@ -68,7 +71,7 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
// ensure we ourselves are visible if not already.
|
||||
if (!IsPresent)
|
||||
this.FadeIn(250);
|
||||
State = Visibility.Visible;
|
||||
|
||||
Info?.FadeOut(250);
|
||||
Info?.Expire();
|
||||
|
@ -121,7 +121,6 @@ namespace osu.Game.Screens.Select
|
||||
},
|
||||
beatmapInfoWedge = new BeatmapInfoWedge
|
||||
{
|
||||
Alpha = 0,
|
||||
Size = wedged_container_size,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Margin = new MarginPadding
|
||||
|
Loading…
Reference in New Issue
Block a user