Skip to content

Commit

Permalink
Add config for the generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Jul 23, 2023
1 parent 4936fac commit 5eebc77
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using osu.Game.Rulesets.Karaoke.Edit.Generator.Lyrics.Language;
using osu.Game.Rulesets.Karaoke.Edit.Generator.Lyrics.Notes;
using osu.Game.Rulesets.Karaoke.Edit.Generator.Lyrics.ReferenceLyric;
using osu.Game.Rulesets.Karaoke.Edit.Generator.Lyrics.Romajies.Ja;
using osu.Game.Rulesets.Karaoke.Edit.Generator.Lyrics.RomajiTags.Ja;
using osu.Game.Rulesets.Karaoke.Edit.Generator.Lyrics.RubyTags.Ja;
using osu.Game.Rulesets.Karaoke.Edit.Generator.Lyrics.TimeTags.Ja;
Expand Down Expand Up @@ -54,6 +55,9 @@ protected override void InitialiseDefaults()
// Time tag generator
SetDefault<JaTimeTagGeneratorConfig>();
SetDefault<ZhTimeTagGeneratorConfig>();

// Romaji generator
SetDefault<JaRomajiGeneratorConfig>();
}

protected void SetDefault<T>() where T : GeneratorConfig, new()
Expand Down Expand Up @@ -81,6 +85,7 @@ protected static KaraokeRulesetEditGeneratorSetting GetSettingByType<TValue>() =
Type t when t == typeof(JaRubyTagGeneratorConfig) => KaraokeRulesetEditGeneratorSetting.JaRubyTagGeneratorConfig,
Type t when t == typeof(JaTimeTagGeneratorConfig) => KaraokeRulesetEditGeneratorSetting.JaTimeTagGeneratorConfig,
Type t when t == typeof(ZhTimeTagGeneratorConfig) => KaraokeRulesetEditGeneratorSetting.ZhTimeTagGeneratorConfig,
Type t when t == typeof(JaRomajiGeneratorConfig) => KaraokeRulesetEditGeneratorSetting.JaRomajiGeneratorConfig,
_ => throw new NotSupportedException(),
};

Expand Down Expand Up @@ -134,4 +139,7 @@ public enum KaraokeRulesetEditGeneratorSetting
// Time tag generator
JaTimeTagGeneratorConfig,
ZhTimeTagGeneratorConfig,

// Romaji generator.
JaRomajiGeneratorConfig,
}

0 comments on commit 5eebc77

Please sign in to comment.