Enforce readonly private members where possible.

This commit is contained in:
Dean Herbert
2017-03-23 13:41:50 +09:00
parent 5138890530
commit 54e1b24fe9
115 changed files with 278 additions and 259 deletions

View File

@ -23,8 +23,8 @@ namespace osu.Game.Overlays.Toolbar
public Action OnHome;
public Action<PlayMode> OnPlayModeChange;
private ToolbarModeSelector modeSelector;
private ToolbarUserArea userArea;
private readonly ToolbarModeSelector modeSelector;
private readonly ToolbarUserArea userArea;
protected override bool HideOnEscape => false;
@ -90,8 +90,8 @@ namespace osu.Game.Overlays.Toolbar
public class ToolbarBackground : Container
{
private Box solidBackground;
private Box gradientBackground;
private readonly Box solidBackground;
private readonly Box gradientBackground;
public ToolbarBackground()
{

View File

@ -63,9 +63,9 @@ namespace osu.Game.Overlays.Toolbar
protected TextAwesome DrawableIcon;
protected SpriteText DrawableText;
protected Box HoverBackground;
private FillFlowContainer tooltipContainer;
private SpriteText tooltip1;
private SpriteText tooltip2;
private readonly FillFlowContainer tooltipContainer;
private readonly SpriteText tooltip1;
private readonly SpriteText tooltip2;
protected FillFlowContainer Flow;
private SampleChannel sampleClick;

View File

@ -19,8 +19,8 @@ namespace osu.Game.Overlays.Toolbar
{
private const float padding = 10;
private FillFlowContainer modeButtons;
private Drawable modeButtonLine;
private readonly FillFlowContainer modeButtons;
private readonly Drawable modeButtonLine;
private ToolbarModeButton activeButton;
public Action<PlayMode> OnPlayModeChange;

View File

@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarOverlayToggleButton : ToolbarButton
{
private Box stateBackground;
private readonly Box stateBackground;
private OverlayContainer stateContainer;

View File

@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Toolbar
internal class ToolbarUserArea : Container
{
public LoginOverlay LoginOverlay;
private ToolbarUserButton button;
private readonly ToolbarUserButton button;
public override RectangleF BoundingBox => button.BoundingBox;

View File

@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarUserButton : ToolbarButton, IOnlineComponent
{
private Avatar avatar;
private readonly Avatar avatar;
public ToolbarUserButton()
{