mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 10:22:56 +08:00
Rename shear variable
This commit is contained in:
parent
f2861c0c7d
commit
6ed9c983ff
@ -31,7 +31,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
private const float shear_width = 5f;
|
||||
|
||||
private static readonly Vector2 shearing = new Vector2(shear_width / Footer.HEIGHT, 0);
|
||||
private static readonly Vector2 shear = new Vector2(shear_width / Footer.HEIGHT, 0);
|
||||
|
||||
public static readonly Vector2 SIZE_EXTENDED = new Vector2(140, 50);
|
||||
public static readonly Vector2 SIZE_RETRACTED = new Vector2(100, 50);
|
||||
@ -59,7 +59,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
c1.Origin = c1.Anchor = value.HasFlag(Anchor.x2) ? Anchor.TopLeft : Anchor.TopRight;
|
||||
c2.Origin = c2.Anchor = value.HasFlag(Anchor.x2) ? Anchor.TopRight : Anchor.TopLeft;
|
||||
|
||||
X = value.HasFlag(Anchor.x2) ? SIZE_RETRACTED.X * shearing.X * 0.5f : 0;
|
||||
X = value.HasFlag(Anchor.x2) ? SIZE_RETRACTED.X * shear.X * 0.5f : 0;
|
||||
|
||||
Remove(c1);
|
||||
Remove(c2);
|
||||
@ -73,7 +73,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
public TwoLayerButton()
|
||||
{
|
||||
Size = SIZE_RETRACTED;
|
||||
Shear = shearing;
|
||||
Shear = shear;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -108,7 +108,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Shear = -shearing,
|
||||
Shear = -shear,
|
||||
},
|
||||
}
|
||||
},
|
||||
@ -147,7 +147,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
Shear = -shearing,
|
||||
Shear = -shear,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user