1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 00:23:01 +08:00

Move type back next to exposing class

This commit is contained in:
Bartłomiej Dach 2023-10-12 19:27:19 +02:00
parent f1c1ffbdfd
commit f083309e64
No known key found for this signature in database
4 changed files with 11 additions and 19 deletions

View File

@ -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)))
}
};
}

View File

@ -1,15 +0,0 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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
{
/// <summary>
/// Contains information about the key binding conflict to be resolved.
/// </summary>
public record KeyBindingConflictInfo(ConflictingKeyBinding Existing, ConflictingKeyBinding New);
public record ConflictingKeyBinding(Guid ID, object Action, KeyCombination CombinationWhenChosen, KeyCombination CombinationWhenNotChosen);
}

View File

@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
{
public partial class KeyBindingConflictPopover : OsuPopover
{
public Bindable<KeyBindingConflictInfo> ConflictInfo { get; } = new Bindable<KeyBindingConflictInfo>();
public Bindable<KeyBindingRow.KeyBindingConflictInfo> ConflictInfo { get; } = new Bindable<KeyBindingRow.KeyBindingConflictInfo>();
public Action? BindingConflictResolved { get; init; }

View File

@ -539,6 +539,13 @@ namespace osu.Game.Overlays.Settings.Sections.Input
this.ShowPopover();
}
/// <summary>
/// Contains information about the key binding conflict to be resolved.
/// </summary>
public record KeyBindingConflictInfo(ConflictingKeyBinding Existing, ConflictingKeyBinding New);
public record ConflictingKeyBinding(Guid ID, object Action, KeyCombination CombinationWhenChosen, KeyCombination CombinationWhenNotChosen);
#endregion
private partial class CancelButton : RoundedButton