Move overlay ruleset selectors to tab control

This commit is contained in:
Joseph Madamba
2023-01-13 12:50:12 -08:00
parent ad2582a3ab
commit 5750d82c0a
6 changed files with 37 additions and 32 deletions

View File

@ -8,6 +8,7 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Effects;
using osu.Framework.Localisation;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Rulesets;
@ -16,7 +17,7 @@ using osuTK.Graphics;
namespace osu.Game.Overlays.BeatmapSet
{
public partial class BeatmapSetHeader : OverlayHeader
public partial class BeatmapSetHeader : TabControlOverlayHeader<BeatmapSetTabs>
{
public readonly Bindable<APIBeatmapSet> BeatmapSet = new Bindable<APIBeatmapSet>();
@ -46,7 +47,7 @@ namespace osu.Game.Overlays.BeatmapSet
BeatmapSet = { BindTarget = BeatmapSet }
};
protected override Drawable CreateTitleContent() => RulesetSelector = new BeatmapRulesetSelector
protected override Drawable CreateTabControlContent() => RulesetSelector = new BeatmapRulesetSelector
{
Current = ruleset
};
@ -62,4 +63,10 @@ namespace osu.Game.Overlays.BeatmapSet
}
}
}
public enum BeatmapSetTabs
{
[LocalisableDescription(typeof(LayoutStrings), nameof(LayoutStrings.HeaderBeatmapsetsShow))]
Info,
}
}