diff --git a/osu.Game.Rulesets.Karaoke/Edit/Blueprints/Notes/NoteSelectionBlueprint.cs b/osu.Game.Rulesets.Karaoke/Edit/Blueprints/Notes/NoteSelectionBlueprint.cs index fb9feb615..20d0154b0 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/Blueprints/Notes/NoteSelectionBlueprint.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/Blueprints/Notes/NoteSelectionBlueprint.cs @@ -2,15 +2,12 @@ // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; -using osu.Framework.Extensions; using osu.Framework.Graphics; -using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.UserInterface; using osu.Framework.Input.Events; using osu.Game.Graphics.UserInterface; using osu.Game.Rulesets.Karaoke.Edit.Blueprints.Notes.Components; using osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Notes; -using osu.Game.Rulesets.Karaoke.Edit.Components.UserInterfaceV2; using osu.Game.Rulesets.Karaoke.Objects; using osu.Game.Rulesets.Karaoke.UI; using osu.Game.Rulesets.Karaoke.UI.Position; @@ -20,7 +17,7 @@ namespace osu.Game.Rulesets.Karaoke.Edit.Blueprints.Notes; -public partial class NoteSelectionBlueprint : KaraokeSelectionBlueprint, IHasPopover +public partial class NoteSelectionBlueprint : KaraokeSelectionBlueprint { [Resolved] private INotesChangeHandler notesChangeHandler { get; set; } = null!; @@ -72,15 +69,12 @@ protected override void Update() new OsuMenuItem("Split", MenuItemType.Destructive, () => notesChangeHandler.Split()), }; - public Popover GetPopover() => new NoteEditPopover(HitObject); - protected override bool OnClick(ClickEvent e) { // should only select current note before open the popover because note change handler will change property in all selected notes. beatmap.SelectedHitObjects.Clear(); beatmap.SelectedHitObjects.Add(HitObject); - this.ShowPopover(); return base.OnClick(e); } } diff --git a/osu.Game.Rulesets.Karaoke/Edit/Components/UserInterfaceV2/NoteEditPopover.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/BottomEditor/Notes/NoteEditPopover.cs similarity index 85% rename from osu.Game.Rulesets.Karaoke/Edit/Components/UserInterfaceV2/NoteEditPopover.cs rename to osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/BottomEditor/Notes/NoteEditPopover.cs index e9d80e121..9aafaf1bc 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/Components/UserInterfaceV2/NoteEditPopover.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/BottomEditor/Notes/NoteEditPopover.cs @@ -8,12 +8,11 @@ using osu.Framework.Localisation; using osu.Game.Graphics.Containers; using osu.Game.Graphics.UserInterfaceV2; -using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Notes; using osu.Game.Rulesets.Karaoke.Edit.Components.Containers; using osu.Game.Rulesets.Karaoke.Objects; -namespace osu.Game.Rulesets.Karaoke.Edit.Components.UserInterfaceV2; +namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.Compose.BottomEditor.Notes; public partial class NoteEditPopover : OsuPopover { @@ -40,6 +39,7 @@ public NoteEditPopover(Note note) private partial class NoteSection : Section { + [Resolved] private INotePropertyChangeHandler notePropertyChangeHandler { get; set; } = null!; protected override LocalisableString Title => "Note property"; @@ -102,13 +102,5 @@ public NoteSection(Note note) notePropertyChangeHandler.ChangeDisplayState(v.NewValue); }); } - - [BackgroundDependencyLoader] - private void load(HitObjectComposer composer) - { - // todo: not a good way to get change handler, might remove or found another way eventually. - // cannot get change handler directly in editor screen, so should trying to get from karaoke hit object composer. - notePropertyChangeHandler = composer.Dependencies.Get(); - } } } diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/BottomEditor/Notes/NoteEditorSelectionBlueprint.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/BottomEditor/Notes/NoteEditorSelectionBlueprint.cs index e76733a1e..479030c27 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/BottomEditor/Notes/NoteEditorSelectionBlueprint.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Compose/BottomEditor/Notes/NoteEditorSelectionBlueprint.cs @@ -14,7 +14,6 @@ using osu.Game.Rulesets.Karaoke.Edit.Blueprints.Notes; using osu.Game.Rulesets.Karaoke.Edit.Blueprints.Notes.Components; using osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Notes; -using osu.Game.Rulesets.Karaoke.Edit.Components.UserInterfaceV2; using osu.Game.Rulesets.Karaoke.Objects; using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.States.Modes; using osu.Game.Rulesets.Karaoke.UI.Position;