diff --git a/osu-framework b/osu-framework index 1b97dd48c3..342214329f 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 1b97dd48c3efa59f97907d7868f007c999686e66 +Subproject commit 342214329f60e73b8e458232390dcb2488e2149f diff --git a/osu.Game/GameModes/FieldTest.cs b/osu.Game/GameModes/FieldTest.cs index a27698cdc1..58df93eee3 100644 --- a/osu.Game/GameModes/FieldTest.cs +++ b/osu.Game/GameModes/FieldTest.cs @@ -122,7 +122,7 @@ namespace osu.Game.GameModes protected override bool OnClick(InputState state) { - Scale = 1.5f; + Scale = new Vector2(1.5f); ScaleTo(1, 500, EasingTypes.In); Activated?.Invoke(); diff --git a/osu.Game/GameModes/FontTest.cs b/osu.Game/GameModes/FontTest.cs index 2617b3ee19..a24acd73c8 100644 --- a/osu.Game/GameModes/FontTest.cs +++ b/osu.Game/GameModes/FontTest.cs @@ -13,6 +13,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Drawables; using osu.Framework.Graphics.Sprites; using osu.Game.Graphics.Containers; +using OpenTK; namespace osu.Game.GameModes { @@ -36,7 +37,7 @@ namespace osu.Game.GameModes SpriteText text = new SpriteText() { Text = $@"Font testy at size {i}", - Scale = i + Scale = new Vector2(i) }; flow.Add(text); diff --git a/osu.Game/GameModes/Menu/ButtonSystem.cs b/osu.Game/GameModes/Menu/ButtonSystem.cs index 897c1655d4..acee3e35b8 100644 --- a/osu.Game/GameModes/Menu/ButtonSystem.cs +++ b/osu.Game/GameModes/Menu/ButtonSystem.cs @@ -279,7 +279,7 @@ namespace osu.Game.GameModes.Menu private MenuVisualisation vis; private Action clickAction; - public float SizeForFlow => logo == null ? 0 : logo.ActualSize.X * logo.Scale * logoBounceContainer.Scale * 0.8f; + public float SizeForFlow => logo == null ? 0 : logo.ActualSize.X * logo.Scale.X * logoBounceContainer.Scale.X * 0.8f; public override void Load() { @@ -424,7 +424,7 @@ namespace osu.Game.GameModes.Menu Anchor = Anchor.Centre, Origin = Anchor.Centre, Colour = colour, - VectorScale = new Vector2(0, 1) + Scale = new Vector2(0, 1) }); iconText = new AutoSizeContainer @@ -440,7 +440,7 @@ namespace osu.Game.GameModes.Menu { Anchor = Anchor.Centre, Origin = Anchor.Centre, - Scale = 0.7f, + Scale = new Vector2(0.7f), }; iconText.Add(icon); @@ -588,8 +588,8 @@ namespace osu.Game.GameModes.Menu protected override void Update() { - HandleInput = state != ButtonState.Exploded && box.VectorScale.X >= 0.8f; - iconText.Alpha = MathHelper.Clamp((box.VectorScale.X - 0.5f) / 0.3f, 0, 1); + HandleInput = state != ButtonState.Exploded && box.Scale.X >= 0.8f; + iconText.Alpha = MathHelper.Clamp((box.Scale.X - 0.5f) / 0.3f, 0, 1); base.Update(); } @@ -663,7 +663,7 @@ namespace osu.Game.GameModes.Menu Quad q = base.DrawQuad; //Will become infinite if we don't limit its maximum size. - float wedge = Math.Min(q.Width, wedgeWidth / Scale / VectorScale.X); + float wedge = Math.Min(q.Width, wedgeWidth / Scale.X); q.TopLeft.X += wedge; q.BottomRight.X -= wedge; diff --git a/osu.Game/Graphics/Processing/RatioAdjust.cs b/osu.Game/Graphics/Processing/RatioAdjust.cs index 6aeb9dbb9d..2f3a7d3a2a 100644 --- a/osu.Game/Graphics/Processing/RatioAdjust.cs +++ b/osu.Game/Graphics/Processing/RatioAdjust.cs @@ -12,8 +12,8 @@ namespace osu.Game.Graphics.Processing protected override void Update() { base.Update(); - Scale = Parent.ActualSize.Y / 768f; - Size = new Vector2(1 / Scale); + Scale = new Vector2(Parent.ActualSize.Y / 768f); + Size = new Vector2(1 / Scale.X); } } } diff --git a/osu.Game/Graphics/UserInterface/TextBox.cs b/osu.Game/Graphics/UserInterface/TextBox.cs index a9551a10c0..9a1fc58ebb 100644 --- a/osu.Game/Graphics/UserInterface/TextBox.cs +++ b/osu.Game/Graphics/UserInterface/TextBox.cs @@ -70,8 +70,8 @@ namespace osu.Game.Graphics.UserInterface SizeMode = InheritMode.Y, Alpha = 0 }; - TextContainer.Add(cursor); + TextContainer.Add(cursor); TextContainer.Add(textFlow); } diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index c77e4f5c70..084e4410e8 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -46,7 +46,7 @@ namespace osu.Game //}; //API.Queue(req); - AddProcessingContainer(new RatioAdjust()); + AddProcessing(new RatioAdjust()); //Add(new FontTest()); @@ -62,10 +62,10 @@ namespace osu.Game base.Dispose(isDisposing); } - public override bool Invalidate(bool affectsSize = true, bool affectsPosition = true, Drawable source = null) + public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true) { - if (!base.Invalidate(affectsSize, affectsPosition, source)) return false; - + if (!base.Invalidate(invalidation, source, shallPropagate)) return false; + if (Parent != null) { Parent.Width = Config.Set(OsuConfig.Width, ActualSize.X).Value;