mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Enforce readonly private members where possible.
This commit is contained in:
@ -15,8 +15,8 @@ namespace osu.Game.Overlays.Options
|
||||
{
|
||||
public class OptionDropdown<T> : FillFlowContainer
|
||||
{
|
||||
private Dropdown<T> dropdown;
|
||||
private SpriteText text;
|
||||
private readonly Dropdown<T> dropdown;
|
||||
private readonly SpriteText text;
|
||||
|
||||
public string LabelText
|
||||
{
|
||||
|
@ -14,8 +14,8 @@ namespace osu.Game.Overlays.Options
|
||||
{
|
||||
public class OptionSlider<T> : FillFlowContainer where T : struct
|
||||
{
|
||||
private SliderBar<T> slider;
|
||||
private SpriteText text;
|
||||
private readonly SliderBar<T> slider;
|
||||
private readonly SpriteText text;
|
||||
|
||||
public string LabelText
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Options
|
||||
public abstract FontAwesome Icon { get; }
|
||||
public abstract string Header { get; }
|
||||
|
||||
private SpriteText headerLabel;
|
||||
private readonly SpriteText headerLabel;
|
||||
|
||||
protected OptionsSection()
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Options
|
||||
{
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
private Container<Drawable> content;
|
||||
private readonly Container<Drawable> content;
|
||||
|
||||
protected abstract string Header { get; }
|
||||
|
||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Options
|
||||
{
|
||||
public class Sidebar : Container
|
||||
{
|
||||
private FillFlowContainer content;
|
||||
private readonly FillFlowContainer content;
|
||||
internal const float DEFAULT_WIDTH = ToolbarButton.WIDTH;
|
||||
internal const int EXPANDED_WIDTH = 200;
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
@ -16,11 +16,11 @@ namespace osu.Game.Overlays.Options
|
||||
{
|
||||
public class SidebarButton : Container
|
||||
{
|
||||
private TextAwesome drawableIcon;
|
||||
private SpriteText headerText;
|
||||
private Box backgroundBox;
|
||||
private Box selectionIndicator;
|
||||
private Container text;
|
||||
private readonly TextAwesome drawableIcon;
|
||||
private readonly SpriteText headerText;
|
||||
private readonly Box backgroundBox;
|
||||
private readonly Box selectionIndicator;
|
||||
private readonly Container text;
|
||||
public Action Action;
|
||||
|
||||
private OptionsSection section;
|
||||
|
Reference in New Issue
Block a user