Skip to content

Commit

Permalink
Romaji -> Romajisation in the KaraokeRulesetConfigManager.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Mar 10, 2024
1 parent 1a2a498 commit 389b385
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ protected override void InitialiseDefaults()
SetDefault(KaraokeRulesetSetting.MainFont, new FontUsage("Torus", 48, "Bold"), 48f, 48f);
SetDefault(KaraokeRulesetSetting.RubyFont, new FontUsage("Torus", 20, "Bold"), 8f, 48f);
SetDefault(KaraokeRulesetSetting.RubyMargin, 5, 0, 20);
SetDefault(KaraokeRulesetSetting.RomajiFont, new FontUsage("Torus", 20, "Bold"), 8f, 48f);
SetDefault(KaraokeRulesetSetting.RomajiMargin, 0, 0, 20);
SetDefault(KaraokeRulesetSetting.RomanisationFont, new FontUsage("Torus", 20, "Bold"), 8f, 48f);
SetDefault(KaraokeRulesetSetting.RomanisationMargin, 0, 0, 20);
SetDefault(KaraokeRulesetSetting.ForceUseDefaultFont, false);
SetDefault(KaraokeRulesetSetting.TranslateFont, new FontUsage("Torus", 18, "Bold"), 10f, 48f);
SetDefault(KaraokeRulesetSetting.ForceUseDefaultTranslateFont, false);
Expand All @@ -83,7 +83,7 @@ protected override void AddBindable<TBindable>(KaraokeRulesetSetting lookup, Bin

case KaraokeRulesetSetting.MainFont:
case KaraokeRulesetSetting.RubyFont:
case KaraokeRulesetSetting.RomajiFont:
case KaraokeRulesetSetting.RomanisationFont:
case KaraokeRulesetSetting.TranslateFont:
case KaraokeRulesetSetting.NoteFont:
base.AddBindable(lookup, new BindableFontUsage(TypeUtils.ChangeType<FontUsage>(bindable.Value)));
Expand Down Expand Up @@ -164,8 +164,8 @@ public enum KaraokeRulesetSetting
MainFont,
RubyFont,
RubyMargin,
RomajiFont,
RomajiMargin,
RomanisationFont,
RomanisationMargin,
ForceUseDefaultFont,
TranslateFont,
ForceUseDefaultTranslateFont,
Expand Down
12 changes: 6 additions & 6 deletions osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public partial class DrawableLyric : DrawableKaraokeHitObject
private readonly Bindable<FontUsage> mainFontUsageBindable = new();
private readonly Bindable<FontUsage> rubyFontUsageBindable = new();
private readonly Bindable<int> rubyMarginBindable = new();
private readonly Bindable<FontUsage> romajiFontUsageBindable = new();
private readonly Bindable<int> romajiMarginBindable = new();
private readonly Bindable<FontUsage> romanisationFontUsageBindable = new();
private readonly Bindable<int> romanisationMarginBindable = new();
private readonly Bindable<FontUsage> translateFontUsageBindable = new();

private readonly IBindableDictionary<Singer, SingerState[]> singersBindable = new BindableDictionary<Singer, SingerState[]>();
Expand Down Expand Up @@ -102,16 +102,16 @@ private void load([CanBeNull] KaraokeSessionStatics session)
config.BindWith(KaraokeRulesetSetting.MainFont, mainFontUsageBindable);
config.BindWith(KaraokeRulesetSetting.RubyFont, rubyFontUsageBindable);
config.BindWith(KaraokeRulesetSetting.RubyMargin, rubyMarginBindable);
config.BindWith(KaraokeRulesetSetting.RomajiFont, romajiFontUsageBindable);
config.BindWith(KaraokeRulesetSetting.RomajiMargin, romajiMarginBindable);
config.BindWith(KaraokeRulesetSetting.RomanisationFont, romanisationFontUsageBindable);
config.BindWith(KaraokeRulesetSetting.RomanisationMargin, romanisationMarginBindable);
config.BindWith(KaraokeRulesetSetting.TranslateFont, translateFontUsageBindable);
}

mainFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo());
rubyFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo());
rubyMarginBindable.BindValueChanged(_ => updateLyricFontInfo());
romajiFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo());
romajiMarginBindable.BindValueChanged(_ => updateLyricFontInfo());
romanisationFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo());
romanisationMarginBindable.BindValueChanged(_ => updateLyricFontInfo());
translateFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo());

// property in hitobject.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public partial class LyricPreview : SettingsSubsectionPreview
{
private readonly Bindable<FontUsage> mainFont = new();
private readonly Bindable<FontUsage> rubyFont = new();
private readonly Bindable<FontUsage> romajiFont = new();
private readonly Bindable<FontUsage> romanisationFont = new();
private readonly Bindable<FontUsage> translateFont = new();
private readonly Bindable<CultureInfo> preferLanguage = new();

Expand Down Expand Up @@ -60,7 +60,7 @@ public LyricPreview()
{
addFont(e.NewValue);
});
romajiFont.BindValueChanged(e =>
romanisationFont.BindValueChanged(e =>
{
addFont(e.NewValue);
});
Expand Down Expand Up @@ -94,7 +94,7 @@ private void load(FontManager fontManager, IRenderer renderer, KaraokeRulesetCon
// fonts
config.BindWith(KaraokeRulesetSetting.MainFont, mainFont);
config.BindWith(KaraokeRulesetSetting.RubyFont, rubyFont);
config.BindWith(KaraokeRulesetSetting.RomajiFont, romajiFont);
config.BindWith(KaraokeRulesetSetting.RomanisationFont, romanisationFont);
config.BindWith(KaraokeRulesetSetting.TranslateFont, translateFont);
config.BindWith(KaraokeRulesetSetting.PreferLanguage, preferLanguage);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ private void load()
},
new SettingsFont
{
LabelText = "Default romaji font",
Current = Config.GetBindable<FontUsage>(KaraokeRulesetSetting.RomajiFont),
LabelText = "Default romanisation font",
Current = Config.GetBindable<FontUsage>(KaraokeRulesetSetting.RomanisationFont),
},
new SettingsSlider<int>
{
LabelText = "Romaji margin",
Current = Config.GetBindable<int>(KaraokeRulesetSetting.RomajiMargin),
LabelText = "Romanisation margin",
Current = Config.GetBindable<int>(KaraokeRulesetSetting.RomanisationMargin),
KeyboardStep = 1,
},
new SettingsCheckbox
Expand Down
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void ApplyTo(Drawable d)
// Apply text font info
l.Font = getFont(KaraokeRulesetSetting.MainFont, MainTextFont);
l.RubyFont = getFont(KaraokeRulesetSetting.RubyFont, RubyTextFont);
l.RomajiFont = getFont(KaraokeRulesetSetting.RomajiFont, RomajiTextFont);
l.RomajiFont = getFont(KaraokeRulesetSetting.RomanisationFont, RomajiTextFont);

// Layout to text
l.KaraokeTextSmartHorizon = SmartHorizon;
Expand Down Expand Up @@ -138,7 +138,7 @@ bool forceUseDefaultFont()
{
case KaraokeRulesetSetting.MainFont:
case KaraokeRulesetSetting.RubyFont:
case KaraokeRulesetSetting.RomajiFont:
case KaraokeRulesetSetting.RomanisationFont:
return config?.Get<bool>(KaraokeRulesetSetting.ForceUseDefaultFont) ?? false;

case KaraokeRulesetSetting.TranslateFont:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private void load(FontManager fontManager, IRenderer renderer, KaraokeRulesetCon
{
manager.Get<FontUsage>(KaraokeRulesetSetting.MainFont),
manager.Get<FontUsage>(KaraokeRulesetSetting.RubyFont),
manager.Get<FontUsage>(KaraokeRulesetSetting.RomajiFont),
manager.Get<FontUsage>(KaraokeRulesetSetting.RomanisationFont),
manager.Get<FontUsage>(KaraokeRulesetSetting.TranslateFont),
manager.Get<FontUsage>(KaraokeRulesetSetting.NoteFont),
};
Expand Down

0 comments on commit 389b385

Please sign in to comment.