1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 15:03:10 +08:00

Fix ModSelectColumn completely disappear from ModSelectOverlay

This commit is contained in:
Cootz 2023-05-03 14:00:46 +03:00
parent f0d35eb12b
commit 152d2678d5
4 changed files with 30 additions and 15 deletions

View File

@ -1,10 +0,0 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics.Containers;
namespace osu.Game.Overlays.Mods;
public partial class ModSearch : Container
{
}

View File

@ -0,0 +1,25 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics.Containers;
namespace osu.Game.Overlays.Mods;
public partial class ModSearchContainer : SearchContainer
{
/// <summary>
/// A string that should match the <see cref="IFilterable"/> children
/// </summary>
public string ForcedSearchTerm
{
get => SearchTerm;
set
{
if (value == SearchTerm)
return;
SearchTerm = value;
Update();
}
}
}

View File

@ -45,13 +45,13 @@ namespace osu.Game.Overlays.Mods
public string SearchTerm
{
set => ItemsFlow.SearchTerm = value;
set => ItemsFlow.ForcedSearchTerm = value;
}
protected override bool ReceivePositionalInputAtSubTree(Vector2 screenSpacePos) => base.ReceivePositionalInputAtSubTree(screenSpacePos) && Active.Value;
protected readonly Container ControlContainer;
protected readonly SearchContainer ItemsFlow;
protected readonly ModSearchContainer ItemsFlow;
private readonly TextFlowContainer headerText;
private readonly Box headerBackground;
@ -155,7 +155,7 @@ namespace osu.Game.Overlays.Mods
RelativeSizeAxes = Axes.Both,
ClampExtension = 100,
ScrollbarOverlapsContent = false,
Child = ItemsFlow = new SearchContainer
Child = ItemsFlow = new ModSearchContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,

View File

@ -112,7 +112,7 @@ namespace osu.Game.Overlays.Mods
private ShearedSearchTextBox searchTextBox = null!;
private DifficultyMultiplierDisplay? multiplierDisplay;
private ModSearch? modSearch;
private ModSearchContainer? modSearch;
protected ShearedButton BackButton { get; private set; } = null!;
protected ShearedToggleButton? CustomisationButton { get; private set; }
@ -215,7 +215,7 @@ namespace osu.Game.Overlays.Mods
AutoSizeAxes = Axes.X,
Height = ModsEffectDisplay.HEIGHT,
Margin = new MarginPadding { Horizontal = 100 },
Child = modSearch = new ModSearch()
Child = modSearch = new ModSearchContainer()
});
FooterContent.Child = footerButtonFlow = new FillFlowContainer<ShearedButton>