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

@ -26,30 +26,26 @@ namespace osu.Game.Modes.UI
} }
} }
private Color4 backgroundColour; public new Color4 Colour
new public Color4 Colour
{ {
get get
{ {
return backgroundColour; return background.Colour;
} }
set set
{ {
backgroundColour = value;
background.Colour = value; background.Colour = value;
} }
} }
private FontAwesome icon;
public FontAwesome Icon public FontAwesome Icon
{ {
get get
{ {
return icon; return modIcon.Icon;
} }
set set
{ {
icon = value;
modIcon.Icon = value; modIcon.Icon = value;
} }
} }

View File

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