diff --git a/osu.Game.Tests/Visual/Settings/TestSceneKeyBindingConflictPopover.cs b/osu.Game.Tests/Visual/Settings/TestSceneKeyBindingConflictPopover.cs index 7251350616..da5a9dd513 100644 --- a/osu.Game.Tests/Visual/Settings/TestSceneKeyBindingConflictPopover.cs +++ b/osu.Game.Tests/Visual/Settings/TestSceneKeyBindingConflictPopover.cs @@ -56,9 +56,9 @@ namespace osu.Game.Tests.Visual.Settings { ConflictInfo = { - Value = new KeyBindingConflictInfo( - new ConflictingKeyBinding(Guid.NewGuid(), OsuAction.LeftButton, KeyCombination.FromKey(Key.X), new KeyCombination(InputKey.None)), - new ConflictingKeyBinding(Guid.NewGuid(), OsuAction.RightButton, KeyCombination.FromKey(Key.Z), KeyCombination.FromKey(Key.X))) + Value = new KeyBindingRow.KeyBindingConflictInfo( + new KeyBindingRow.ConflictingKeyBinding(Guid.NewGuid(), OsuAction.LeftButton, KeyCombination.FromKey(Key.X), new KeyCombination(InputKey.None)), + new KeyBindingRow.ConflictingKeyBinding(Guid.NewGuid(), OsuAction.RightButton, KeyCombination.FromKey(Key.Z), KeyCombination.FromKey(Key.X))) } }; } diff --git a/osu.Game/Overlays/Settings/Sections/Input/KeyBindingConflictInfo.cs b/osu.Game/Overlays/Settings/Sections/Input/KeyBindingConflictInfo.cs deleted file mode 100644 index ea127456af..0000000000 --- a/osu.Game/Overlays/Settings/Sections/Input/KeyBindingConflictInfo.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using System; -using osu.Framework.Input.Bindings; - -namespace osu.Game.Overlays.Settings.Sections.Input -{ - /// - /// Contains information about the key binding conflict to be resolved. - /// - public record KeyBindingConflictInfo(ConflictingKeyBinding Existing, ConflictingKeyBinding New); - - public record ConflictingKeyBinding(Guid ID, object Action, KeyCombination CombinationWhenChosen, KeyCombination CombinationWhenNotChosen); -} diff --git a/osu.Game/Overlays/Settings/Sections/Input/KeyBindingConflictPopover.cs b/osu.Game/Overlays/Settings/Sections/Input/KeyBindingConflictPopover.cs index 8f836bd9c6..a7e871d508 100644 --- a/osu.Game/Overlays/Settings/Sections/Input/KeyBindingConflictPopover.cs +++ b/osu.Game/Overlays/Settings/Sections/Input/KeyBindingConflictPopover.cs @@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input { public partial class KeyBindingConflictPopover : OsuPopover { - public Bindable ConflictInfo { get; } = new Bindable(); + public Bindable ConflictInfo { get; } = new Bindable(); public Action? BindingConflictResolved { get; init; } diff --git a/osu.Game/Overlays/Settings/Sections/Input/KeyBindingRow.cs b/osu.Game/Overlays/Settings/Sections/Input/KeyBindingRow.cs index ef54cecf0a..8c645996c8 100644 --- a/osu.Game/Overlays/Settings/Sections/Input/KeyBindingRow.cs +++ b/osu.Game/Overlays/Settings/Sections/Input/KeyBindingRow.cs @@ -539,6 +539,13 @@ namespace osu.Game.Overlays.Settings.Sections.Input this.ShowPopover(); } + /// + /// Contains information about the key binding conflict to be resolved. + /// + public record KeyBindingConflictInfo(ConflictingKeyBinding Existing, ConflictingKeyBinding New); + + public record ConflictingKeyBinding(Guid ID, object Action, KeyCombination CombinationWhenChosen, KeyCombination CombinationWhenNotChosen); + #endregion private partial class CancelButton : RoundedButton