mirror of
https://github.com/osukey/osukey.git
synced 2025-05-17 03:27:21 +09:00
Ensure we always remain fully visible on any aspect ratio (including very tall ones).
This commit is contained in:
parent
cc14aeb802
commit
0178e23b73
@ -1,6 +1,7 @@
|
|||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
|
||||||
@ -13,7 +14,9 @@ namespace osu.Game.Graphics.Processing
|
|||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
Scale = new Vector2(Parent.ActualSize.Y / 768f);
|
Vector2 parent = Parent.ActualSize;
|
||||||
|
|
||||||
|
Scale = new Vector2(Math.Min(parent.Y / 768f, parent.X / 1024f));
|
||||||
Size = new Vector2(1 / Scale.X);
|
Size = new Vector2(1 / Scale.X);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user