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