1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 23:27:25 +08:00

Change matching mode for global actions to better discern similar binds

This commit is contained in:
Dean Herbert 2020-03-02 18:54:00 +09:00
parent b9fef4f715
commit ee73f3e2b2
2 changed files with 4 additions and 2 deletions

View File

@ -31,8 +31,9 @@ namespace osu.Game.Input.Bindings
/// <param name="ruleset">A reference to identify the current <see cref="Ruleset"/>. Used to lookup mappings. Null for global mappings.</param>
/// <param name="variant">An optional variant for the specified <see cref="Ruleset"/>. Used when a ruleset has more than one possible keyboard layouts.</param>
/// <param name="simultaneousMode">Specify how to deal with multiple matches of <see cref="KeyCombination"/>s and <typeparamref name="T"/>s.</param>
public DatabasedKeyBindingContainer(RulesetInfo ruleset = null, int? variant = null, SimultaneousBindingMode simultaneousMode = SimultaneousBindingMode.None)
: base(simultaneousMode)
/// <param name="matchingMode">Specify how to deal with exact <see cref="KeyCombination"/> matches.</param>
public DatabasedKeyBindingContainer(RulesetInfo ruleset = null, int? variant = null, SimultaneousBindingMode simultaneousMode = SimultaneousBindingMode.None, KeyCombinationMatchingMode matchingMode = KeyCombinationMatchingMode.Any)
: base(simultaneousMode, matchingMode)
{
this.ruleset = ruleset;
this.variant = variant;

View File

@ -15,6 +15,7 @@ namespace osu.Game.Input.Bindings
private readonly Drawable handler;
public GlobalActionContainer(OsuGameBase game)
: base(matchingMode: KeyCombinationMatchingMode.Modifiers)
{
if (game is IKeyBindingHandler<GlobalAction>)
handler = game;