mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Enforce readonly private members where possible.
This commit is contained in:
@ -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()
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
{
|
||||
internal class ToolbarOverlayToggleButton : ToolbarButton
|
||||
{
|
||||
private Box stateBackground;
|
||||
private readonly Box stateBackground;
|
||||
|
||||
private OverlayContainer stateContainer;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
{
|
||||
internal class ToolbarUserButton : ToolbarButton, IOnlineComponent
|
||||
{
|
||||
private Avatar avatar;
|
||||
private readonly Avatar avatar;
|
||||
|
||||
public ToolbarUserButton()
|
||||
{
|
||||
|
Reference in New Issue
Block a user