mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 06:52:59 +08:00
Rename variables to make more sense
This commit is contained in:
parent
f6ea5b0590
commit
322dd1bd05
@ -287,7 +287,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
case MenuState.Exit:
|
case MenuState.Exit:
|
||||||
case MenuState.Initial:
|
case MenuState.Initial:
|
||||||
trackingPosition = false;
|
logoTracking = false;
|
||||||
|
|
||||||
logo?.Delay(150)
|
logo?.Delay(150)
|
||||||
.Schedule(() =>
|
.Schedule(() =>
|
||||||
@ -307,20 +307,20 @@ namespace osu.Game.Screens.Menu
|
|||||||
logo.ClearTransforms(targetMember: nameof(Position));
|
logo.ClearTransforms(targetMember: nameof(Position));
|
||||||
logo.RelativePositionAxes = Axes.None;
|
logo.RelativePositionAxes = Axes.None;
|
||||||
|
|
||||||
trackingPosition = true;
|
logoTracking = true;
|
||||||
|
|
||||||
switch (lastState)
|
switch (lastState)
|
||||||
{
|
{
|
||||||
case MenuState.Initial:
|
case MenuState.Initial:
|
||||||
logo.ScaleTo(0.5f, 200, Easing.In);
|
logo.ScaleTo(0.5f, 200, Easing.In);
|
||||||
|
|
||||||
trackingPosition = false;
|
logoTracking = false;
|
||||||
|
|
||||||
logo
|
logo
|
||||||
.MoveTo(iconTrackingPosition, lastState == MenuState.EnteringMode ? 0 : 200, Easing.In)
|
.MoveTo(logoTrackingPosition, lastState == MenuState.EnteringMode ? 0 : 200, Easing.In)
|
||||||
.OnComplete(o =>
|
.OnComplete(o =>
|
||||||
{
|
{
|
||||||
trackingPosition = true;
|
logoTracking = true;
|
||||||
|
|
||||||
o.Impact();
|
o.Impact();
|
||||||
toolbar?.Show();
|
toolbar?.Show();
|
||||||
@ -332,14 +332,14 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MenuState.EnteringMode:
|
case MenuState.EnteringMode:
|
||||||
trackingPosition = true;
|
logoTracking = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Vector2 iconTrackingPosition => logo.Parent.ToLocalSpace(iconFacade.ScreenSpaceDrawQuad.Centre);
|
private Vector2 logoTrackingPosition => logo.Parent.ToLocalSpace(iconFacade.ScreenSpaceDrawQuad.Centre);
|
||||||
|
|
||||||
private bool trackingPosition;
|
private bool logoTracking;
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
@ -350,8 +350,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
if (logo != null)
|
if (logo != null)
|
||||||
{
|
{
|
||||||
if (trackingPosition)
|
if (logoTracking)
|
||||||
logo.Position = iconTrackingPosition;
|
logo.Position = logoTrackingPosition;
|
||||||
|
|
||||||
iconFacade.Width = logo.SizeForFlow * 0.5f;
|
iconFacade.Width = logo.SizeForFlow * 0.5f;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user