Run actions on press (#31191)

I know UI generallys want to do stuff on key-up not key-down. With that being said the delay on release for these is noticeable.
e.g.
ActivateInWorld / UseInHand / any in-world interactions are on-press. This is especially noticeable if you have the same event on action + verb.
This commit is contained in:
metalgearsloth
2024-08-25 22:36:22 +10:00
committed by GitHub
parent c0a07614c0
commit 948bb726de

View File

@@ -121,7 +121,7 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
var boundKey = hotbarKeys[i];
builder = builder.Bind(boundKey, new PointerInputCmdHandler((in PointerInputCmdArgs args) =>
{
if (args.State != BoundKeyState.Up)
if (args.State != BoundKeyState.Down)
return false;
TriggerAction(boundId);