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 fb0d7a69d..1953201d5 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 @@ -8,13 +8,11 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; -using osu.Framework.Graphics.Sprites; using osu.Game.Rulesets.Karaoke.Edit.Utils; using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.Compose.Toolbar; using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.Compose.Toolbar.Carets; using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.Compose.Toolbar.Panels; using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.Compose.Toolbar.Playback; -using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.Compose.Toolbar.TimeTags; using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.Compose.Toolbar.View; using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.States.Modes; using osuTK; @@ -152,11 +150,6 @@ static IEnumerable createItemsForTimeTagEditStep(TimeTagEditStep timeT new MoveToPreviousIndexButton(), new MoveToNextIndexButton(), new MoveToLastIndexButton(), - new Separator(), - new RemoveTimeTagButton(TextIndex.IndexState.Start), - new CreateTimeTagButton(TextIndex.IndexState.Start), - new CreateTimeTagButton(TextIndex.IndexState.End), - new RemoveTimeTagButton(TextIndex.IndexState.End), }, TimeTagEditStep.Recording => new Drawable[] { diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/Toolbar/TimeTags/CreateTimeTagButton.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/Toolbar/TimeTags/CreateTimeTagButton.cs deleted file mode 100644 index 1f69d4dc2..000000000 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/Toolbar/TimeTags/CreateTimeTagButton.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) andy840119 . Licensed under the GPL Licence. -// See the LICENCE file in the repository root for full licence text. - -using System; -using osu.Framework.Allocation; -using osu.Framework.Graphics.Sprites; -using osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Lyrics; -using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.CaretPosition; -using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.States; -using osu.Game.Rulesets.Karaoke.Utils; - -namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.Compose.Toolbar.TimeTags; - -public partial class CreateTimeTagButton : KeyActionButton -{ - protected override KaraokeEditAction EditAction - => TextIndexUtils.GetValueByState(indexState, KaraokeEditAction.CreateStartTimeTag, KaraokeEditAction.CreateEndTimeTag); - - [Resolved] - private ILyricCaretState lyricCaretState { get; set; } = null!; - - [Resolved] - private ILyricTimeTagsChangeHandler lyricTimeTagsChangeHandler { get; set; } = null!; - - private readonly TextIndex.IndexState indexState; - - public CreateTimeTagButton(TextIndex.IndexState indexState) - { - this.indexState = indexState; - - SetIcon(FontAwesome.Solid.Tag); - - Action = () => - { - if (lyricCaretState.CaretPosition is not CreateRemoveTimeTagCaretPosition charIndexCaretPosition) - throw new InvalidOperationException(); - - int index = charIndexCaretPosition.CharIndex; - lyricTimeTagsChangeHandler.AddByPosition(new TextIndex(index, this.indexState)); - }; - } -} diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/Toolbar/TimeTags/RemoveTimeTagButton.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/Toolbar/TimeTags/RemoveTimeTagButton.cs deleted file mode 100644 index 58a33fc7b..000000000 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/Toolbar/TimeTags/RemoveTimeTagButton.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) andy840119 . Licensed under the GPL Licence. -// See the LICENCE file in the repository root for full licence text. - -using System; -using osu.Framework.Allocation; -using osu.Framework.Graphics.Sprites; -using osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Lyrics; -using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.CaretPosition; -using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.States; -using osu.Game.Rulesets.Karaoke.Utils; - -namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.Compose.Toolbar.TimeTags; - -public partial class RemoveTimeTagButton : KeyActionButton -{ - protected override KaraokeEditAction EditAction - => TextIndexUtils.GetValueByState(indexState, KaraokeEditAction.RemoveStartTimeTag, KaraokeEditAction.RemoveEndTimeTag); - - [Resolved] - private ILyricCaretState lyricCaretState { get; set; } = null!; - - [Resolved] - private ILyricTimeTagsChangeHandler lyricTimeTagsChangeHandler { get; set; } = null!; - - private readonly TextIndex.IndexState indexState; - - public RemoveTimeTagButton(TextIndex.IndexState indexState) - { - this.indexState = indexState; - - SetIcon(FontAwesome.Solid.Eraser); - - Action = () => - { - if (lyricCaretState.CaretPosition is not CreateRemoveTimeTagCaretPosition charIndexCaretPosition) - throw new InvalidOperationException(); - - int index = charIndexCaretPosition.CharIndex; - lyricTimeTagsChangeHandler.RemoveByPosition(new TextIndex(index, this.indexState)); - }; - } -}