1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 09:22:54 +08:00

Remove one-entry backing fields.

This commit is contained in:
Huo Yaoyuan 2017-03-06 17:14:41 +08:00
parent a34e6453bf
commit c2cf5242e1
2 changed files with 7 additions and 14 deletions

View File

@ -25,31 +25,27 @@ namespace osu.Game.Modes.UI
reapplySize();
}
}
private Color4 backgroundColour;
new public Color4 Colour
public new Color4 Colour
{
get
{
return backgroundColour;
return background.Colour;
}
set
{
backgroundColour = value;
background.Colour = value;
}
}
private FontAwesome icon;
public FontAwesome Icon
{
get
{
return icon;
return modIcon.Icon;
}
set
{
icon = value;
modIcon.Icon = value;
}
}

View File

@ -29,16 +29,14 @@ namespace osu.Game.Overlays.Mods
public Action<Mod> Action;
protected virtual Key[] ToggleKeys => new Key[] { };
private string header;
public string Header
{
get
{
return header;
return headerLabel.Text;
}
set
{
header = value;
headerLabel.Text = value;
}
}
@ -137,8 +135,7 @@ namespace osu.Game.Overlays.Mods
Origin = Anchor.TopLeft,
Anchor = Anchor.TopLeft,
Position = new Vector2(0f, 0f),
Font = @"Exo2.0-Bold",
Text = Header,
Font = @"Exo2.0-Bold"
},
buttonsContainer = new AlwaysPresentFlowContainer
{