mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Change SearchableListOverlay to use OsuTabControl strip.
This commit is contained in:
parent
f43b009b96
commit
3d05798d80
@ -13,7 +13,6 @@ namespace osu.Game.Overlays.Direct
|
||||
public class Header : SearchableListHeader<DirectTab>
|
||||
{
|
||||
protected override Color4 BackgroundColour => OsuColour.FromHex(@"252f3a");
|
||||
protected override float TabStripWidth => 298;
|
||||
|
||||
protected override DirectTab DefaultTab => DirectTab.Search;
|
||||
protected override Drawable CreateHeaderText() => new OsuSpriteText { Text = @"osu!direct", TextSize = 25 };
|
||||
|
@ -14,12 +14,9 @@ namespace osu.Game.Overlays.SearchableList
|
||||
{
|
||||
public abstract class SearchableListHeader<T> : Container
|
||||
{
|
||||
private readonly Box tabStrip;
|
||||
|
||||
public readonly HeaderTabControl<T> Tabs;
|
||||
|
||||
protected abstract Color4 BackgroundColour { get; }
|
||||
protected abstract float TabStripWidth { get; } //can be removed once (if?) TabControl support auto sizing
|
||||
protected abstract T DefaultTab { get; }
|
||||
protected abstract Drawable CreateHeaderText();
|
||||
protected abstract FontAwesome Icon { get; }
|
||||
@ -63,13 +60,6 @@ namespace osu.Game.Overlays.SearchableList
|
||||
CreateHeaderText(),
|
||||
},
|
||||
},
|
||||
tabStrip = new Box
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Width = TabStripWidth,
|
||||
Height = 1,
|
||||
},
|
||||
Tabs = new HeaderTabControl<T>
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
@ -87,7 +77,7 @@ namespace osu.Game.Overlays.SearchableList
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
tabStrip.Colour = colours.Green;
|
||||
Tabs.StripColour = colours.Green;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ namespace osu.Game.Overlays.Social
|
||||
private OsuSpriteText browser;
|
||||
|
||||
protected override Color4 BackgroundColour => OsuColour.FromHex(@"38202e");
|
||||
protected override float TabStripWidth => 438;
|
||||
|
||||
protected override SocialTab DefaultTab => SocialTab.AllPlayers;
|
||||
protected override FontAwesome Icon => FontAwesome.fa_users;
|
||||
|
Loading…
Reference in New Issue
Block a user