mirror of
https://github.com/osukey/osukey.git
synced 2025-05-08 07:07:18 +09:00
Improve the transition and look of white-boxed game modes.
This commit is contained in:
parent
0178e23b73
commit
665352f706
@ -25,6 +25,7 @@ namespace osu.Game.GameModes
|
|||||||
protected virtual IEnumerable<Type> PossibleChildren => null;
|
protected virtual IEnumerable<Type> PossibleChildren => null;
|
||||||
|
|
||||||
private FlowContainer childModeButtons;
|
private FlowContainer childModeButtons;
|
||||||
|
private Container textContainer;
|
||||||
|
|
||||||
protected override double OnEntering(GameMode last)
|
protected override double OnEntering(GameMode last)
|
||||||
{
|
{
|
||||||
@ -32,26 +33,33 @@ namespace osu.Game.GameModes
|
|||||||
if (last != null)
|
if (last != null)
|
||||||
popButton.Alpha = 1;
|
popButton.Alpha = 1;
|
||||||
|
|
||||||
MoveTo(new Vector2(ActualSize.X, 0));
|
Content.Alpha = 0;
|
||||||
MoveTo(Vector2.Zero, transition_time, EasingTypes.OutQuint);
|
textContainer.Position = new Vector2(ActualSize.X / 16, 0);
|
||||||
return transition_time;
|
|
||||||
|
Content.Delay(300);
|
||||||
|
textContainer.MoveTo(Vector2.Zero, transition_time, EasingTypes.OutExpo);
|
||||||
|
Content.FadeIn(transition_time, EasingTypes.OutExpo);
|
||||||
|
return 0;// transition_time * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override double OnExiting(GameMode next)
|
protected override double OnExiting(GameMode next)
|
||||||
{
|
{
|
||||||
MoveTo(new Vector2(ActualSize.X, 0), transition_time, EasingTypes.OutQuint);
|
textContainer.MoveTo(new Vector2((ActualSize.X / 16), 0), transition_time, EasingTypes.OutExpo);
|
||||||
|
Content.FadeOut(transition_time, EasingTypes.OutExpo);
|
||||||
return transition_time;
|
return transition_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override double OnSuspending(GameMode next)
|
protected override double OnSuspending(GameMode next)
|
||||||
{
|
{
|
||||||
Content.MoveTo(new Vector2(-ActualSize.X, 0), transition_time, EasingTypes.OutQuint);
|
textContainer.MoveTo(new Vector2(-(ActualSize.X / 16), 0), transition_time, EasingTypes.OutExpo);
|
||||||
|
Content.FadeOut(transition_time, EasingTypes.OutExpo);
|
||||||
return transition_time;
|
return transition_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override double OnResuming(GameMode last)
|
protected override double OnResuming(GameMode last)
|
||||||
{
|
{
|
||||||
Content.MoveTo(Vector2.Zero, transition_time, EasingTypes.OutQuint);
|
textContainer.MoveTo(Vector2.Zero, transition_time, EasingTypes.OutExpo);
|
||||||
|
Content.FadeIn(transition_time, EasingTypes.OutExpo);
|
||||||
return transition_time;
|
return transition_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,24 +72,34 @@ namespace osu.Game.GameModes
|
|||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
SizeMode = InheritMode.XY,
|
SizeMode = InheritMode.XY,
|
||||||
Size = new Vector2(1),
|
Size = new Vector2(0.7f),
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Colour = getColourFor(GetType())
|
Colour = getColourFor(GetType()),
|
||||||
|
Alpha = 0.6f,
|
||||||
|
Additive = true
|
||||||
},
|
},
|
||||||
new SpriteText
|
textContainer = new AutoSizeContainer
|
||||||
{
|
{
|
||||||
Text = GetType().Name,
|
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
TextSize = 50,
|
Children = new[]
|
||||||
},
|
{
|
||||||
new SpriteText
|
new SpriteText
|
||||||
{
|
{
|
||||||
Text = GetType().Namespace,
|
Text = GetType().Name,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Position = new Vector2(0, 30)
|
TextSize = 50,
|
||||||
|
},
|
||||||
|
new SpriteText
|
||||||
|
{
|
||||||
|
Text = GetType().Namespace,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Position = new Vector2(0, 30)
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
popButton = new Button
|
popButton = new Button
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user