Make settings more modular

This commit is contained in:
Dean Herbert
2017-08-10 22:21:22 +09:00
parent 384b8c0600
commit 66fa84a451
8 changed files with 101 additions and 21 deletions

View File

@ -11,6 +11,15 @@ namespace osu.Game.Overlays.Settings
{
public class SettingsHeader : Container
{
private readonly string heading;
private readonly string subheading;
public SettingsHeader(string heading, string subheading)
{
this.heading = heading;
this.subheading = subheading;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
@ -28,7 +37,7 @@ namespace osu.Game.Overlays.Settings
{
new OsuSpriteText
{
Text = "settings",
Text = heading,
TextSize = 40,
Margin = new MarginPadding
{
@ -39,7 +48,7 @@ namespace osu.Game.Overlays.Settings
new OsuSpriteText
{
Colour = colours.Pink,
Text = "Change the way osu! behaves",
Text = subheading,
TextSize = 18,
Margin = new MarginPadding
{