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

Rename FontColour to TextColour

This commit is contained in:
Daniel Cios 2024-09-20 16:50:17 +02:00
parent ec575e9de4
commit 73b6744a97
5 changed files with 11 additions and 11 deletions

View File

@ -70,14 +70,14 @@ namespace osu.Game.Localisation.SkinComponents
public static LocalisableString ColourDescription => new TranslatableString(getKey(@"colour_description"), @"The colour of the component."); public static LocalisableString ColourDescription => new TranslatableString(getKey(@"colour_description"), @"The colour of the component.");
/// <summary> /// <summary>
/// "Font colour" /// "Text colour"
/// </summary> /// </summary>
public static LocalisableString FontColour => new TranslatableString(getKey(@"font_colour"), @"Font colour"); public static LocalisableString TextColour => new TranslatableString(getKey(@"text_colour"), @"Text colour");
/// <summary> /// <summary>
/// "The colour of the font." /// "The colour of the text."
/// </summary> /// </summary>
public static LocalisableString FontColourDescription => new TranslatableString(getKey(@"font_colour_description"), @"The colour of the font."); public static LocalisableString TextColourDescription => new TranslatableString(getKey(@"text_colour_description"), @"The colour of the text.");
private static string getKey(string key) => $@"{prefix}:{key}"; private static string getKey(string key) => $@"{prefix}:{key}";
} }

View File

@ -124,7 +124,7 @@ namespace osu.Game.Skinning.Components
protected override void SetFont(FontUsage font) => text.Font = font.With(size: 40); protected override void SetFont(FontUsage font) => text.Font = font.With(size: 40);
protected override void SetFontColour(Colour4 fontColour) => text.Colour = fontColour; protected override void SetTextColour(Colour4 textColour) => text.Colour = textColour;
} }
// WARNING: DO NOT ADD ANY VALUES TO THIS ENUM ANYWHERE ELSE THAN AT THE END. // WARNING: DO NOT ADD ANY VALUES TO THIS ENUM ANYWHERE ELSE THAN AT THE END.

View File

@ -54,6 +54,6 @@ namespace osu.Game.Skinning.Components
protected override void SetFont(FontUsage font) => text.Font = font.With(size: 40); protected override void SetFont(FontUsage font) => text.Font = font.With(size: 40);
protected override void SetFontColour(Colour4 fontColour) => text.Colour = fontColour; protected override void SetTextColour(Colour4 textColour) => text.Colour = textColour;
} }
} }

View File

@ -37,6 +37,6 @@ namespace osu.Game.Skinning.Components
protected override void SetFont(FontUsage font) => text.Font = font.With(size: 40); protected override void SetFont(FontUsage font) => text.Font = font.With(size: 40);
protected override void SetFontColour(Colour4 fontColour) => text.Colour = fontColour; protected override void SetTextColour(Colour4 textColour) => text.Colour = textColour;
} }
} }

View File

@ -21,15 +21,15 @@ namespace osu.Game.Skinning
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Font), nameof(SkinnableComponentStrings.FontDescription))] [SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Font), nameof(SkinnableComponentStrings.FontDescription))]
public Bindable<Typeface> Font { get; } = new Bindable<Typeface>(Typeface.Torus); public Bindable<Typeface> Font { get; } = new Bindable<Typeface>(Typeface.Torus);
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.FontColour), nameof(SkinnableComponentStrings.FontColourDescription))] [SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.TextColour), nameof(SkinnableComponentStrings.TextColourDescription))]
public BindableColour4 FontColour { get; } = new BindableColour4(Colour4.White); public BindableColour4 TextColour { get; } = new BindableColour4(Colour4.White);
/// <summary> /// <summary>
/// Implement to apply the user font selection to one or more components. /// Implement to apply the user font selection to one or more components.
/// </summary> /// </summary>
protected abstract void SetFont(FontUsage font); protected abstract void SetFont(FontUsage font);
protected abstract void SetFontColour(Colour4 fontColour); protected abstract void SetTextColour(Colour4 textColour);
protected override void LoadComplete() protected override void LoadComplete()
{ {
@ -44,7 +44,7 @@ namespace osu.Game.Skinning
SetFont(f); SetFont(f);
}, true); }, true);
FontColour.BindValueChanged(e => SetFontColour(e.NewValue), true); TextColour.BindValueChanged(e => SetTextColour(e.NewValue), true);
} }
} }
} }