1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-08 00:42:57 +08:00

Flip anchors and origins

This commit is contained in:
smoogipoo 2020-03-31 15:59:52 +09:00
parent 9a37a328b6
commit b805ed6bf1

View File

@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Mania.Skinning
{ {
InternalChild = directionContainer = new Container InternalChild = directionContainer = new Container
{ {
Anchor = Anchor.TopCentre, Origin = Anchor.BottomCentre,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Child = noteSprite = new Sprite { Texture = GetTexture(skin) } Child = noteSprite = new Sprite { Texture = GetTexture(skin) }
@ -56,12 +56,12 @@ namespace osu.Game.Rulesets.Mania.Skinning
{ {
if (direction.NewValue == ScrollingDirection.Up) if (direction.NewValue == ScrollingDirection.Up)
{ {
directionContainer.Origin = Anchor.BottomCentre; directionContainer.Anchor = Anchor.TopCentre;
directionContainer.Scale = new Vector2(1, -1); directionContainer.Scale = new Vector2(1, -1);
} }
else else
{ {
directionContainer.Origin = Anchor.TopCentre; directionContainer.Anchor = Anchor.BottomCentre;
directionContainer.Scale = Vector2.One; directionContainer.Scale = Vector2.One;
} }
} }