From 46f1d63a166a25af08adee6fbe698116af2c465e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 26 Mar 2026 17:12:23 +0900 Subject: [PATCH 1/2] Don't load gameplay while window is not focused (#37100) --- osu.Game/Screens/Play/PlayerLoader.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index d15b1a5a823e..b57205952de4 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -15,6 +15,7 @@ using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transforms; using osu.Framework.Input; +using osu.Framework.Platform; using osu.Framework.Screens; using osu.Framework.Threading; using osu.Framework.Utils; @@ -105,6 +106,9 @@ public partial class PlayerLoader : ScreenWithBeatmapBackground [Cached] private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple); + [Resolved] + private GameHost host { get; set; } = null!; + private const double quick_restart_initial_delay = 500; protected bool BackgroundBrightnessReduction @@ -121,6 +125,7 @@ protected bool BackgroundBrightnessReduction } protected virtual bool ReadyForGameplay => + host.IsActive.Value && // not ready if the user is hovering one of the panes (logo is excluded), unless they are idle. (IsHovered || osuLogo?.IsHovered == true || idleTracker.IsIdle.Value) // not ready if the user is dragging a slider or otherwise. From 7b99842708d33cd8406533108185156b943f44db Mon Sep 17 00:00:00 2001 From: Krzysztof Gutkowski Date: Thu, 26 Mar 2026 11:46:08 +0100 Subject: [PATCH 2/2] Adjust bad padding in `FilterControl` (#37098) Reported [on discord](https://discord.com/channels/188630481301012481/1097318920991559880/1462402881658294355). Not sure if this has been turned into an issue anywhere. Fixes awkward looking padding at the bottom of `FilterControl` by having `ScopedBeatmapSetDisplay` apply the top padding on its own instead of relying on the spacing of its parent fill flow. This way, the padding is animated away when the scoped display disappears, instead of remaining because the component is still technically there. | Before | After | |--------|--------| | image | image | [Screencast_20260325_114439.webm](https://github.com/user-attachments/assets/99bb7083-b2da-40a3-b5a0-d94476e7c1ac) I don't really like how `ScopedBeatmapSetDisplay` is now managing its own spacing in the parent container, but it's tightly tied to the filter control anyway so it's probably fine. --- .../FilterControl.ScopedBeatmapSetDisplay.cs | 3 + osu.Game/Screens/Select/FilterControl.cs | 147 ++++++++++-------- 2 files changed, 81 insertions(+), 69 deletions(-) diff --git a/osu.Game/Screens/Select/FilterControl.ScopedBeatmapSetDisplay.cs b/osu.Game/Screens/Select/FilterControl.ScopedBeatmapSetDisplay.cs index 040081605f89..904d378fbd14 100644 --- a/osu.Game/Screens/Select/FilterControl.ScopedBeatmapSetDisplay.cs +++ b/osu.Game/Screens/Select/FilterControl.ScopedBeatmapSetDisplay.cs @@ -107,7 +107,9 @@ private void updateState() { if (ScopedBeatmapSet.Value != null) { + this.TransformTo(nameof(Margin), new MarginPadding { Top = 5 }, transition_duration, Easing.OutQuint); content.BypassAutoSizeAxes = Axes.None; + text.Clear(); text.AddText(SongSelectStrings.TemporarilyShowingAllBeatmapsIn); text.AddText(@" "); @@ -115,6 +117,7 @@ private void updateState() } else { + this.TransformTo(nameof(Margin), new MarginPadding(0), transition_duration, Easing.OutQuint); flashLayer.FadeOutFromOne(transition_duration, Easing.OutQuint); content.BypassAutoSizeAxes = Axes.Y; } diff --git a/osu.Game/Screens/Select/FilterControl.cs b/osu.Game/Screens/Select/FilterControl.cs index 4867e7de8c62..f297e3b2b076 100644 --- a/osu.Game/Screens/Select/FilterControl.cs +++ b/osu.Game/Screens/Select/FilterControl.cs @@ -109,99 +109,108 @@ private void load(IAPIProvider api) RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, - Spacing = new Vector2(0f, 5f), Padding = new MarginPadding { Top = corner_radius + 5, Bottom = 2, Right = 40f, Left = 2f }, Children = new Drawable[] { - new Container + new ReverseChildIDFillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Shear = -OsuGame.SHEAR, - Child = searchTextBox = new SongSelectSearchTextBox + Direction = FillDirection.Vertical, + Spacing = new Vector2(0f, 5f), + Children = new Drawable[] { - RelativeSizeAxes = Axes.X, - HoldFocus = true, - ScopedBeatmapSet = { BindTarget = ScopedBeatmapSet }, - }, - }, - new GridContainer - { - RelativeSizeAxes = Axes.X, - AutoSizeAxes = Axes.Y, - Shear = -OsuGame.SHEAR, - RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }, - ColumnDimensions = new[] - { - new Dimension(), - new Dimension(GridSizeMode.Absolute), // can probably be removed? - new Dimension(GridSizeMode.AutoSize), - }, - Content = new[] - { - new[] + new Container { - difficultyRangeSlider = new DifficultyRangeSlider + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Shear = -OsuGame.SHEAR, + Child = searchTextBox = new SongSelectSearchTextBox { RelativeSizeAxes = Axes.X, - MinRange = 0.1f, - }, - Empty(), - showConvertedBeatmapsButton = new ShearedToggleButton - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - AutoSizeAxes = Axes.X, - Text = UserInterfaceStrings.ShowConverts, - Height = 30f, + HoldFocus = true, + ScopedBeatmapSet = { BindTarget = ScopedBeatmapSet }, }, }, - } - }, - new GridContainer - { - RelativeSizeAxes = Axes.X, - Height = 30, - Shear = -OsuGame.SHEAR, - RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }, - ColumnDimensions = new[] - { - new Dimension(maxSize: 180), - new Dimension(GridSizeMode.Absolute, 5), - new Dimension(maxSize: 180), - new Dimension(GridSizeMode.Absolute, 5), - new Dimension(), - new Dimension(GridSizeMode.AutoSize), - }, - Content = new[] - { - new[] + new GridContainer { - sortDropdown = new ShearedDropdown(SongSelectStrings.Sort) + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Shear = -OsuGame.SHEAR, + RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }, + ColumnDimensions = new[] { - RelativeSizeAxes = Axes.X, - Items = Enum.GetValues(), + new Dimension(), + new Dimension(GridSizeMode.Absolute), // can probably be removed? + new Dimension(GridSizeMode.AutoSize), }, - Empty(), - groupDropdown = new ShearedDropdown(SongSelectStrings.Group) + Content = new[] { - RelativeSizeAxes = Axes.X, - Items = Enum.GetValues(), - }, - Empty(), - collectionDropdown = new CollectionDropdown + new[] + { + difficultyRangeSlider = new DifficultyRangeSlider + { + RelativeSizeAxes = Axes.X, + MinRange = 0.1f, + }, + Empty(), + showConvertedBeatmapsButton = new ShearedToggleButton + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + AutoSizeAxes = Axes.X, + Text = UserInterfaceStrings.ShowConverts, + Height = 30f, + }, + }, + } + }, + new GridContainer + { + RelativeSizeAxes = Axes.X, + Height = 30, + Shear = -OsuGame.SHEAR, + RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }, + ColumnDimensions = new[] { - RelativeSizeAxes = Axes.X, + new Dimension(maxSize: 180), + new Dimension(GridSizeMode.Absolute, 5), + new Dimension(maxSize: 180), + new Dimension(GridSizeMode.Absolute, 5), + new Dimension(), + new Dimension(GridSizeMode.AutoSize), }, - } - } + Content = new[] + { + new[] + { + sortDropdown = new ShearedDropdown(SongSelectStrings.Sort) + { + RelativeSizeAxes = Axes.X, + Items = Enum.GetValues(), + }, + Empty(), + groupDropdown = new ShearedDropdown(SongSelectStrings.Group) + { + RelativeSizeAxes = Axes.X, + Items = Enum.GetValues(), + }, + Empty(), + collectionDropdown = new CollectionDropdown + { + RelativeSizeAxes = Axes.X, + }, + } + } + }, + }, }, new ScopedBeatmapSetDisplay { ScopedBeatmapSet = { BindTarget = ScopedBeatmapSet }, } }, - } + }, }; localUser = api.LocalUser.GetBoundCopy();