1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Merge branch 'master' into more-inspections

This commit is contained in:
Dean Herbert 2019-02-28 14:32:57 +09:00 committed by GitHub
commit 0788a7e9f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
130 changed files with 290 additions and 317 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -108,7 +108,7 @@ namespace osu.Game.Graphics
public bool Shadow
{
get { return shadow; }
get => shadow;
set
{
shadow = value;
@ -121,8 +121,7 @@ namespace osu.Game.Graphics
public FontAwesome Icon
{
get { return icon; }
get => icon;
set
{
if (icon == value) return;

View File

@ -26,7 +26,7 @@ namespace osu.Game.Graphics.UserInterface
/// </summary>
public float Length
{
get { return length; }
get => length;
set
{
length = MathHelper.Clamp(value, 0, 1);
@ -50,7 +50,7 @@ namespace osu.Game.Graphics.UserInterface
public BarDirection Direction
{
get { return direction; }
get => direction;
set
{
direction = value;

View File

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

View File

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

View File

@ -157,7 +157,7 @@ namespace osu.Game.Graphics.UserInterface
public Color4 ButtonColour
{
get { return buttonColour; }
get => buttonColour;
set
{
buttonColour = value;
@ -170,7 +170,7 @@ namespace osu.Game.Graphics.UserInterface
public Color4 BackgroundColour
{
get { return backgroundColour; }
get => backgroundColour;
set
{
backgroundColour = value;
@ -182,7 +182,7 @@ namespace osu.Game.Graphics.UserInterface
public string Text
{
get { return text; }
get => text;
set
{
text = value;

View File

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

View File

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

View File

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

View File

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

View File

@ -20,7 +20,7 @@ namespace osu.Game.Graphics.UserInterface
public Color4 AccentColour
{
get { return accentColour; }
get => accentColour;
set
{
accentColour = value;
@ -88,7 +88,7 @@ namespace osu.Game.Graphics.UserInterface
public Color4 AccentColour
{
get { return accentColour; }
get => accentColour;
set
{
accentColour = value;
@ -110,7 +110,7 @@ namespace osu.Game.Graphics.UserInterface
public Color4 AccentColour
{
get { return accentColour ?? nonAccentSelectedColour; }
get => accentColour ?? nonAccentSelectedColour;
set
{
accentColour = value;
@ -164,8 +164,8 @@ namespace osu.Game.Graphics.UserInterface
{
public string Text
{
get { return Label.Text; }
set { Label.Text = value; }
get => Label.Text;
set => Label.Text = value;
}
public readonly OsuSpriteText Label;
@ -211,8 +211,8 @@ namespace osu.Game.Graphics.UserInterface
protected override string Label
{
get { return Text.Text; }
set { Text.Text = value; }
get => Text.Text;
set => Text.Text = value;
}
protected readonly SpriteIcon Icon;
@ -221,7 +221,7 @@ namespace osu.Game.Graphics.UserInterface
public virtual Color4 AccentColour
{
get { return accentColour; }
get => accentColour;
set
{
accentColour = value;

View File

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

View File

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

View File

@ -61,7 +61,7 @@ namespace osu.Game.Graphics.UserInterface
public Color4 AccentColour
{
get { return accentColour; }
get => accentColour;
set
{
accentColour = value;
@ -105,7 +105,7 @@ namespace osu.Game.Graphics.UserInterface
public Color4 AccentColour
{
get { return accentColour; }
get => accentColour;
set
{
accentColour = value;
@ -227,8 +227,7 @@ namespace osu.Game.Graphics.UserInterface
{
public override Color4 AccentColour
{
get { return base.AccentColour; }
get => base.AccentColour;
set
{
base.AccentColour = value;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -48,8 +48,7 @@ namespace osu.Game.Graphics.UserInterface
public override Anchor Origin
{
get { return base.Origin; }
get => base.Origin;
set
{
base.Origin = value;
@ -152,12 +151,12 @@ namespace osu.Game.Graphics.UserInterface
public FontAwesome Icon
{
set { bouncingIcon.Icon = value; }
set => bouncingIcon.Icon = value;
}
public string Text
{
set { text.Text = value; }
set => text.Text = value;
}
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => IconLayer.ReceivePositionalInputAt(screenSpacePos) || TextLayer.ReceivePositionalInputAt(screenSpacePos);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Chat.Selection
public bool MatchingFilter
{
set { this.FadeTo(value ? 1f : 0f, 100); }
set => this.FadeTo(value ? 1f : 0f, 100);
}
public Action<Channel> OnRequestJoin;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Notifications
public string Text
{
get { return text; }
get => text;
set
{
text = value;
@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Notifications
public FontAwesome Icon
{
get { return icon; }
get => icon;
set
{
icon = value;
@ -78,8 +78,7 @@ namespace osu.Game.Overlays.Notifications
public override bool Read
{
get { return base.Read; }
get => base.Read;
set
{
if (value == base.Read) return;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -29,7 +29,7 @@ namespace osu.Game.Overlays.Settings
public SettingsSection Section
{
get { return section; }
get => section;
set
{
section = value;
@ -42,7 +42,7 @@ namespace osu.Game.Overlays.Settings
public bool Selected
{
get { return selected; }
get => selected;
set
{
selected = value;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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