Open PROP65 opened 4 months ago
Nice work! Looking good... Adding delta time to the renders will help too https://github.com/Immediate-Mode-UI/Nuklear/pull/628
I've reworked this patch to make the key repeat functionality more generic/reusable.
Most of the changes have been moved to nuklear_input.c
and a new function is provided (nk_input_is_key_fired
) to check the new boolean.
After submitting this pull request I realized some backends have key repeat via their abstraction layer (SDL, X11, etc) so this functionality is also now opt-in and can be enabled by defining NK_KEY_REPEAT before including Nuklear
...
#define NK_KEY_REPEAT
#include "nuklear.h"
...
Adds key repeat for nk_keys (Arrows, Home, End, Backspace, Delete, etc).
The default delay and interval can be changed, as well as updated at runtime.
Tested and working with the following render backends.
glfw_opengl2
glfw_opengl3
glfw_vulkan