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

Merge pull request #4355 from peppy/expression-body

Use expression body for property get/set where possible
This commit is contained in:
Dan Balasescu 2019-02-28 14:23:11 +09:00 committed by GitHub
commit 9fa8e6f3b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
130 changed files with 297 additions and 403 deletions

View File

@ -34,7 +34,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
public override Color4 AccentColour public override Color4 AccentColour
{ {
get { return base.AccentColour; } get => base.AccentColour;
set set
{ {
base.AccentColour = value; base.AccentColour = value;

View File

@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable.Pieces
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
accentColour = value; accentColour = value;

View File

@ -33,7 +33,7 @@ namespace osu.Game.Rulesets.Catch.UI
public Container ExplodingFruitTarget public Container ExplodingFruitTarget
{ {
set { MovableCatcher.ExplodingFruitTarget = value; } set => MovableCatcher.ExplodingFruitTarget = value;
} }
public CatcherArea(BeatmapDifficulty difficulty = null) public CatcherArea(BeatmapDifficulty difficulty = null)
@ -158,7 +158,7 @@ namespace osu.Game.Rulesets.Catch.UI
protected bool Dashing protected bool Dashing
{ {
get { return dashing; } get => dashing;
set set
{ {
if (value == dashing) return; if (value == dashing) return;
@ -176,7 +176,7 @@ namespace osu.Game.Rulesets.Catch.UI
/// </summary> /// </summary>
protected bool Trail protected bool Trail
{ {
get { return trail; } get => trail;
set set
{ {
if (value == trail) return; if (value == trail) return;

View File

@ -85,7 +85,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
public override Color4 AccentColour public override Color4 AccentColour
{ {
get { return base.AccentColour; } get => base.AccentColour;
set set
{ {
base.AccentColour = value; base.AccentColour = value;

View File

@ -56,7 +56,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
public override Color4 AccentColour public override Color4 AccentColour
{ {
get { return base.AccentColour; } get => base.AccentColour;
set set
{ {
base.AccentColour = value; base.AccentColour = value;

View File

@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
public override Color4 AccentColour public override Color4 AccentColour
{ {
get { return base.AccentColour; } get => base.AccentColour;
set set
{ {
base.AccentColour = value; base.AccentColour = value;

View File

@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
if (accentColour == value) if (accentColour == value)
@ -90,7 +90,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
public bool Hitting public bool Hitting
{ {
get { return hitting; } get => hitting;
set set
{ {
hitting = value; hitting = value;

View File

@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
if (accentColour == value) if (accentColour == value)

View File

@ -78,8 +78,8 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
public Color4 AccentColour public Color4 AccentColour
{ {
get { return Colour; } get => Colour;
set { Colour = value; } set => Colour = value;
} }
} }
} }

View File

@ -58,7 +58,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
if (accentColour == value) if (accentColour == value)

View File

@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Mania.Objects
private double duration; private double duration;
public double Duration public double Duration
{ {
get { return duration; } get => duration;
set set
{ {
duration = value; duration = value;
@ -29,7 +29,7 @@ namespace osu.Game.Rulesets.Mania.Objects
public override double StartTime public override double StartTime
{ {
get { return base.StartTime; } get => base.StartTime;
set set
{ {
base.StartTime = value; base.StartTime = value;
@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Mania.Objects
public override int Column public override int Column
{ {
get { return base.Column; } get => base.Column;
set set
{ {
base.Column = value; base.Column = value;

View File

@ -99,7 +99,7 @@ namespace osu.Game.Rulesets.Mania.UI
private bool isSpecial; private bool isSpecial;
public bool IsSpecial public bool IsSpecial
{ {
get { return isSpecial; } get => isSpecial;
set set
{ {
if (isSpecial == value) if (isSpecial == value)
@ -113,7 +113,7 @@ namespace osu.Game.Rulesets.Mania.UI
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
if (accentColour == value) if (accentColour == value)

View File

@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
/// </summary> /// </summary>
public int PointDistance public int PointDistance
{ {
get { return pointDistance; } get => pointDistance;
set set
{ {
if (pointDistance == value) return; if (pointDistance == value) return;
@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
/// </summary> /// </summary>
public int PreEmpt public int PreEmpt
{ {
get { return preEmpt; } get => preEmpt;
set set
{ {
if (preEmpt == value) return; if (preEmpt == value) return;
@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
private IEnumerable<OsuHitObject> hitObjects; private IEnumerable<OsuHitObject> hitObjects;
public override IEnumerable<OsuHitObject> HitObjects public override IEnumerable<OsuHitObject> HitObjects
{ {
get { return hitObjects; } get => hitObjects;
set set
{ {
hitObjects = value; hitObjects = value;

View File

@ -102,7 +102,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public override Color4 AccentColour public override Color4 AccentColour
{ {
get { return base.AccentColour; } get => base.AccentColour;
set set
{ {
base.AccentColour = value; base.AccentColour = value;

View File

@ -115,7 +115,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public override Color4 AccentColour public override Color4 AccentColour
{ {
get { return base.AccentColour; } get => base.AccentColour;
set set
{ {
base.AccentColour = value; base.AccentColour = value;

View File

@ -18,8 +18,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public string Text public string Text
{ {
get { return number.Text; } get => number.Text;
set { number.Text = value; } set => number.Text = value;
} }
public NumberPiece() public NumberPiece()

View File

@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
/// </summary> /// </summary>
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
accentColour = value; accentColour = value;
@ -136,7 +136,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public bool Tracking public bool Tracking
{ {
get { return tracking; } get => tracking;
private set private set
{ {
if (value == tracking) if (value == tracking)

View File

@ -15,10 +15,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public Color4 AccentColour public Color4 AccentColour
{ {
get get => Disc.Colour;
{
return Disc.Colour;
}
set set
{ {
Disc.Colour = value; Disc.Colour = value;

View File

@ -17,8 +17,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public Color4 AccentColour public Color4 AccentColour
{ {
get { return background.AccentColour; } get => background.AccentColour;
set { background.AccentColour = value; } set => background.AccentColour = value;
} }
private readonly SpinnerBackground background; private readonly SpinnerBackground background;
@ -45,7 +45,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
private bool tracking; private bool tracking;
public bool Tracking public bool Tracking
{ {
get { return tracking; } get => tracking;
set set
{ {
if (value == tracking) return; if (value == tracking) return;
@ -58,7 +58,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
private bool complete; private bool complete;
public bool Complete public bool Complete
{ {
get { return complete; } get => complete;
set set
{ {
if (value == complete) return; if (value == complete) return;

View File

@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public double SpinsPerMinute public double SpinsPerMinute
{ {
get { return spm; } get => spm;
private set private set
{ {
if (value == spm) return; if (value == spm) return;

View File

@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
/// </summary> /// </summary>
public override Color4 AccentColour public override Color4 AccentColour
{ {
get { return base.AccentColour; } get => base.AccentColour;
set set
{ {
base.AccentColour = value; base.AccentColour = value;
@ -46,7 +46,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
/// </summary> /// </summary>
public override bool KiaiMode public override bool KiaiMode
{ {
get { return base.KiaiMode; } get => base.KiaiMode;
set set
{ {
base.KiaiMode = value; base.KiaiMode = value;

View File

@ -16,8 +16,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
/// </summary> /// </summary>
public virtual Color4 AccentColour public virtual Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set { accentColour = value; } set => accentColour = value;
} }
private bool kiaiMode; private bool kiaiMode;
@ -26,11 +26,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
/// </summary> /// </summary>
public virtual bool KiaiMode public virtual bool KiaiMode
{ {
get { return kiaiMode; } get => kiaiMode;
set set => kiaiMode = value;
{
kiaiMode = value;
}
} }
public TaikoPiece() public TaikoPiece()

View File

@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
private bool filled; private bool filled;
public bool Filled public bool Filled
{ {
get { return filled; } get => filled;
set set
{ {
filled = value; filled = value;

View File

@ -190,7 +190,7 @@ namespace osu.Game.Tests.Visual
public double Value public double Value
{ {
set { valueText.Text = $"{value:G}"; } set => valueText.Text = $"{value:G}";
} }
public InfoString(string header) public InfoString(string header)

View File

@ -34,8 +34,8 @@ namespace osu.Game.Beatmaps
[Column("Author")] [Column("Author")]
public string AuthorString public string AuthorString
{ {
get { return Author?.Username; } get => Author?.Username;
set { Author = new User { Username = value }; } set => Author = new User { Username = value };
} }
/// <summary> /// <summary>

View File

@ -15,7 +15,7 @@ namespace osu.Game.Beatmaps.Drawables
private BeatmapSetInfo beatmapSet; private BeatmapSetInfo beatmapSet;
public BeatmapSetInfo BeatmapSet public BeatmapSetInfo BeatmapSet
{ {
get { return beatmapSet; } get => beatmapSet;
set set
{ {
if (value == beatmapSet) return; if (value == beatmapSet) return;
@ -29,7 +29,7 @@ namespace osu.Game.Beatmaps.Drawables
private BeatmapSetCoverType coverType = BeatmapSetCoverType.Cover; private BeatmapSetCoverType coverType = BeatmapSetCoverType.Cover;
public BeatmapSetCoverType CoverType public BeatmapSetCoverType CoverType
{ {
get { return coverType; } get => coverType;
set set
{ {
if (value == coverType) return; if (value == coverType) return;

View File

@ -86,7 +86,7 @@ namespace osu.Game.Graphics.Backgrounds
public float TriangleScale public float TriangleScale
{ {
get { return triangleScale; } get => triangleScale;
set set
{ {
float change = value / triangleScale; float change = value / triangleScale;

View File

@ -15,15 +15,9 @@ namespace osu.Game.Graphics.Containers
{ {
public Drawable Icon public Drawable Icon
{ {
get get => InternalChild;
{
return InternalChild;
}
set set => InternalChild = value;
{
InternalChild = value;
}
} }
/// <summary> /// <summary>
@ -33,8 +27,8 @@ namespace osu.Game.Graphics.Containers
/// </summary> /// </summary>
public new EdgeEffectParameters EdgeEffect public new EdgeEffectParameters EdgeEffect
{ {
get { return base.EdgeEffect; } get => base.EdgeEffect;
set { base.EdgeEffect = value; } set => base.EdgeEffect = value;
} }
protected override void Update() protected override void Update()

View File

@ -24,7 +24,7 @@ namespace osu.Game.Graphics.Containers
public Drawable ExpandableHeader public Drawable ExpandableHeader
{ {
get { return expandableHeader; } get => expandableHeader;
set set
{ {
if (value == expandableHeader) return; if (value == expandableHeader) return;
@ -40,7 +40,7 @@ namespace osu.Game.Graphics.Containers
public Drawable FixedHeader public Drawable FixedHeader
{ {
get { return fixedHeader; } get => fixedHeader;
set set
{ {
if (value == fixedHeader) return; if (value == fixedHeader) return;
@ -56,7 +56,7 @@ namespace osu.Game.Graphics.Containers
public Drawable Footer public Drawable Footer
{ {
get { return footer; } get => footer;
set set
{ {
if (value == footer) return; if (value == footer) return;
@ -75,7 +75,7 @@ namespace osu.Game.Graphics.Containers
public Drawable HeaderBackground public Drawable HeaderBackground
{ {
get { return headerBackground; } get => headerBackground;
set set
{ {
if (value == headerBackground) return; if (value == headerBackground) return;

View File

@ -106,7 +106,7 @@ namespace osu.Game.Graphics
private bool shadow; private bool shadow;
public bool Shadow public bool Shadow
{ {
get { return shadow; } get => shadow;
set set
{ {
shadow = value; shadow = value;
@ -119,10 +119,7 @@ namespace osu.Game.Graphics
public FontAwesome Icon public FontAwesome Icon
{ {
get get => icon;
{
return icon;
}
set set
{ {

View File

@ -26,10 +26,7 @@ namespace osu.Game.Graphics.UserInterface
/// </summary> /// </summary>
public float Length public float Length
{ {
get get => length;
{
return length;
}
set set
{ {
length = MathHelper.Clamp(value, 0, 1); length = MathHelper.Clamp(value, 0, 1);
@ -39,35 +36,20 @@ namespace osu.Game.Graphics.UserInterface
public Color4 BackgroundColour public Color4 BackgroundColour
{ {
get get => background.Colour;
{ set => background.Colour = value;
return background.Colour;
}
set
{
background.Colour = value;
}
} }
public Color4 AccentColour public Color4 AccentColour
{ {
get get => bar.Colour;
{ set => bar.Colour = value;
return bar.Colour;
}
set
{
bar.Colour = value;
}
} }
private BarDirection direction = BarDirection.LeftToRight; private BarDirection direction = BarDirection.LeftToRight;
public BarDirection Direction public BarDirection Direction
{ {
get get => direction;
{
return direction;
}
set set
{ {
direction = value; direction = value;

View File

@ -19,10 +19,7 @@ namespace osu.Game.Graphics.UserInterface
private BarDirection direction = BarDirection.BottomToTop; private BarDirection direction = BarDirection.BottomToTop;
public new BarDirection Direction public new BarDirection Direction
{ {
get get => direction;
{
return direction;
}
set set
{ {
direction = value; direction = value;

View File

@ -57,7 +57,7 @@ namespace osu.Game.Graphics.UserInterface
public Visibility State public Visibility State
{ {
get { return state; } get => state;
set set
{ {
if (value == state) return; if (value == state) return;

View File

@ -156,10 +156,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4 buttonColour; private Color4 buttonColour;
public Color4 ButtonColour public Color4 ButtonColour
{ {
get get => buttonColour;
{
return buttonColour;
}
set set
{ {
buttonColour = value; buttonColour = value;
@ -171,10 +168,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4 backgroundColour = OsuColour.Gray(34); private Color4 backgroundColour = OsuColour.Gray(34);
public Color4 BackgroundColour public Color4 BackgroundColour
{ {
get get => backgroundColour;
{
return backgroundColour;
}
set set
{ {
backgroundColour = value; backgroundColour = value;
@ -185,10 +179,7 @@ namespace osu.Game.Graphics.UserInterface
private string text; private string text;
public string Text public string Text
{ {
get get => text;
{
return text;
}
set set
{ {
text = value; text = value;

View File

@ -19,7 +19,7 @@ namespace osu.Game.Graphics.UserInterface
/// </summary> /// </summary>
public Color4 IconColour public Color4 IconColour
{ {
get { return iconColour ?? Color4.White; } get => iconColour ?? Color4.White;
set set
{ {
iconColour = value; iconColour = value;
@ -34,8 +34,8 @@ namespace osu.Game.Graphics.UserInterface
/// </summary> /// </summary>
public Color4 IconHoverColour public Color4 IconHoverColour
{ {
get { return iconHoverColour ?? IconColour; } get => iconHoverColour ?? IconColour;
set { iconHoverColour = value; } set => iconHoverColour = value;
} }
/// <summary> /// <summary>
@ -43,8 +43,8 @@ namespace osu.Game.Graphics.UserInterface
/// </summary> /// </summary>
public FontAwesome Icon public FontAwesome Icon
{ {
get { return icon.Icon; } get => icon.Icon;
set { icon.Icon = value; } set => icon.Icon = value;
} }
/// <summary> /// <summary>
@ -52,8 +52,8 @@ namespace osu.Game.Graphics.UserInterface
/// </summary> /// </summary>
public Vector2 IconScale public Vector2 IconScale
{ {
get { return icon.Scale; } get => icon.Scale;
set { icon.Scale = value; } set => icon.Scale = value;
} }
/// <summary> /// <summary>

View File

@ -44,7 +44,7 @@ namespace osu.Game.Graphics.UserInterface
/// </summary> /// </summary>
public IEnumerable<float> Values public IEnumerable<float> Values
{ {
get { return values; } get => values;
set set
{ {
values = value.ToArray(); values = value.ToArray();

View File

@ -74,7 +74,7 @@ namespace osu.Game.Graphics.UserInterface
private bool glowing; private bool glowing;
public bool Glowing public bool Glowing
{ {
get { return glowing; } get => glowing;
set set
{ {
glowing = value; glowing = value;
@ -94,10 +94,7 @@ namespace osu.Game.Graphics.UserInterface
public bool Expanded public bool Expanded
{ {
set set => this.ResizeTo(new Vector2(value ? EXPANDED_SIZE : COLLAPSED_SIZE, 12), 500, Easing.OutQuint);
{
this.ResizeTo(new Vector2(value ? EXPANDED_SIZE : COLLAPSED_SIZE, 12), 500, Easing.OutQuint);
}
} }
private readonly Bindable<bool> current = new Bindable<bool>(); private readonly Bindable<bool> current = new Bindable<bool>();
@ -118,7 +115,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
accentColour = value; accentColour = value;
@ -130,7 +127,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4 glowingAccentColour; private Color4 glowingAccentColour;
public Color4 GlowingAccentColour public Color4 GlowingAccentColour
{ {
get { return glowingAccentColour; } get => glowingAccentColour;
set set
{ {
glowingAccentColour = value; glowingAccentColour = value;
@ -142,7 +139,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4 glowColour; private Color4 glowColour;
public Color4 GlowColour public Color4 GlowColour
{ {
get { return glowColour; } get => glowColour;
set set
{ {
glowColour = value; glowColour = value;

View File

@ -33,7 +33,7 @@ namespace osu.Game.Graphics.UserInterface
public string LabelText public string LabelText
{ {
get { return labelSpriteText?.Text; } get => labelSpriteText?.Text;
set set
{ {
if (labelSpriteText != null) if (labelSpriteText != null)
@ -43,7 +43,7 @@ namespace osu.Game.Graphics.UserInterface
public MarginPadding LabelPadding public MarginPadding LabelPadding
{ {
get { return labelSpriteText?.Padding ?? new MarginPadding(); } get => labelSpriteText?.Padding ?? new MarginPadding();
set set
{ {
if (labelSpriteText != null) if (labelSpriteText != null)

View File

@ -19,7 +19,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
accentColour = value; accentColour = value;
@ -85,7 +85,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
accentColour = value; accentColour = value;
@ -105,7 +105,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4? accentColour; private Color4? accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour ?? nonAccentSelectedColour; } get => accentColour ?? nonAccentSelectedColour;
set set
{ {
accentColour = value; accentColour = value;
@ -159,8 +159,8 @@ namespace osu.Game.Graphics.UserInterface
{ {
public string Text public string Text
{ {
get { return Label.Text; } get => Label.Text;
set { Label.Text = value; } set => Label.Text = value;
} }
public readonly OsuSpriteText Label; public readonly OsuSpriteText Label;
@ -203,8 +203,8 @@ namespace osu.Game.Graphics.UserInterface
protected readonly SpriteText Text; protected readonly SpriteText Text;
protected override string Label protected override string Label
{ {
get { return Text.Text; } get => Text.Text;
set { Text.Text = value; } set => Text.Text = value;
} }
protected readonly SpriteIcon Icon; protected readonly SpriteIcon Icon;
@ -212,7 +212,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4 accentColour; private Color4 accentColour;
public virtual Color4 AccentColour public virtual Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
accentColour = value; accentColour = value;

View File

@ -125,7 +125,7 @@ namespace osu.Game.Graphics.UserInterface
{ {
public string Text public string Text
{ {
get { return NormalText.Text; } get => NormalText.Text;
set set
{ {
NormalText.Text = value; NormalText.Text = value;

View File

@ -37,7 +37,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
accentColour = value; accentColour = value;

View File

@ -60,7 +60,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
accentColour = value; accentColour = value;
@ -103,7 +103,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get => accentColour;
set set
{ {
accentColour = value; accentColour = value;
@ -224,10 +224,7 @@ namespace osu.Game.Graphics.UserInterface
{ {
public override Color4 AccentColour public override Color4 AccentColour
{ {
get get => base.AccentColour;
{
return base.AccentColour;
}
set set
{ {

View File

@ -26,7 +26,7 @@ namespace osu.Game.Graphics.UserInterface
private Color4? accentColour; private Color4? accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour.GetValueOrDefault(); } get => accentColour.GetValueOrDefault();
set set
{ {
accentColour = value; accentColour = value;
@ -41,8 +41,8 @@ namespace osu.Game.Graphics.UserInterface
public string Text public string Text
{ {
get { return text.Text; } get => text.Text;
set { text.Text = value; } set => text.Text = value;
} }
private const float transition_length = 500; private const float transition_length = 500;

View File

@ -18,7 +18,7 @@ namespace osu.Game.Graphics.UserInterface
public Color4 FillColour public Color4 FillColour
{ {
set { fill.FadeColour(value, 150, Easing.OutQuint); } set => fill.FadeColour(value, 150, Easing.OutQuint);
} }
public Color4 BackgroundColour public Color4 BackgroundColour
@ -32,12 +32,12 @@ namespace osu.Game.Graphics.UserInterface
public double EndTime public double EndTime
{ {
set { CurrentNumber.MaxValue = value; } set => CurrentNumber.MaxValue = value;
} }
public double CurrentTime public double CurrentTime
{ {
set { CurrentNumber.Value = value; } set => CurrentNumber.Value = value;
} }
public ProgressBar() public ProgressBar()

View File

@ -45,10 +45,7 @@ namespace osu.Game.Graphics.UserInterface
/// </summary> /// </summary>
public virtual T DisplayedCount public virtual T DisplayedCount
{ {
get get => displayedCount;
{
return displayedCount;
}
set set
{ {
@ -70,8 +67,8 @@ namespace osu.Game.Graphics.UserInterface
public Color4 AccentColour public Color4 AccentColour
{ {
get { return DisplayedCountSpriteText.Colour; } get => DisplayedCountSpriteText.Colour;
set { DisplayedCountSpriteText.Colour = value; } set => DisplayedCountSpriteText.Colour = value;
} }
/// <summary> /// <summary>

View File

@ -41,10 +41,7 @@ namespace osu.Game.Graphics.UserInterface
/// </summary> /// </summary>
public float CountStars public float CountStars
{ {
get get => countStars;
{
return countStars;
}
set set
{ {

View File

@ -31,10 +31,7 @@ namespace osu.Game.Graphics.UserInterface
public bool MatchingFilter public bool MatchingFilter
{ {
set set => this.FadeTo(value ? 1 : 0);
{
this.FadeTo(value ? 1 : 0);
}
} }
} }
} }

View File

@ -48,10 +48,7 @@ namespace osu.Game.Graphics.UserInterface
public override Anchor Origin public override Anchor Origin
{ {
get get => base.Origin;
{
return base.Origin;
}
set set
{ {
@ -155,18 +152,12 @@ namespace osu.Game.Graphics.UserInterface
public FontAwesome Icon public FontAwesome Icon
{ {
set set => bouncingIcon.Icon = value;
{
bouncingIcon.Icon = value;
}
} }
public string Text public string Text
{ {
set set => text.Text = value;
{
text.Text = value;
}
} }
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => IconLayer.ReceivePositionalInputAt(screenSpacePos) || TextLayer.ReceivePositionalInputAt(screenSpacePos); public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => IconLayer.ReceivePositionalInputAt(screenSpacePos) || TextLayer.ReceivePositionalInputAt(screenSpacePos);
@ -217,7 +208,7 @@ namespace osu.Game.Graphics.UserInterface
private readonly SpriteIcon icon; private readonly SpriteIcon icon;
public FontAwesome Icon { set { icon.Icon = value; } } public FontAwesome Icon { set => icon.Icon = value; }
public BouncingIcon() public BouncingIcon()
{ {

View File

@ -19,15 +19,15 @@ namespace osu.Game.Input.Bindings
[Column("Keys")] [Column("Keys")]
public string KeysString public string KeysString
{ {
get { return KeyCombination.ToString(); } get => KeyCombination.ToString();
private set { KeyCombination = value; } private set => KeyCombination = value;
} }
[Column("Action")] [Column("Action")]
public int IntAction public int IntAction
{ {
get { return (int)Action; } get => (int)Action;
set { Action = value; } set => Action = value;
} }
} }
} }

View File

@ -260,7 +260,7 @@ namespace osu.Game.Online.API
public APIState State public APIState State
{ {
get { return state; } get => state;
private set private set
{ {
APIState oldState = state; APIState oldState = state;

View File

@ -19,15 +19,9 @@ namespace osu.Game.Online.API
[JsonProperty(@"expires_in")] [JsonProperty(@"expires_in")]
public long ExpiresIn public long ExpiresIn
{ {
get get => AccessTokenExpiry - DateTimeOffset.UtcNow.ToUnixTimeSeconds();
{
return AccessTokenExpiry - DateTimeOffset.UtcNow.ToUnixTimeSeconds();
}
set set => AccessTokenExpiry = DateTimeOffset.Now.AddSeconds(value).ToUnixTimeSeconds();
{
AccessTokenExpiry = DateTimeOffset.Now.AddSeconds(value).ToUnixTimeSeconds();
}
} }
public bool IsValid => !string.IsNullOrEmpty(AccessToken) && ExpiresIn > 30; public bool IsValid => !string.IsNullOrEmpty(AccessToken) && ExpiresIn > 30;

View File

@ -39,7 +39,7 @@ namespace osu.Game.Online.Leaderboards
public IEnumerable<ScoreInfo> Scores public IEnumerable<ScoreInfo> Scores
{ {
get { return scores; } get => scores;
set set
{ {
scores = value; scores = value;
@ -98,7 +98,7 @@ namespace osu.Game.Online.Leaderboards
public TScope Scope public TScope Scope
{ {
get { return scope; } get => scope;
set set
{ {
if (value.Equals(scope)) if (value.Equals(scope))
@ -117,7 +117,7 @@ namespace osu.Game.Online.Leaderboards
/// </summary> /// </summary>
protected PlaceholderState PlaceholderState protected PlaceholderState PlaceholderState
{ {
get { return placeholderState; } get => placeholderState;
set set
{ {
if (value != PlaceholderState.Successful) if (value != PlaceholderState.Successful)

View File

@ -27,7 +27,7 @@ namespace osu.Game.Overlays.BeatmapSet
public BeatmapSetInfo BeatmapSet public BeatmapSetInfo BeatmapSet
{ {
get { return beatmapSet; } get => beatmapSet;
set set
{ {
if (value == beatmapSet) return; if (value == beatmapSet) return;

View File

@ -21,7 +21,7 @@ namespace osu.Game.Overlays.BeatmapSet
public BeatmapSetInfo BeatmapSet public BeatmapSetInfo BeatmapSet
{ {
get { return beatmapSet; } get => beatmapSet;
set set
{ {
if (value == beatmapSet) return; if (value == beatmapSet) return;
@ -35,7 +35,7 @@ namespace osu.Game.Overlays.BeatmapSet
public BeatmapInfo Beatmap public BeatmapInfo Beatmap
{ {
get { return beatmap; } get => beatmap;
set set
{ {
if (value == beatmap) return; if (value == beatmap) return;
@ -95,8 +95,8 @@ namespace osu.Game.Overlays.BeatmapSet
public string Value public string Value
{ {
get { return value.Text; } get => value.Text;
set { this.value.Text = value; } set => this.value.Text = value;
} }
public Statistic(FontAwesome icon, string name) public Statistic(FontAwesome icon, string name)

View File

@ -35,7 +35,7 @@ namespace osu.Game.Overlays.BeatmapSet
private BeatmapSetInfo beatmapSet; private BeatmapSetInfo beatmapSet;
public BeatmapSetInfo BeatmapSet public BeatmapSetInfo BeatmapSet
{ {
get { return beatmapSet; } get => beatmapSet;
set set
{ {
if (value == beatmapSet) return; if (value == beatmapSet) return;
@ -196,7 +196,7 @@ namespace osu.Game.Overlays.BeatmapSet
private DifficultySelectorState state; private DifficultySelectorState state;
public DifficultySelectorState State public DifficultySelectorState State
{ {
get { return state; } get => state;
set set
{ {
if (value == state) return; if (value == state) return;
@ -279,7 +279,7 @@ namespace osu.Game.Overlays.BeatmapSet
private int value; private int value;
public int Value public int Value
{ {
get { return value; } get => value;
set set
{ {
this.value = value; this.value = value;

View File

@ -30,8 +30,8 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
public BeatmapSetInfo BeatmapSet public BeatmapSetInfo BeatmapSet
{ {
get { return playButton.BeatmapSet; } get => playButton.BeatmapSet;
set { playButton.BeatmapSet = value; } set => playButton.BeatmapSet = value;
} }
public PreviewButton() public PreviewButton()

View File

@ -25,7 +25,7 @@ namespace osu.Game.Overlays.BeatmapSet
public BeatmapSetInfo BeatmapSet public BeatmapSetInfo BeatmapSet
{ {
get { return beatmapSet; } get => beatmapSet;
set set
{ {
if (value == beatmapSet) return; if (value == beatmapSet) return;
@ -39,7 +39,7 @@ namespace osu.Game.Overlays.BeatmapSet
public BeatmapInfo Beatmap public BeatmapInfo Beatmap
{ {
get { return beatmap; } get => beatmap;
set set
{ {
if (value == beatmap) return; if (value == beatmap) return;

View File

@ -28,7 +28,7 @@ namespace osu.Game.Overlays.BeatmapSet
private BeatmapSetInfo beatmapSet; private BeatmapSetInfo beatmapSet;
public BeatmapSetInfo BeatmapSet public BeatmapSetInfo BeatmapSet
{ {
get { return beatmapSet; } get => beatmapSet;
set set
{ {
if (value == beatmapSet) return; if (value == beatmapSet) return;
@ -46,8 +46,8 @@ namespace osu.Game.Overlays.BeatmapSet
public BeatmapInfo Beatmap public BeatmapInfo Beatmap
{ {
get { return successRate.Beatmap; } get => successRate.Beatmap;
set { successRate.Beatmap = value; } set => successRate.Beatmap = value;
} }
public Info() public Info()
@ -162,8 +162,8 @@ namespace osu.Game.Overlays.BeatmapSet
public Color4 TextColour public Color4 TextColour
{ {
get { return textFlow.Colour; } get => textFlow.Colour;
set { textFlow.Colour = value; } set => textFlow.Colour = value;
} }
public MetadataSection(string title) public MetadataSection(string title)

View File

@ -19,7 +19,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private User user; private User user;
public User User public User User
{ {
get { return user; } get => user;
set set
{ {
if (user == value) return; if (user == value) return;

View File

@ -46,7 +46,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private APIScoreInfo score; private APIScoreInfo score;
public APIScoreInfo Score public APIScoreInfo Score
{ {
get { return score; } get => score;
set set
{ {
if (score == value) return; if (score == value) return;
@ -209,7 +209,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
return; return;
valueText.Text = value; valueText.Text = value;
} }
get { return valueText.Text; } get => valueText.Text;
} }
public InfoColumn(string header) public InfoColumn(string header)

View File

@ -34,7 +34,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
public IEnumerable<APIScoreInfo> Scores public IEnumerable<APIScoreInfo> Scores
{ {
get { return scores; } get => scores;
set set
{ {
getScoresRequest?.Cancel(); getScoresRequest?.Cancel();

View File

@ -23,7 +23,7 @@ namespace osu.Game.Overlays.BeatmapSet
private BeatmapInfo beatmap; private BeatmapInfo beatmap;
public BeatmapInfo Beatmap public BeatmapInfo Beatmap
{ {
get { return beatmap; } get => beatmap;
set set
{ {
if (value == beatmap) return; if (value == beatmap) return;

View File

@ -38,10 +38,7 @@ namespace osu.Game.Overlays.Chat.Selection
public IEnumerable<string> FilterTerms => new[] { channel.Name }; public IEnumerable<string> FilterTerms => new[] { channel.Name };
public bool MatchingFilter public bool MatchingFilter
{ {
set set => this.FadeTo(value ? 1f : 0f, 100);
{
this.FadeTo(value ? 1f : 0f, 100);
}
} }
public Action<Channel> OnRequestJoin; public Action<Channel> OnRequestJoin;

View File

@ -23,21 +23,18 @@ namespace osu.Game.Overlays.Chat.Selection
public IEnumerable<string> FilterTerms => Array.Empty<string>(); public IEnumerable<string> FilterTerms => Array.Empty<string>();
public bool MatchingFilter public bool MatchingFilter
{ {
set set => this.FadeTo(value ? 1f : 0f, 100);
{
this.FadeTo(value ? 1f : 0f, 100);
}
} }
public string Header public string Header
{ {
get { return header.Text; } get => header.Text;
set { header.Text = value.ToUpperInvariant(); } set => header.Text = value.ToUpperInvariant();
} }
public IEnumerable<Channel> Channels public IEnumerable<Channel> Channels
{ {
set { ChannelFlow.ChildrenEnumerable = value.Select(c => new ChannelListItem(c)); } set => ChannelFlow.ChildrenEnumerable = value.Select(c => new ChannelListItem(c));
} }
public ChannelSection() public ChannelSection()

View File

@ -158,7 +158,7 @@ namespace osu.Game.Overlays.Direct
public int Value public int Value
{ {
get { return value; } get => value;
set set
{ {
this.value = value; this.value = value;

View File

@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Direct
public BeatmapSetInfo BeatmapSet public BeatmapSetInfo BeatmapSet
{ {
get { return beatmapSet; } get => beatmapSet;
set set
{ {
if (value == beatmapSet) return; if (value == beatmapSet) return;

View File

@ -45,7 +45,7 @@ namespace osu.Game.Overlays
public IEnumerable<BeatmapSetInfo> BeatmapSets public IEnumerable<BeatmapSetInfo> BeatmapSets
{ {
get { return beatmapSets; } get => beatmapSets;
set set
{ {
if (beatmapSets?.Equals(value) ?? false) return; if (beatmapSets?.Equals(value) ?? false) return;
@ -72,7 +72,7 @@ namespace osu.Game.Overlays
public ResultCounts ResultAmounts public ResultCounts ResultAmounts
{ {
get { return resultAmounts; } get => resultAmounts;
set set
{ {
if (value == ResultAmounts) return; if (value == ResultAmounts) return;

View File

@ -35,7 +35,7 @@ namespace osu.Game.Overlays.KeyBinding
public bool MatchingFilter public bool MatchingFilter
{ {
get { return matchingFilter; } get => matchingFilter;
set set
{ {
matchingFilter = value; matchingFilter = value;
@ -309,7 +309,7 @@ namespace osu.Game.Overlays.KeyBinding
public bool IsBinding public bool IsBinding
{ {
get { return isBinding; } get => isBinding;
set set
{ {
if (value == isBinding) return; if (value == isBinding) return;

View File

@ -132,7 +132,7 @@ namespace osu.Game.Overlays.MedalSplash
public DisplayState State public DisplayState State
{ {
get { return state; } get => state;
set set
{ {
if (state == value) return; if (state == value) return;

View File

@ -107,7 +107,7 @@ namespace osu.Game.Overlays.Mods
public Color4 SelectedColour public Color4 SelectedColour
{ {
get { return selectedColour; } get => selectedColour;
set set
{ {
if (value == selectedColour) return; if (value == selectedColour) return;
@ -121,7 +121,7 @@ namespace osu.Game.Overlays.Mods
public Mod Mod public Mod Mod
{ {
get { return mod; } get => mod;
set set
{ {
mod = value; mod = value;

View File

@ -52,7 +52,7 @@ namespace osu.Game.Overlays.Music
private bool selected; private bool selected;
public bool Selected public bool Selected
{ {
get { return selected; } get => selected;
set set
{ {
if (value == selected) return; if (value == selected) return;
@ -142,7 +142,7 @@ namespace osu.Game.Overlays.Music
public bool MatchingFilter public bool MatchingFilter
{ {
get { return matching; } get => matching;
set set
{ {
if (matching == value) return; if (matching == value) return;

View File

@ -34,8 +34,8 @@ namespace osu.Game.Overlays.Music
public new MarginPadding Padding public new MarginPadding Padding
{ {
get { return base.Padding; } get => base.Padding;
set { base.Padding = value; } set => base.Padding = value;
} }
public BeatmapSetInfo FirstVisibleSet => items.FirstVisibleSet; public BeatmapSetInfo FirstVisibleSet => items.FirstVisibleSet;
@ -109,8 +109,8 @@ namespace osu.Game.Overlays.Music
public string SearchTerm public string SearchTerm
{ {
get { return search.SearchTerm; } get => search.SearchTerm;
set { search.SearchTerm = value; } set => search.SearchTerm = value;
} }
public BeatmapSetInfo FirstVisibleSet => items.FirstOrDefault(i => i.MatchingFilter)?.BeatmapSetInfo; public BeatmapSetInfo FirstVisibleSet => items.FirstOrDefault(i => i.MatchingFilter)?.BeatmapSetInfo;

View File

@ -205,7 +205,7 @@ namespace osu.Game.Overlays.Notifications
public bool Pulsate public bool Pulsate
{ {
get { return pulsate; } get => pulsate;
set set
{ {
if (pulsate == value) return; if (pulsate == value) return;

View File

@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Notifications
public string ClearText public string ClearText
{ {
get { return clearText; } get => clearText;
set set
{ {
clearText = value; clearText = value;
@ -51,7 +51,7 @@ namespace osu.Game.Overlays.Notifications
public string Title public string Title
{ {
get { return title; } get => title;
set set
{ {
title = value; title = value;
@ -153,8 +153,8 @@ namespace osu.Game.Overlays.Notifications
public string Text public string Text
{ {
get { return text.Text; } get => text.Text;
set { text.Text = value.ToUpperInvariant(); } set => text.Text = value.ToUpperInvariant();
} }
} }

View File

@ -17,18 +17,15 @@ namespace osu.Game.Overlays.Notifications
{ {
public string Text public string Text
{ {
set set => Schedule(() => textDrawable.Text = value);
{
Schedule(() => textDrawable.Text = value);
}
} }
public string CompletionText { get; set; } = "Task has completed!"; public string CompletionText { get; set; } = "Task has completed!";
public float Progress public float Progress
{ {
get { return progressBar.Progress; } get => progressBar.Progress;
set { Schedule(() => progressBar.Progress = value); } set => Schedule(() => progressBar.Progress = value);
} }
protected override void LoadComplete() protected override void LoadComplete()
@ -41,9 +38,8 @@ namespace osu.Game.Overlays.Notifications
public virtual ProgressNotificationState State public virtual ProgressNotificationState State
{ {
get { return state; } get => state;
set set =>
{
Schedule(() => Schedule(() =>
{ {
bool stateChanged = state != value; bool stateChanged = state != value;
@ -82,7 +78,6 @@ namespace osu.Game.Overlays.Notifications
} }
} }
}); });
}
} }
private ProgressNotificationState state; private ProgressNotificationState state;
@ -180,7 +175,7 @@ namespace osu.Game.Overlays.Notifications
private float progress; private float progress;
public float Progress public float Progress
{ {
get { return progress; } get => progress;
set set
{ {
if (progress == value) return; if (progress == value) return;
@ -194,7 +189,7 @@ namespace osu.Game.Overlays.Notifications
public bool Active public bool Active
{ {
get { return active; } get => active;
set set
{ {
active = value; active = value;

View File

@ -17,7 +17,7 @@ namespace osu.Game.Overlays.Notifications
private string text = string.Empty; private string text = string.Empty;
public string Text public string Text
{ {
get { return text; } get => text;
set set
{ {
text = value; text = value;
@ -28,7 +28,7 @@ namespace osu.Game.Overlays.Notifications
private FontAwesome icon = FontAwesome.fa_info_circle; private FontAwesome icon = FontAwesome.fa_info_circle;
public FontAwesome Icon public FontAwesome Icon
{ {
get { return icon; } get => icon;
set set
{ {
icon = value; icon = value;
@ -76,10 +76,7 @@ namespace osu.Game.Overlays.Notifications
public override bool Read public override bool Read
{ {
get get => base.Read;
{
return base.Read;
}
set set
{ {

View File

@ -318,7 +318,7 @@ namespace osu.Game.Overlays.Profile
public User User public User User
{ {
get { return user; } get => user;
set set
{ {
user = value; user = value;

View File

@ -78,7 +78,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
public new int Count public new int Count
{ {
set { valueText.Text = value.ToString(); } set => valueText.Text = value.ToString();
} }
public CountSection(string header, string description) public CountSection(string header, string description)

View File

@ -41,7 +41,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
public bool Bounding public bool Bounding
{ {
get { return bounding; } get => bounding;
set set
{ {
bounding = value; bounding = value;
@ -338,7 +338,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
public Color4 StatusColour public Color4 StatusColour
{ {
set { statusIcon.FadeColour(value, 500, Easing.OutQuint); } set => statusIcon.FadeColour(value, 500, Easing.OutQuint);
} }
public UserDropdownHeader() public UserDropdownHeader()

View File

@ -14,8 +14,8 @@ namespace osu.Game.Overlays.Settings
public override string LabelText public override string LabelText
{ {
get { return checkbox.LabelText; } get => checkbox.LabelText;
set { checkbox.LabelText = value; } set => checkbox.LabelText = value;
} }
} }
} }

View File

@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Settings
public virtual string LabelText public virtual string LabelText
{ {
get { return text?.Text ?? string.Empty; } get => text?.Text ?? string.Empty;
set set
{ {
if (text == null) if (text == null)
@ -58,7 +58,7 @@ namespace osu.Game.Overlays.Settings
public virtual Bindable<T> Bindable public virtual Bindable<T> Bindable
{ {
get { return bindable; } get => bindable;
set set
{ {
@ -76,11 +76,7 @@ namespace osu.Game.Overlays.Settings
public bool MatchingFilter public bool MatchingFilter
{ {
set set => this.FadeTo(value ? 1 : 0);
{
// probably needs a better transition.
this.FadeTo(value ? 1 : 0);
}
} }
protected SettingsItem() protected SettingsItem()
@ -115,7 +111,7 @@ namespace osu.Game.Overlays.Settings
public Bindable<T> Bindable public Bindable<T> Bindable
{ {
get { return bindable; } get => bindable;
set set
{ {
bindable = value; bindable = value;

View File

@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Settings
public bool MatchingFilter public bool MatchingFilter
{ {
set { this.FadeTo(value ? 1 : 0); } set => this.FadeTo(value ? 1 : 0);
} }
protected SettingsSection() protected SettingsSection()

View File

@ -24,10 +24,7 @@ namespace osu.Game.Overlays.Settings
public IEnumerable<string> FilterTerms => new[] { Header }; public IEnumerable<string> FilterTerms => new[] { Header };
public bool MatchingFilter public bool MatchingFilter
{ {
set set => this.FadeTo(value ? 1 : 0);
{
this.FadeTo(value ? 1 : 0);
}
} }
protected SettingsSubsection() protected SettingsSubsection()

View File

@ -88,7 +88,7 @@ namespace osu.Game.Overlays.Settings
public ExpandedState State public ExpandedState State
{ {
get { return state; } get => state;
set set
{ {
expandEvent?.Cancel(); expandEvent?.Cancel();

View File

@ -28,10 +28,7 @@ namespace osu.Game.Overlays.Settings
private SettingsSection section; private SettingsSection section;
public SettingsSection Section public SettingsSection Section
{ {
get get => section;
{
return section;
}
set set
{ {
section = value; section = value;
@ -43,7 +40,7 @@ namespace osu.Game.Overlays.Settings
private bool selected; private bool selected;
public bool Selected public bool Selected
{ {
get { return selected; } get => selected;
set set
{ {
selected = value; selected = value;

View File

@ -36,7 +36,7 @@ namespace osu.Game.Overlays
private IEnumerable<User> users; private IEnumerable<User> users;
public IEnumerable<User> Users public IEnumerable<User> Users
{ {
get { return users; } get => users;
set set
{ {
if (users?.Equals(value) ?? false) if (users?.Equals(value) ?? false)

View File

@ -35,34 +35,25 @@ namespace osu.Game.Overlays.Toolbar
public FontAwesome Icon public FontAwesome Icon
{ {
set { SetIcon(value); } set => SetIcon(value);
} }
public string Text public string Text
{ {
get { return DrawableText.Text; } get => DrawableText.Text;
set set => DrawableText.Text = value;
{
DrawableText.Text = value;
}
} }
public string TooltipMain public string TooltipMain
{ {
get { return tooltip1.Text; } get => tooltip1.Text;
set set => tooltip1.Text = value;
{
tooltip1.Text = value;
}
} }
public string TooltipSub public string TooltipSub
{ {
get { return tooltip2.Text; } get => tooltip2.Text;
set set => tooltip2.Text = value;
{
tooltip2.Text = value;
}
} }
protected virtual Anchor TooltipAnchor => Anchor.TopLeft; protected virtual Anchor TooltipAnchor => Anchor.TopLeft;

View File

@ -66,7 +66,7 @@ namespace osu.Game.Overlays.Toolbar
public int Count public int Count
{ {
get { return count; } get => count;
set set
{ {
if (count == value) if (count == value)

View File

@ -17,7 +17,7 @@ namespace osu.Game.Overlays.Toolbar
public OverlayContainer StateContainer public OverlayContainer StateContainer
{ {
get { return stateContainer; } get => stateContainer;
set set
{ {
stateContainer = value; stateContainer = value;

View File

@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Toolbar
private RulesetInfo ruleset; private RulesetInfo ruleset;
public RulesetInfo Ruleset public RulesetInfo Ruleset
{ {
get { return ruleset; } get => ruleset;
set set
{ {
ruleset = value; ruleset = value;

View File

@ -22,8 +22,8 @@ namespace osu.Game.Rulesets.UI
public FontAwesome Icon public FontAwesome Icon
{ {
get { return modIcon.Icon; } get => modIcon.Icon;
set { modIcon.Icon = value; } set => modIcon.Icon = value;
} }
private readonly ModType type; private readonly ModType type;
@ -100,7 +100,7 @@ namespace osu.Game.Rulesets.UI
public bool Highlighted public bool Highlighted
{ {
get { return highlighted; } get => highlighted;
set set
{ {

View File

@ -15,7 +15,7 @@ namespace osu.Game.Screens.Backgrounds
public WorkingBeatmap Beatmap public WorkingBeatmap Beatmap
{ {
get { return beatmap; } get => beatmap;
set set
{ {
if (beatmap == value && beatmap != null) if (beatmap == value && beatmap != null)

View File

@ -22,7 +22,7 @@ namespace osu.Game.Screens.Edit
public override int Value public override int Value
{ {
get { return base.Value; } get => base.Value;
set set
{ {
if (!VALID_DIVISORS.Contains(value)) if (!VALID_DIVISORS.Contains(value))

View File

@ -14,7 +14,7 @@ namespace osu.Game.Screens.Edit.Components.RadioButtons
private IReadOnlyList<RadioButton> items; private IReadOnlyList<RadioButton> items;
public IReadOnlyList<RadioButton> Items public IReadOnlyList<RadioButton> Items
{ {
get { return items; } get => items;
set set
{ {
if (ReferenceEquals(items, value)) if (ReferenceEquals(items, value))

View File

@ -19,8 +19,8 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
public FontAwesome Icon public FontAwesome Icon
{ {
get { return button.Icon; } get => button.Icon;
set { button.Icon = value; } set => button.Icon = value;
} }
private readonly IconButton button; private readonly IconButton button;

View File

@ -242,7 +242,7 @@ namespace osu.Game.Screens.Menu
public ButtonState State public ButtonState State
{ {
get { return state; } get => state;
set set
{ {

View File

@ -206,7 +206,7 @@ namespace osu.Game.Screens.Menu
public ButtonSystemState State public ButtonSystemState State
{ {
get { return state; } get => state;
set set
{ {

View File

@ -62,7 +62,7 @@ namespace osu.Game.Screens.Menu
public bool Triangles public bool Triangles
{ {
set { colourAndTriangles.FadeTo(value ? 1 : 0, transition_length, Easing.OutQuint); } set => colourAndTriangles.FadeTo(value ? 1 : 0, transition_length, Easing.OutQuint);
} }
public bool BeatMatching = true; public bool BeatMatching = true;
@ -71,8 +71,8 @@ namespace osu.Game.Screens.Menu
public bool Ripple public bool Ripple
{ {
get { return rippleContainer.Alpha > 0; } get => rippleContainer.Alpha > 0;
set { rippleContainer.FadeTo(value ? 1 : 0, transition_length, Easing.OutQuint); } set => rippleContainer.FadeTo(value ? 1 : 0, transition_length, Easing.OutQuint);
} }
private readonly Box flashLayer; private readonly Box flashLayer;

View File

@ -45,7 +45,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
private SelectionState state; private SelectionState state;
public SelectionState State public SelectionState State
{ {
get { return state; } get => state;
set set
{ {
if (value == state) return; if (value == state) return;
@ -65,7 +65,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
private bool matchingFilter; private bool matchingFilter;
public bool MatchingFilter public bool MatchingFilter
{ {
get { return matchingFilter; } get => matchingFilter;
set set
{ {
matchingFilter = value; matchingFilter = value;

View File

@ -15,8 +15,8 @@ namespace osu.Game.Screens.Play.Break
public FontAwesome Icon public FontAwesome Icon
{ {
set { icon.Icon = value; } set => icon.Icon = value;
get { return icon.Icon; } get => icon.Icon;
} }
public override Vector2 Size public override Vector2 Size
@ -27,7 +27,7 @@ namespace osu.Game.Screens.Play.Break
base.Size = value + BlurSigma * 2.5f; base.Size = value + BlurSigma * 2.5f;
ForceRedraw(); ForceRedraw();
} }
get { return base.Size; } get => base.Size;
} }
public BlurredIcon() public BlurredIcon()

Some files were not shown because too many files have changed in this diff Show More