diff --git a/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Beatmap/Lyrics/States/BaseLyricCaretStateTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Beatmap/Lyrics/States/BaseLyricCaretStateTest.cs index 23f780ace..de820308a 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Beatmap/Lyrics/States/BaseLyricCaretStateTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Beatmap/Lyrics/States/BaseLyricCaretStateTest.cs @@ -221,8 +221,8 @@ private void updateModeWithEditStep() LyricEditorMode.Reference => null, LyricEditorMode.Language => throw new NotSupportedException(), LyricEditorMode.EditRuby => throw new NotSupportedException(), - LyricEditorMode.EditRomaji => throw new NotSupportedException(), LyricEditorMode.EditTimeTag => throw new NotSupportedException(), + LyricEditorMode.EditRomaji => throw new NotSupportedException(), LyricEditorMode.EditNote => throw new NotSupportedException(), LyricEditorMode.Singer => throw new NotSupportedException(), _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), diff --git a/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Beatmap/TestSceneLyricEditorScreen.cs b/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Beatmap/TestSceneLyricEditorScreen.cs index 9b8988223..0ba03fc94 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Beatmap/TestSceneLyricEditorScreen.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Beatmap/TestSceneLyricEditorScreen.cs @@ -80,17 +80,17 @@ public void TestEditRubyMode() } [Test] - public void TestEditRomajiMode() + public void TestEditTimeTagMode() { - switchToMode(LyricEditorMode.EditRomaji); - clickEditStepButtons(); + switchToMode(LyricEditorMode.EditTimeTag); + clickEditStepButtons(); } [Test] - public void TestEditTimeTagMode() + public void TestEditRomajiMode() { - switchToMode(LyricEditorMode.EditTimeTag); - clickEditStepButtons(); + switchToMode(LyricEditorMode.EditRomaji); + clickEditStepButtons(); } [Test] diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Components/Menus/LyricEditorModeMenu.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Components/Menus/LyricEditorModeMenu.cs index 30bffd119..b7d0bd2a1 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Components/Menus/LyricEditorModeMenu.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Components/Menus/LyricEditorModeMenu.cs @@ -22,8 +22,8 @@ public LyricEditorModeMenu(Bindable config, string text) LyricEditorMode.Reference, LyricEditorMode.Language, LyricEditorMode.EditRuby, - LyricEditorMode.EditRomaji, LyricEditorMode.EditTimeTag, + LyricEditorMode.EditRomaji, LyricEditorMode.EditNote, LyricEditorMode.Singer, }; diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/BlueprintLayer.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/BlueprintLayer.cs index a164c0f40..9cb41a9ce 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/BlueprintLayer.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/BlueprintLayer.cs @@ -65,8 +65,8 @@ protected void InitializeBlueprint() modeWithEditStep.Mode switch { LyricEditorMode.EditRuby => rubyTagEditMode == RubyTagEditMode.Create ? null : new RubyBlueprintContainer(lyric), - LyricEditorMode.EditRomaji => new RomajiBlueprintContainer(lyric), LyricEditorMode.EditTimeTag => modeWithEditStep.EditStep is TimeTagEditStep.Adjust ? new TimeTagBlueprintContainer(lyric) : null, + LyricEditorMode.EditRomaji => new RomajiBlueprintContainer(lyric), _ => null, }; } diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/InteractableLyric.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/InteractableLyric.cs index 11b1a6c5a..15c94af8f 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/InteractableLyric.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/InteractableLyric.cs @@ -101,8 +101,8 @@ private void triggerWritableVersionChanged() LyricEditorMode.Reference => HitObjectWritableUtils.GetLyricPropertyLockedBy(lyric, nameof(Objects.Lyric.ReferenceLyric), nameof(Objects.Lyric.ReferenceLyricConfig)), LyricEditorMode.Language => HitObjectWritableUtils.GetLyricPropertyLockedBy(lyric, nameof(Objects.Lyric.Language)), LyricEditorMode.EditRuby => HitObjectWritableUtils.GetLyricPropertyLockedBy(lyric, nameof(Objects.Lyric.RubyTags)), - LyricEditorMode.EditRomaji => HitObjectWritableUtils.GetLyricPropertyLockedBy(lyric, nameof(Objects.Lyric.RomajiTags)), LyricEditorMode.EditTimeTag => HitObjectWritableUtils.GetLyricPropertyLockedBy(lyric, nameof(Objects.Lyric.TimeTags)), + LyricEditorMode.EditRomaji => HitObjectWritableUtils.GetLyricPropertyLockedBy(lyric, nameof(Objects.Lyric.RomajiTags)), LyricEditorMode.EditNote => HitObjectWritableUtils.GetCreateOrRemoveNoteLockedBy(lyric), LyricEditorMode.Singer => HitObjectWritableUtils.GetLyricPropertyLockedBy(lyric, nameof(Objects.Lyric.SingerIds)), _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/SpecialActionToolbar.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/SpecialActionToolbar.cs index 3668015be..ce69991d1 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/SpecialActionToolbar.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/SpecialActionToolbar.cs @@ -114,8 +114,8 @@ private static IEnumerable createItemForEditMode(EditorModeWithEditSte LyricEditorMode.Reference => Array.Empty(), LyricEditorMode.Language => Array.Empty(), LyricEditorMode.EditRuby => Array.Empty(), - LyricEditorMode.EditRomaji => Array.Empty(), LyricEditorMode.EditTimeTag => createItemsForTimeTagEditStep(editorModeWithEditStep.GetEditStep()), + LyricEditorMode.EditRomaji => Array.Empty(), LyricEditorMode.EditNote => createItemsForNoteEditStep(editorModeWithEditStep.GetEditStep()), LyricEditorMode.Singer => Array.Empty(), _ => throw new ArgumentOutOfRangeException(), diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/IssueNavigator.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/IssueNavigator.cs index af5b43dc9..8a09a60e9 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/IssueNavigator.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/IssueNavigator.cs @@ -27,10 +27,10 @@ public partial class IssueNavigator : Component, IIssueNavigator private IEditRubyModeState editRubyModeState { get; set; } = null!; [Resolved] - private IEditRomajiModeState editRomajiModeState { get; set; } = null!; + private ITimeTagModeState timeTagModeState { get; set; } = null!; [Resolved] - private ITimeTagModeState timeTagModeState { get; set; } = null!; + private IEditRomajiModeState editRomajiModeState { get; set; } = null!; [Resolved] private IEditNoteModeState noteModeState { get; set; } = null!; @@ -85,12 +85,12 @@ public void Navigate(Issue issue) case CheckLyricRubyTag: return LyricEditorMode.EditRuby; - case CheckLyricRomajiTag: - return LyricEditorMode.EditRomaji; - case CheckLyricTimeTag: return LyricEditorMode.EditTimeTag; + case CheckLyricRomajiTag: + return LyricEditorMode.EditRomaji; + case CheckNoteReferenceLyric: case CheckNoteText: return LyricEditorMode.EditNote; diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditor.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditor.cs index b5846e759..7b59670e3 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditor.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditor.cs @@ -53,12 +53,12 @@ public partial class LyricEditor : Container, ILyricEditorState, IKeyBindingHand [Cached(typeof(IEditRubyModeState))] private readonly EditRubyModeState editRubyModeState; - [Cached(typeof(IEditRomajiModeState))] - private readonly EditRomajiModeState editRomajiModeState; - [Cached(typeof(ITimeTagModeState))] private readonly TimeTagModeState timeTagModeState; + [Cached(typeof(IEditRomajiModeState))] + private readonly EditRomajiModeState editRomajiModeState; + [Cached(typeof(IEditNoteModeState))] private readonly EditNoteModeState editNoteModeState; @@ -103,8 +103,8 @@ public LyricEditor() AddInternal(editReferenceLyricModeState = new EditReferenceLyricModeState()); AddInternal(languageModeState = new LanguageModeState()); AddInternal(editRubyModeState = new EditRubyModeState()); - AddInternal(editRomajiModeState = new EditRomajiModeState()); AddInternal(timeTagModeState = new TimeTagModeState()); + AddInternal(editRomajiModeState = new EditRomajiModeState()); AddInternal(editNoteModeState = new EditNoteModeState()); // Separated feature. @@ -207,8 +207,8 @@ private void updateModeWithEditStep() LyricEditorMode.Reference => editReferenceLyricModeState.BindableEditStep.Value, LyricEditorMode.Language => languageModeState.BindableEditStep.Value, LyricEditorMode.EditRuby => editRubyModeState.BindableEditStep.Value, - LyricEditorMode.EditRomaji => editRomajiModeState.BindableEditStep.Value, LyricEditorMode.EditTimeTag => timeTagModeState.BindableEditStep.Value, + LyricEditorMode.EditRomaji => editRomajiModeState.BindableEditStep.Value, LyricEditorMode.EditNote => editNoteModeState.BindableEditStep.Value, LyricEditorMode.Singer => null, _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), @@ -258,8 +258,8 @@ private void initializeSettingsArea() LyricEditorMode.Reference => new ReferenceSettings(), LyricEditorMode.Language => new LanguageSettings(), LyricEditorMode.EditRuby => new RubyTagSettings(), - LyricEditorMode.EditRomaji => new RomajiTagSettings(), LyricEditorMode.EditTimeTag => new TimeTagSettings(), + LyricEditorMode.EditRomaji => new RomajiTagSettings(), LyricEditorMode.EditNote => new NoteSettings(), LyricEditorMode.Singer => new SingerSettings(), _ => null, @@ -293,8 +293,8 @@ static LyricEditorLayout getSupportedLayout(LyricEditorMode mode) => LyricEditorMode.Reference => LyricEditorLayout.Preview | LyricEditorLayout.Detail, LyricEditorMode.Language => LyricEditorLayout.Preview | LyricEditorLayout.Detail, LyricEditorMode.EditRuby => LyricEditorLayout.Preview | LyricEditorLayout.Detail, - LyricEditorMode.EditRomaji => LyricEditorLayout.Preview | LyricEditorLayout.Detail, LyricEditorMode.EditTimeTag => LyricEditorLayout.Detail, + LyricEditorMode.EditRomaji => LyricEditorLayout.Preview | LyricEditorLayout.Detail, LyricEditorMode.EditNote => LyricEditorLayout.Detail, LyricEditorMode.Singer => LyricEditorLayout.Preview, _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorClipboard.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorClipboard.cs index f4de91cb4..63a309d7b 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorClipboard.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorClipboard.cs @@ -42,10 +42,10 @@ public partial class LyricEditorClipboard : Component, ILyricEditorClipboard private IEditRubyModeState editRubyModeState { get; set; } = null!; [Resolved] - private IEditRomajiModeState editRomajiModeState { get; set; } = null!; + private ITimeTagModeState timeTagModeState { get; set; } = null!; [Resolved] - private ITimeTagModeState timeTagModeState { get; set; } = null!; + private IEditRomajiModeState editRomajiModeState { get; set; } = null!; [Resolved] private ILyricsChangeHandler? lyricsChangeHandler { get; set; } @@ -187,17 +187,6 @@ private bool performCut() lyricRubyTagsChangeHandler.RemoveRange(rubies); return true; - case LyricEditorMode.EditRomaji: - var romajies = editRomajiModeState.SelectedItems; - if (!romajies.Any()) - return false; - - if (lyricRomajiTagsChangeHandler == null) - throw new NullDependencyException($"Missing {nameof(lyricRomajiTagsChangeHandler)}"); - - lyricRomajiTagsChangeHandler.RemoveRange(romajies); - return true; - case LyricEditorMode.EditTimeTag: var timeTags = timeTagModeState.SelectedItems; if (!timeTags.Any()) @@ -209,6 +198,17 @@ private bool performCut() lyricTimeTagsChangeHandler.RemoveRange(timeTags); return true; + case LyricEditorMode.EditRomaji: + var romajies = editRomajiModeState.SelectedItems; + if (!romajies.Any()) + return false; + + if (lyricRomajiTagsChangeHandler == null) + throw new NullDependencyException($"Missing {nameof(lyricRomajiTagsChangeHandler)}"); + + lyricRomajiTagsChangeHandler.RemoveRange(romajies); + return true; + case LyricEditorMode.EditNote: return false; @@ -270,15 +270,6 @@ private bool performCopy(Lyric lyric) copyObjectToClipboard(rubies); return true; - case LyricEditorMode.EditRomaji: - var romajies = editRomajiModeState.SelectedItems; - if (!romajies.Any()) - return false; - - saveObjectToTheClipboardContent(romajies); - copyObjectToClipboard(romajies); - return true; - case LyricEditorMode.EditTimeTag: var timeTags = timeTagModeState.SelectedItems; if (!timeTags.Any()) @@ -288,6 +279,15 @@ private bool performCopy(Lyric lyric) copyObjectToClipboard(timeTags); return true; + case LyricEditorMode.EditRomaji: + var romajies = editRomajiModeState.SelectedItems; + if (!romajies.Any()) + return false; + + saveObjectToTheClipboardContent(romajies); + copyObjectToClipboard(romajies); + return true; + case LyricEditorMode.EditNote: return false; @@ -360,17 +360,6 @@ private bool performPaste(Lyric lyric) lyricRubyTagsChangeHandler.AddRange(pasteRubies); return true; - case LyricEditorMode.EditRomaji: - var pasteRomajies = getObjectFromClipboardContent(); - if (pasteRomajies == null) - return false; - - if (lyricRomajiTagsChangeHandler == null) - throw new NullDependencyException($"Missing {nameof(lyricRomajiTagsChangeHandler)}"); - - lyricRomajiTagsChangeHandler.AddRange(pasteRomajies); - return true; - case LyricEditorMode.EditTimeTag: var pasteTimeTags = getObjectFromClipboardContent(); if (pasteTimeTags == null) @@ -382,6 +371,17 @@ private bool performPaste(Lyric lyric) lyricTimeTagsChangeHandler.AddRange(pasteTimeTags); return true; + case LyricEditorMode.EditRomaji: + var pasteRomajies = getObjectFromClipboardContent(); + if (pasteRomajies == null) + return false; + + if (lyricRomajiTagsChangeHandler == null) + throw new NullDependencyException($"Missing {nameof(lyricRomajiTagsChangeHandler)}"); + + lyricRomajiTagsChangeHandler.AddRange(pasteRomajies); + return true; + case LyricEditorMode.EditNote: return false; diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorColourProvider.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorColourProvider.cs index 79d11d860..67f78f154 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorColourProvider.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorColourProvider.cs @@ -50,10 +50,10 @@ private static float getBaseHue(LyricEditorMode mode) case LyricEditorMode.Language: case LyricEditorMode.EditRuby: - case LyricEditorMode.EditRomaji: return 333 / 360f; // pink case LyricEditorMode.EditTimeTag: + case LyricEditorMode.EditRomaji: return 45 / 360f; // orange case LyricEditorMode.EditNote: diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorMode.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorMode.cs index a08ceccef..bf4ef7edd 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorMode.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorMode.cs @@ -38,18 +38,18 @@ public enum LyricEditorMode [Description("Edit ruby")] EditRuby, - /// - /// Able to create/delete romaji. - /// - [Description("Edit romaji")] - EditRomaji, - /// /// Enable to create/delete and reset time tag. /// [Description("Edit time tag")] EditTimeTag, + /// + /// Able to edit the romaji from the time-tag. + /// + [Description("Edit romaji")] + EditRomaji, + /// /// Enable to create/delete notes. /// diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorVerifier.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorVerifier.cs index 29e1b6a6f..fa03103dd 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorVerifier.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorVerifier.cs @@ -35,8 +35,8 @@ protected override IEnumerable CreateChecks(LyricEditorMode type) => LyricEditorMode.Reference => new ICheck[] { new CheckLyricReferenceLyric() }, LyricEditorMode.Language => new ICheck[] { new CheckLyricLanguage() }, LyricEditorMode.EditRuby => new ICheck[] { new CheckLyricRubyTag() }, - LyricEditorMode.EditRomaji => new ICheck[] { new CheckLyricRomajiTag() }, LyricEditorMode.EditTimeTag => new ICheck[] { new CheckLyricTimeTag() }, + LyricEditorMode.EditRomaji => new ICheck[] { new CheckLyricRomajiTag() }, LyricEditorMode.EditNote => new ICheck[] { new CheckNoteReferenceLyric(), new CheckNoteText(), new CheckNoteTime() }, LyricEditorMode.Singer => Array.Empty(), _ => throw new ArgumentOutOfRangeException(nameof(type), type, null), diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricList/Rows/Info/InfoControl.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricList/Rows/Info/InfoControl.cs index a9c10a5be..026f9c458 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricList/Rows/Info/InfoControl.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricList/Rows/Info/InfoControl.cs @@ -185,12 +185,14 @@ private void initializeBadge(EditorModeWithEditStep editorMode) return new LanguageInfo(Lyric); case LyricEditorMode.EditRuby: - case LyricEditorMode.EditRomaji: return new LanguageInfo(Lyric); case LyricEditorMode.EditTimeTag: return createTimeTagModeSubInfo(editorMode.GetEditStep(), Lyric); + case LyricEditorMode.EditRomaji: + return new LanguageInfo(Lyric); + case LyricEditorMode.EditNote: return null; diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/States/LyricCaretState.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/States/LyricCaretState.cs index d7aaffaa4..b2ccccfa3 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/States/LyricCaretState.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/States/LyricCaretState.cs @@ -143,8 +143,8 @@ private void refreshAlgorithmAndCaretPosition() LyricEditorMode.Reference => new NavigateCaretPositionAlgorithm(lyrics), LyricEditorMode.Language => new ClickingCaretPositionAlgorithm(lyrics), LyricEditorMode.EditRuby => getRubyTagModeAlgorithm(), - LyricEditorMode.EditRomaji => new NavigateCaretPositionAlgorithm(lyrics), LyricEditorMode.EditTimeTag => getTimeTagModeAlgorithm(editorModeWithEditStep.GetEditStep()), + LyricEditorMode.EditRomaji => new NavigateCaretPositionAlgorithm(lyrics), LyricEditorMode.EditNote => new NavigateCaretPositionAlgorithm(lyrics), LyricEditorMode.Singer => new NavigateCaretPositionAlgorithm(lyrics), _ => throw new InvalidOperationException(nameof(mode)),