mirror of
https://github.com/ppy/osu.git
synced 2025-01-21 19:52:55 +08:00
Remove functions with get-only properties
This commit is contained in:
parent
17f2baf600
commit
6fca3e5a46
@ -17,11 +17,11 @@ namespace osu.Game.Overlays.Changelog
|
||||
Width *= 2;
|
||||
}
|
||||
|
||||
protected override string GetMainText() => Value.DisplayName;
|
||||
protected override string GetMainText => Value.DisplayName;
|
||||
|
||||
protected override string GetAdditionalText() => Value.LatestBuild.DisplayVersion;
|
||||
protected override string GetAdditionalText => Value.LatestBuild.DisplayVersion;
|
||||
|
||||
protected override string GetInfoText() => Value.LatestBuild.Users > 0 ? $"{"user".ToQuantity(Value.LatestBuild.Users, "N0")} online" : null;
|
||||
protected override string GetInfoText => Value.LatestBuild.Users > 0 ? $"{"user".ToQuantity(Value.LatestBuild.Users, "N0")} online" : null;
|
||||
|
||||
protected override Color4 GetBarColour(OsuColour colours) => Value.Colour;
|
||||
}
|
||||
|
@ -14,9 +14,9 @@ namespace osu.Game.Overlays.Home.Friends
|
||||
{
|
||||
}
|
||||
|
||||
protected override string GetMainText() => Value.Status.ToString();
|
||||
protected override string GetMainText => Value.Status.ToString();
|
||||
|
||||
protected override string GetAdditionalText() => Value.Count.ToString();
|
||||
protected override string GetAdditionalText => Value.Count.ToString();
|
||||
|
||||
protected override Color4 GetBarColour(OsuColour colours)
|
||||
{
|
||||
|
@ -58,17 +58,17 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = GetMainText(),
|
||||
Text = GetMainText,
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Black),
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = GetAdditionalText(),
|
||||
Text = GetAdditionalText,
|
||||
Font = OsuFont.GetFont(size: 16, weight: FontWeight.Regular),
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = GetInfoText(),
|
||||
Text = GetInfoText,
|
||||
Font = OsuFont.GetFont(size: 10),
|
||||
Colour = colourProvider.Foreground1
|
||||
},
|
||||
@ -88,11 +88,11 @@ namespace osu.Game.Overlays
|
||||
SelectedItem.BindValueChanged(_ => updateState(), true);
|
||||
}
|
||||
|
||||
protected abstract string GetMainText();
|
||||
protected abstract string GetMainText { get; }
|
||||
|
||||
protected abstract string GetAdditionalText();
|
||||
protected abstract string GetAdditionalText { get; }
|
||||
|
||||
protected virtual string GetInfoText() => string.Empty;
|
||||
protected virtual string GetInfoText => string.Empty;
|
||||
|
||||
protected abstract Color4 GetBarColour(OsuColour colours);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user