mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Move label initialisation out of ctor
This commit is contained in:
@ -20,7 +20,6 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
using osu.Game.Resources.Localisation.Web;
|
using osu.Game.Resources.Localisation.Web;
|
||||||
using osu.Game.Screens.Select.Filter;
|
|
||||||
|
|
||||||
namespace osu.Game.Skinning.Components
|
namespace osu.Game.Skinning.Components
|
||||||
{
|
{
|
||||||
@ -40,29 +39,24 @@ namespace osu.Game.Skinning.Components
|
|||||||
|
|
||||||
private readonly Dictionary<BeatmapAttribute, LocalisableString> valueDictionary = new Dictionary<BeatmapAttribute, LocalisableString>();
|
private readonly Dictionary<BeatmapAttribute, LocalisableString> valueDictionary = new Dictionary<BeatmapAttribute, LocalisableString>();
|
||||||
|
|
||||||
private static readonly ImmutableDictionary<BeatmapAttribute, LocalisableString> label_dictionary;
|
private static readonly ImmutableDictionary<BeatmapAttribute, LocalisableString> label_dictionary = new Dictionary<BeatmapAttribute, LocalisableString>
|
||||||
|
{
|
||||||
|
[BeatmapAttribute.CircleSize] = BeatmapsetsStrings.ShowStatsCs,
|
||||||
|
[BeatmapAttribute.Accuracy] = BeatmapsetsStrings.ShowStatsAccuracy,
|
||||||
|
[BeatmapAttribute.HPDrain] = BeatmapsetsStrings.ShowStatsDrain,
|
||||||
|
[BeatmapAttribute.ApproachRate] = BeatmapsetsStrings.ShowStatsAr,
|
||||||
|
[BeatmapAttribute.StarRating] = BeatmapsetsStrings.ShowStatsStars,
|
||||||
|
[BeatmapAttribute.Title] = EditorSetupStrings.Title,
|
||||||
|
[BeatmapAttribute.Artist] = EditorSetupStrings.Artist,
|
||||||
|
[BeatmapAttribute.DifficultyName] = EditorSetupStrings.DifficultyHeader,
|
||||||
|
[BeatmapAttribute.Creator] = EditorSetupStrings.Creator,
|
||||||
|
[BeatmapAttribute.Length] = ArtistStrings.TracklistLength.ToTitle(),
|
||||||
|
[BeatmapAttribute.RankedStatus] = BeatmapDiscussionsStrings.IndexFormBeatmapsetStatusDefault,
|
||||||
|
[BeatmapAttribute.BPM] = BeatmapsetsStrings.ShowStatsBpm,
|
||||||
|
}.ToImmutableDictionary();
|
||||||
|
|
||||||
private readonly OsuSpriteText text;
|
private readonly OsuSpriteText text;
|
||||||
|
|
||||||
static BeatmapAttributeText()
|
|
||||||
{
|
|
||||||
label_dictionary = new Dictionary<BeatmapAttribute, LocalisableString>
|
|
||||||
{
|
|
||||||
[BeatmapAttribute.CircleSize] = BeatmapsetsStrings.ShowStatsCs,
|
|
||||||
[BeatmapAttribute.Accuracy] = BeatmapsetsStrings.ShowStatsAccuracy,
|
|
||||||
[BeatmapAttribute.HPDrain] = BeatmapsetsStrings.ShowStatsDrain,
|
|
||||||
[BeatmapAttribute.ApproachRate] = BeatmapsetsStrings.ShowStatsAr,
|
|
||||||
[BeatmapAttribute.StarRating] = BeatmapsetsStrings.ShowStatsStars,
|
|
||||||
[BeatmapAttribute.Title] = EditorSetupStrings.Title,
|
|
||||||
[BeatmapAttribute.Artist] = EditorSetupStrings.Artist,
|
|
||||||
[BeatmapAttribute.DifficultyName] = EditorSetupStrings.DifficultyHeader,
|
|
||||||
[BeatmapAttribute.Creator] = EditorSetupStrings.Creator,
|
|
||||||
[BeatmapAttribute.Length] = ArtistStrings.TracklistLength.ToTitle(),
|
|
||||||
[BeatmapAttribute.RankedStatus] = BeatmapDiscussionsStrings.IndexFormBeatmapsetStatusDefault,
|
|
||||||
[BeatmapAttribute.BPM] = BeatmapsetsStrings.ShowStatsBpm,
|
|
||||||
}.ToImmutableDictionary();
|
|
||||||
}
|
|
||||||
|
|
||||||
public BeatmapAttributeText()
|
public BeatmapAttributeText()
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
|
Reference in New Issue
Block a user