mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 14:13:01 +08:00
Clean up
This commit is contained in:
parent
12ef99a1a1
commit
0243f8d6ac
@ -81,7 +81,6 @@ namespace osu.Game.Extensions
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Keeps the drawable upright and prevents it from being scaled or flipped with its Parent.
|
||||
/// </summary>
|
||||
@ -90,7 +89,7 @@ namespace osu.Game.Extensions
|
||||
{
|
||||
var parentMatrix = drawable.Parent.DrawInfo.Matrix;
|
||||
float angle = MathF.Atan(parentMatrix.M12 / parentMatrix.M11);
|
||||
angle *= (360 / (2 * MathF.PI));
|
||||
angle = MathHelper.RadiansToDegrees(angle);
|
||||
|
||||
parentMatrix.Transpose();
|
||||
parentMatrix.M13 = 0.0f;
|
||||
@ -117,7 +116,6 @@ namespace osu.Game.Extensions
|
||||
|
||||
drawable.Scale = new Vector2(sx, sy);
|
||||
drawable.Shear = new Vector2(-alpha, -beta);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,5 +18,4 @@ namespace osu.Game.Graphics.Containers
|
||||
Width = Math.Max(Child.Width, Width);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
@ -148,10 +147,9 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
private void keepTextSpritesUpright()
|
||||
{
|
||||
timeCurrentContainer.OnUpdate += (timeCurrentContainer) => { Extensions.DrawableExtensions.KeepUprightAndUnscaled(timeCurrentContainer); };
|
||||
progressContainer.OnUpdate += (progressContainer) => { Extensions.DrawableExtensions.KeepUprightAndUnscaled(progressContainer); };
|
||||
timeLeftContainer.OnUpdate += (timeLeftContainer) => { Extensions.DrawableExtensions.KeepUprightAndUnscaled(timeLeftContainer); };
|
||||
timeCurrentContainer.OnUpdate += Extensions.DrawableExtensions.KeepUprightAndUnscaled;
|
||||
progressContainer.OnUpdate += Extensions.DrawableExtensions.KeepUprightAndUnscaled;
|
||||
timeLeftContainer.OnUpdate += Extensions.DrawableExtensions.KeepUprightAndUnscaled;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user