Action buttons are now usable in the action window. (#35642)
* Update ActionUIController.cs * renamed some inconsistent arguments. * removed a redundant check. * revert some variable renames to reduce the diff.
This commit is contained in:
@@ -632,8 +632,7 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
|
|||||||
if (args.Function != EngineKeyFunctions.UIClick && args.Function != EngineKeyFunctions.Use)
|
if (args.Function != EngineKeyFunctions.UIClick && args.Function != EngineKeyFunctions.Use)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_menuDragHelper.MouseDown(action);
|
HandleActionPressed(args, action);
|
||||||
args.Handle();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnWindowActionUnPressed(GUIBoundKeyEventArgs args, ActionButton dragged)
|
private void OnWindowActionUnPressed(GUIBoundKeyEventArgs args, ActionButton dragged)
|
||||||
@@ -641,8 +640,7 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
|
|||||||
if (args.Function != EngineKeyFunctions.UIClick && args.Function != EngineKeyFunctions.Use)
|
if (args.Function != EngineKeyFunctions.UIClick && args.Function != EngineKeyFunctions.Use)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DragAction();
|
HandleActionUnpressed(args, dragged);
|
||||||
args.Handle();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnWindowActionFocusExisted(ActionButton button)
|
private void OnWindowActionFocusExisted(ActionButton button)
|
||||||
@@ -662,6 +660,11 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
|
|||||||
if (args.Function != EngineKeyFunctions.UIClick)
|
if (args.Function != EngineKeyFunctions.UIClick)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
HandleActionPressed(args, button);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleActionPressed(GUIBoundKeyEventArgs args, ActionButton button)
|
||||||
|
{
|
||||||
args.Handle();
|
args.Handle();
|
||||||
if (button.ActionId != null)
|
if (button.ActionId != null)
|
||||||
{
|
{
|
||||||
@@ -677,7 +680,15 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
|
|||||||
|
|
||||||
private void OnActionUnpressed(GUIBoundKeyEventArgs args, ActionButton button)
|
private void OnActionUnpressed(GUIBoundKeyEventArgs args, ActionButton button)
|
||||||
{
|
{
|
||||||
if (args.Function != EngineKeyFunctions.UIClick || _actionsSystem == null)
|
if (args.Function != EngineKeyFunctions.UIClick)
|
||||||
|
return;
|
||||||
|
|
||||||
|
HandleActionUnpressed(args, button);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleActionUnpressed(GUIBoundKeyEventArgs args, ActionButton button)
|
||||||
|
{
|
||||||
|
if (_actionsSystem == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
args.Handle();
|
args.Handle();
|
||||||
|
|||||||
Reference in New Issue
Block a user