Change SearchableListOverlay to use OsuTabControl strip.

This commit is contained in:
DrabWeb 2018-03-29 15:34:53 -03:00
parent f43b009b96
commit 3d05798d80
3 changed files with 1 additions and 13 deletions

View File

@ -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 };

View File

@ -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;
}
}
}

View File

@ -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;