From 5bcb7c167c5ae837be46f56752dd41c1236cec0b Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sat, 19 Mar 2022 05:02:20 +0300 Subject: [PATCH 1/4] Swap placements of "hold for menu" and key counter --- osu.Game/Screens/Play/HUDOverlay.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Play/HUDOverlay.cs b/osu.Game/Screens/Play/HUDOverlay.cs index 628452fbc8..9edcbf3e07 100644 --- a/osu.Game/Screens/Play/HUDOverlay.cs +++ b/osu.Game/Screens/Play/HUDOverlay.cs @@ -111,8 +111,11 @@ namespace osu.Game.Screens.Play Direction = FillDirection.Vertical, Children = new Drawable[] { - KeyCounter = CreateKeyCounter(), HoldToQuit = CreateHoldForMenuButton(), + KeyCounter = CreateKeyCounter().With(k => + { + k.Margin = new MarginPadding { Horizontal = 10 }; + }), } } }; @@ -235,13 +238,11 @@ namespace osu.Game.Screens.Play { PlayerSettingsOverlay.Show(); ModDisplay.FadeIn(200); - KeyCounter.Margin = new MarginPadding(10) { Bottom = 30 }; } else { PlayerSettingsOverlay.Hide(); ModDisplay.Delay(2000).FadeOut(200); - KeyCounter.Margin = new MarginPadding(10); } updateVisibility(); From 486be831778a6b57fdb210bfe9ce646b51c0c3b8 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sat, 19 Mar 2022 05:04:11 +0300 Subject: [PATCH 2/4] Calculate position adjustment distance in local parent space --- osu.Game/Screens/Play/HUD/HoldForMenuButton.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs b/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs index 4087011933..065ed0dd5f 100644 --- a/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs +++ b/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs @@ -84,7 +84,7 @@ namespace osu.Game.Screens.Play.HUD protected override bool OnMouseMove(MouseMoveEvent e) { - positionalAdjust = Vector2.Distance(e.ScreenSpaceMousePosition, button.ScreenSpaceDrawQuad.Centre) / 200; + positionalAdjust = Vector2.Distance(e.MousePosition, button.ToSpaceOfOtherDrawable(button.DrawRectangle.Centre, Parent)) / 200; return base.OnMouseMove(e); } From ad9b119e3dd85d4207c477da59ef45366936fde9 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sat, 19 Mar 2022 05:04:54 +0300 Subject: [PATCH 3/4] Reduce "hold for menu" radius of visibility --- osu.Game/Screens/Play/HUD/HoldForMenuButton.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs b/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs index 065ed0dd5f..3da63ec2cc 100644 --- a/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs +++ b/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs @@ -84,7 +84,7 @@ namespace osu.Game.Screens.Play.HUD protected override bool OnMouseMove(MouseMoveEvent e) { - positionalAdjust = Vector2.Distance(e.MousePosition, button.ToSpaceOfOtherDrawable(button.DrawRectangle.Centre, Parent)) / 200; + positionalAdjust = Vector2.Distance(e.MousePosition, button.ToSpaceOfOtherDrawable(button.DrawRectangle.Centre, Parent)) / 100; return base.OnMouseMove(e); } From b99541fb5e3fccd2235bd40027ba8545e33d92ee Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sat, 19 Mar 2022 08:08:07 +0300 Subject: [PATCH 4/4] Revert "Swap placements of "hold for menu" and key counter" This reverts commit 5bcb7c167c5ae837be46f56752dd41c1236cec0b. --- osu.Game/Screens/Play/HUDOverlay.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Play/HUDOverlay.cs b/osu.Game/Screens/Play/HUDOverlay.cs index 9edcbf3e07..628452fbc8 100644 --- a/osu.Game/Screens/Play/HUDOverlay.cs +++ b/osu.Game/Screens/Play/HUDOverlay.cs @@ -111,11 +111,8 @@ namespace osu.Game.Screens.Play Direction = FillDirection.Vertical, Children = new Drawable[] { + KeyCounter = CreateKeyCounter(), HoldToQuit = CreateHoldForMenuButton(), - KeyCounter = CreateKeyCounter().With(k => - { - k.Margin = new MarginPadding { Horizontal = 10 }; - }), } } }; @@ -238,11 +235,13 @@ namespace osu.Game.Screens.Play { PlayerSettingsOverlay.Show(); ModDisplay.FadeIn(200); + KeyCounter.Margin = new MarginPadding(10) { Bottom = 30 }; } else { PlayerSettingsOverlay.Hide(); ModDisplay.Delay(2000).FadeOut(200); + KeyCounter.Margin = new MarginPadding(10); } updateVisibility();