Skip to content

Commit

Permalink
feat: support change language via set command
Browse files Browse the repository at this point in the history
  • Loading branch information
DemoJameson committed Sep 14, 2023
1 parent bfeca50 commit f9674dc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CelesteTAS-EverestInterop/Source/TAS/Input/Commands/SetCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,16 @@ private static bool SettingsSpecialCases(string settingName, object value) {
case "SFXVolume":
typeof(MenuOptions).InvokeMethod("SetSfx", value);
break;
case "Language":
string language = value.ToString();
if (settings.Language != language && Dialog.Languages.ContainsKey(language)) {
if (settings.Language != "english") {
Fonts.Unload(Dialog.Languages[Settings.Instance.Language].FontFace);
}
settings.Language = language;
settings.ApplyLanguage();
}
break;
default:
return false;
}
Expand Down

0 comments on commit f9674dc

Please sign in to comment.