mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 11:12:54 +08:00
use margins isntead of moving the position of the sprite
This commit is contained in:
parent
51d26d2d71
commit
452f201f06
@ -129,7 +129,8 @@ namespace osu.Game.Screens.Menu
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(32),
|
||||
Position = new Vector2(0, -4),
|
||||
Position = new Vector2(0, 0),
|
||||
Margin = new MarginPadding { Top = -4 },
|
||||
Icon = symbol
|
||||
},
|
||||
new OsuSpriteText
|
||||
@ -138,7 +139,8 @@ namespace osu.Game.Screens.Menu
|
||||
AllowMultiline = false,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Position = new Vector2(-3, 35),
|
||||
Position = new Vector2(0, 35),
|
||||
Margin = new MarginPadding { Left = -3 },
|
||||
Text = text
|
||||
}
|
||||
}
|
||||
@ -189,7 +191,7 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
icon.ClearTransforms();
|
||||
icon.RotateTo(0, 500, Easing.Out);
|
||||
icon.MoveTo(new Vector2(0, -4), 500, Easing.Out);
|
||||
icon.MoveTo(Vector2.Zero, 500, Easing.Out);
|
||||
icon.ScaleTo(Vector2.One, 200, Easing.Out);
|
||||
|
||||
if (State == ButtonState.Expanded)
|
||||
|
Loading…
Reference in New Issue
Block a user