Skip to content

Commit

Permalink
Add localisation support for "use relative size" setting label
Browse files Browse the repository at this point in the history
  • Loading branch information
bdach committed Oct 18, 2024
1 parent 7d0da79 commit bb4f3c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ public static class SkinnableComponentStrings
/// </summary>
public static LocalisableString TextColourDescription => new TranslatableString(getKey(@"text_colour_description"), @"The colour of the text.");

/// <summary>
/// "Use relative size"
/// </summary>
public static LocalisableString UseRelativeSize => new TranslatableString(getKey(@"use_relative_size"), @"Use relative size");

private static string getKey(string key) => $@"{prefix}:{key}";
}
}
3 changes: 2 additions & 1 deletion osu.Game/Screens/Play/HUD/ArgonHealthDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using osu.Framework.Threading;
using osu.Framework.Utils;
using osu.Game.Configuration;
using osu.Game.Localisation.SkinComponents;
using osu.Game.Rulesets.Judgements;
using osu.Game.Screens.Play.HUD.ArgonHealthDisplayParts;
using osu.Game.Skinning;
Expand All @@ -33,7 +34,7 @@ public partial class ArgonHealthDisplay : HealthDisplay, ISerialisableDrawable
Precision = 1
};

[SettingSource("Use relative size")]
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.UseRelativeSize))]
public BindableBool UseRelativeSize { get; } = new BindableBool(true);

private ArgonHealthDisplayBar mainBar = null!;
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/Play/HUD/ArgonSongProgress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public partial class ArgonSongProgress : SongProgress
[SettingSource(typeof(SongProgressStrings), nameof(SongProgressStrings.ShowTime), nameof(SongProgressStrings.ShowTimeDescription))]
public Bindable<bool> ShowTime { get; } = new BindableBool(true);

[SettingSource("Use relative size")]
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.UseRelativeSize))]
public BindableBool UseRelativeSize { get; } = new BindableBool(true);

[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Colour), nameof(SkinnableComponentStrings.ColourDescription))]
Expand Down

0 comments on commit bb4f3c7

Please sign in to comment.