mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Add ContryFilter to new header
This commit is contained in:
@ -11,6 +11,8 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Online
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
@ -22,6 +24,9 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
typeof(CountryPill)
|
typeof(CountryPill)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[Cached]
|
||||||
|
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Green);
|
||||||
|
|
||||||
public TestSceneRankingsCountryFilter()
|
public TestSceneRankingsCountryFilter()
|
||||||
{
|
{
|
||||||
var countryBindable = new Bindable<Country>();
|
var countryBindable = new Bindable<Country>();
|
||||||
|
@ -17,6 +17,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
{
|
{
|
||||||
typeof(RankingsOverlayHeader),
|
typeof(RankingsOverlayHeader),
|
||||||
|
typeof(CountryFilter),
|
||||||
};
|
};
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
|
@ -76,9 +76,9 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
background.Colour = colours.GreySeafoam;
|
background.Colour = colourProvider.Dark3;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
@ -100,9 +100,9 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
background.Colour = colours.GreySeafoamDarker;
|
background.Colour = colourProvider.Background5;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -154,9 +154,9 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
IdleColour = colours.GreySeafoamLighter;
|
IdleColour = colourProvider.Light2;
|
||||||
HoverColour = Color4.White;
|
HoverColour = Color4.White;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Rankings
|
namespace osu.Game.Overlays.Rankings
|
||||||
{
|
{
|
||||||
@ -27,6 +28,19 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
Current = Ruleset
|
Current = Ruleset
|
||||||
};
|
};
|
||||||
|
|
||||||
|
protected override Drawable CreateContent() => new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new CountryFilter
|
||||||
|
{
|
||||||
|
Current = Country
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
private class RankingsTitle : ScreenTitle
|
private class RankingsTitle : ScreenTitle
|
||||||
{
|
{
|
||||||
public readonly Bindable<RankingsScope> Scope = new Bindable<RankingsScope>();
|
public readonly Bindable<RankingsScope> Scope = new Bindable<RankingsScope>();
|
||||||
|
Reference in New Issue
Block a user