osu/osu.Game/Graphics/Processing/RatioAdjust.cs

20 lines
530 B
C#
Raw Normal View History

2016-08-26 03:28:23 +00:00
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
2016-08-26 08:27:49 +00:00
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2016-08-26 03:28:23 +00:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using OpenTK;
namespace osu.Game.Graphics.Processing
{
class RatioAdjust : LargeContainer
{
protected override void Update()
{
base.Update();
Scale = Parent.ActualSize.Y / 768f;
Size = new Vector2(1 / Scale);
}
}
}