Closed phalasz closed 8 months ago
I'll take a closer look tomorrow, but I think it looks good. I would like to mention that the duration is in frames, as it may not be obvious unless you're expecting it to have the same API as inpututil.
Sure, no worries. Let me know if changes are needed or if there are improvements that should be made.
We may want to add something that uses this feature in the examples though. It could be a new example or some extension to an already existing example.
Add key press duration to the
PressedActionInfo
's EventInfo. Resolves quasilyte/ebitengine-input#32I've included an internal
minOf
implementation. This can be removed if the required go version can be bumped to 1.21.0+ which has a built-inmin
function with variadic parameter support.