Restore MODIFIER_OVERRIDES handling of unmodified attack move hotkey.
This commit is contained in:
@@ -209,9 +209,6 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
var noShiftButtons = new[] { guardButton, deployButton, attackMoveButton };
|
var noShiftButtons = new[] { guardButton, deployButton, attackMoveButton };
|
||||||
keyOverrides.AddHandler(e =>
|
keyOverrides.AddHandler(e =>
|
||||||
{
|
{
|
||||||
if (e.Event != KeyInputEvent.Down)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// HACK: allow command buttons to be triggered if the shift (queue order modifier) key is held
|
// HACK: allow command buttons to be triggered if the shift (queue order modifier) key is held
|
||||||
if (e.Modifiers.HasModifier(Modifiers.Shift))
|
if (e.Modifiers.HasModifier(Modifiers.Shift))
|
||||||
{
|
{
|
||||||
@@ -228,18 +225,15 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// HACK: allow attack move to be triggered if the ctrl (assault move modifier)
|
// HACK: Attack move can be triggered if the ctrl (assault move modifier)
|
||||||
// or shift (queue order modifier) keys are pressed
|
// or shift (queue order modifier) keys are pressed, on both key down and key up
|
||||||
if (e.Modifiers.HasModifier(Modifiers.Ctrl))
|
var eNoMods = e;
|
||||||
{
|
eNoMods.Modifiers &= ~(Modifiers.Ctrl | Modifiers.Shift);
|
||||||
var eNoMods = e;
|
|
||||||
eNoMods.Modifiers &= ~(Modifiers.Ctrl | Modifiers.Shift);
|
|
||||||
|
|
||||||
if (attackMoveButton != null && !attackMoveDisabled && attackMoveButton.Key.IsActivatedBy(eNoMods))
|
if (attackMoveButton != null && !attackMoveDisabled && attackMoveButton.Key.IsActivatedBy(eNoMods))
|
||||||
{
|
{
|
||||||
attackMoveButton.OnKeyPress(e);
|
attackMoveButton.OnKeyPress(e);
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user