diff --git a/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Lyrics/LyricTimeTagsChangeHandlerTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Lyrics/LyricTimeTagsChangeHandlerTest.cs index 334d0b310..4374f0292 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Lyrics/LyricTimeTagsChangeHandlerTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Lyrics/LyricTimeTagsChangeHandlerTest.cs @@ -38,7 +38,7 @@ public void TestSetTimeTagTime() } [Test] - public void TestSetTimeTagInitialRomaji() + public void TestSetTimeTagFirstSyllable() { var timeTag = new TimeTag(new TextIndex(), 1000); PrepareHitObject(() => new Lyric @@ -50,7 +50,7 @@ public void TestSetTimeTagInitialRomaji() }, }); - TriggerHandlerChanged(c => c.SetTimeTagInitialRomaji(timeTag, true)); + TriggerHandlerChanged(c => c.SetTimeTagFirstSyllable(timeTag, true)); AssertSelectedHitObject(_ => { @@ -59,7 +59,7 @@ public void TestSetTimeTagInitialRomaji() } [Test] - public void TestSetTimeTagRomajiText() + public void TestSetTimeTagRomanizedSyllable() { var timeTag = new TimeTag(new TextIndex(), 1000); PrepareHitObject(() => new Lyric @@ -71,14 +71,14 @@ public void TestSetTimeTagRomajiText() }, }); - TriggerHandlerChanged(c => c.SetTimeTagRomajiText(timeTag, "karaoke")); + TriggerHandlerChanged(c => c.SetTimeTagRomanizedSyllable(timeTag, "karaoke")); AssertSelectedHitObject(_ => { Assert.AreEqual("karaoke", timeTag.RomanizedSyllable); }); - TriggerHandlerChanged(c => c.SetTimeTagRomajiText(timeTag, " ")); + TriggerHandlerChanged(c => c.SetTimeTagRomanizedSyllable(timeTag, " ")); AssertSelectedHitObject(_ => { diff --git a/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Lyrics/ILyricTimeTagsChangeHandler.cs b/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Lyrics/ILyricTimeTagsChangeHandler.cs index 1a83d1241..76b7f7ca0 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Lyrics/ILyricTimeTagsChangeHandler.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Lyrics/ILyricTimeTagsChangeHandler.cs @@ -11,9 +11,9 @@ public interface ILyricTimeTagsChangeHandler : ILyricListPropertyChangeHandler timeTags, double offset); diff --git a/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Lyrics/LyricTimeTagsChangeHandler.cs b/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Lyrics/LyricTimeTagsChangeHandler.cs index 7c8a0afaa..8b298ee39 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Lyrics/LyricTimeTagsChangeHandler.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Lyrics/LyricTimeTagsChangeHandler.cs @@ -27,7 +27,7 @@ public void SetTimeTagTime(TimeTag timeTag, double time) }); } - public void SetTimeTagInitialRomaji(TimeTag timeTag, bool initialRomaji) + public void SetTimeTagFirstSyllable(TimeTag timeTag, bool firstSyllable) { CheckExactlySelectedOneHitObject(); @@ -37,11 +37,11 @@ public void SetTimeTagInitialRomaji(TimeTag timeTag, bool initialRomaji) if (!containsInLyric) throw new InvalidOperationException($"{nameof(timeTag)} is not in the lyric"); - timeTag.FirstSyllable = initialRomaji; + timeTag.FirstSyllable = firstSyllable; }); } - public void SetTimeTagRomajiText(TimeTag timeTag, string romaji) + public void SetTimeTagRomanizedSyllable(TimeTag timeTag, string? romanizedSyllable) { CheckExactlySelectedOneHitObject(); @@ -51,9 +51,9 @@ public void SetTimeTagRomajiText(TimeTag timeTag, string romaji) if (!containsInLyric) throw new InvalidOperationException($"{nameof(timeTag)} is not in the lyric"); - timeTag.RomanizedSyllable = romaji; + timeTag.RomanizedSyllable = romanizedSyllable; - if (!string.IsNullOrWhiteSpace(romaji)) + if (!string.IsNullOrWhiteSpace(romanizedSyllable)) return; timeTag.RomanizedSyllable = string.Empty; diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Settings/Romaji/RomajiEditSection.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Settings/Romaji/RomajiEditSection.cs index d48191bbd..e66b401d0 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Settings/Romaji/RomajiEditSection.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Settings/Romaji/RomajiEditSection.cs @@ -101,7 +101,7 @@ protected override string GetFieldValue(TimeTag timeTag) => timeTag.RomanizedSyllable ?? string.Empty; protected override void ApplyValue(TimeTag timeTag, string value) - => lyricTimeTagsChangeHandler.SetTimeTagRomajiText(timeTag, value); + => lyricTimeTagsChangeHandler.SetTimeTagRomanizedSyllable(timeTag, value); [BackgroundDependencyLoader] private void load() @@ -124,7 +124,7 @@ protected override bool GetFieldValue(TimeTag timeTag) => timeTag.FirstSyllable; protected override void ApplyValue(TimeTag timeTag, bool value) - => lyricTimeTagsChangeHandler.SetTimeTagInitialRomaji(timeTag, value); + => lyricTimeTagsChangeHandler.SetTimeTagFirstSyllable(timeTag, value); [BackgroundDependencyLoader] private void load(IEditRomajiModeState editRomajiModeState)