From f2546d72c2616f4d3d746d27b9fea061998591d7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 29 Jan 2024 20:45:51 +0900 Subject: [PATCH 1/2] Fix osu! logo being mispositioned in song select on very wide resolutions --- osu.Game/Screens/Select/SongSelect.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index bf1724995a..50467bc089 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -642,7 +642,11 @@ namespace osu.Game.Screens.Select { base.LogoArriving(logo, resuming); - Vector2 position = new Vector2(0.95f, 0.96f); + logo.Anchor = Anchor.BottomRight; + logo.Origin = Anchor.Centre; + logo.RelativePositionAxes = Axes.None; + + Vector2 position = new Vector2(-76, -36); if (logo.Alpha > 0.8f) { From acc2614090739ce546bead00deef3ddcfbbeadf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 29 Jan 2024 20:04:18 +0100 Subject: [PATCH 2/2] Apply alternative solution Fixes the logo flying out of the wrong corner when transitioning from song select to gameplay. Co-authored-by: Dean Herbert --- osu.Game/Screens/Menu/OsuLogo.cs | 7 +++++++ osu.Game/Screens/OsuScreen.cs | 5 ++++- osu.Game/Screens/Select/SongSelect.cs | 3 +-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index 25101730e7..f2e2e25fa6 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -486,5 +486,12 @@ namespace osu.Game.Screens.Menu defaultProxyTarget.Add(this); defaultProxyTarget.Add(proxy = CreateProxy()); } + + public void ChangeAnchor(Anchor anchor) + { + var previousAnchor = AnchorPosition; + Anchor = anchor; + Position -= AnchorPosition - previousAnchor; + } } } diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs index f719ef67c9..2e8f85423d 100644 --- a/osu.Game/Screens/OsuScreen.cs +++ b/osu.Game/Screens/OsuScreen.cs @@ -250,9 +250,12 @@ namespace osu.Game.Screens { logo.Action = null; logo.FadeOut(300, Easing.OutQuint); - logo.Anchor = Anchor.TopLeft; + logo.Origin = Anchor.Centre; + + logo.ChangeAnchor(Anchor.TopLeft); logo.RelativePositionAxes = Axes.Both; + logo.Triangles = true; logo.Ripple = true; } diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index 50467bc089..a603934a9d 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -642,9 +642,8 @@ namespace osu.Game.Screens.Select { base.LogoArriving(logo, resuming); - logo.Anchor = Anchor.BottomRight; - logo.Origin = Anchor.Centre; logo.RelativePositionAxes = Axes.None; + logo.ChangeAnchor(Anchor.BottomRight); Vector2 position = new Vector2(-76, -36);