mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 17:03:18 +08:00
Fix supporter filters text not being set correctly
This commit is contained in:
parent
63c1855511
commit
93c2280754
@ -147,8 +147,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
if (searchResult.Type == BeatmapListingFilterControl.SearchResultType.SupporterOnlyFilters)
|
if (searchResult.Type == BeatmapListingFilterControl.SearchResultType.SupporterOnlyFilters)
|
||||||
{
|
{
|
||||||
var supporterOnly = new SupporterRequiredDrawable();
|
var supporterOnly = new SupporterRequiredDrawable(searchResult.SupporterOnlyFiltersUsed);
|
||||||
supporterOnly.UpdateText(searchResult.SupporterOnlyFiltersUsed);
|
|
||||||
replaceResultsAreaContent(supporterOnly);
|
replaceResultsAreaContent(supporterOnly);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -297,11 +296,15 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
private LinkFlowContainer supporterRequiredText;
|
private LinkFlowContainer supporterRequiredText;
|
||||||
|
|
||||||
public SupporterRequiredDrawable()
|
private readonly List<LocalisableString> filtersUsed;
|
||||||
|
|
||||||
|
public SupporterRequiredDrawable(List<LocalisableString> filtersUsed)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = 225;
|
Height = 225;
|
||||||
Alpha = 0;
|
Alpha = 0;
|
||||||
|
|
||||||
|
this.filtersUsed = filtersUsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -333,14 +336,9 @@ namespace osu.Game.Overlays
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateText(List<LocalisableString> filters)
|
|
||||||
{
|
|
||||||
supporterRequiredText.Clear();
|
|
||||||
|
|
||||||
supporterRequiredText.AddText(
|
supporterRequiredText.AddText(
|
||||||
BeatmapsStrings.ListingSearchSupporterFilterQuoteDefault(string.Join(" and ", filters), "").ToString(),
|
BeatmapsStrings.ListingSearchSupporterFilterQuoteDefault(string.Join(" and ", filtersUsed), "").ToString(),
|
||||||
t =>
|
t =>
|
||||||
{
|
{
|
||||||
t.Font = OsuFont.GetFont(size: 16);
|
t.Font = OsuFont.GetFont(size: 16);
|
||||||
|
Loading…
Reference in New Issue
Block a user