1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 21:27:24 +08:00

Move label initialisation out of ctor

This commit is contained in:
Dean Herbert 2022-11-23 16:49:39 +09:00
parent 27473262af
commit a8af83e62a

View File

@ -20,7 +20,6 @@ using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Localisation;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Screens.Select.Filter;
namespace osu.Game.Skinning.Components
{
@ -40,13 +39,7 @@ namespace osu.Game.Skinning.Components
private readonly Dictionary<BeatmapAttribute, LocalisableString> valueDictionary = new Dictionary<BeatmapAttribute, LocalisableString>();
private static readonly ImmutableDictionary<BeatmapAttribute, LocalisableString> label_dictionary;
private readonly OsuSpriteText text;
static BeatmapAttributeText()
{
label_dictionary = new Dictionary<BeatmapAttribute, LocalisableString>
private static readonly ImmutableDictionary<BeatmapAttribute, LocalisableString> label_dictionary = new Dictionary<BeatmapAttribute, LocalisableString>
{
[BeatmapAttribute.CircleSize] = BeatmapsetsStrings.ShowStatsCs,
[BeatmapAttribute.Accuracy] = BeatmapsetsStrings.ShowStatsAccuracy,
@ -61,7 +54,8 @@ namespace osu.Game.Skinning.Components
[BeatmapAttribute.RankedStatus] = BeatmapDiscussionsStrings.IndexFormBeatmapsetStatusDefault,
[BeatmapAttribute.BPM] = BeatmapsetsStrings.ShowStatsBpm,
}.ToImmutableDictionary();
}
private readonly OsuSpriteText text;
public BeatmapAttributeText()
{