vurtun / nuklear

A single-header ANSI C gui library
13.66k stars 1.11k forks source link

How to know if a edit_string is active or not ? #939

Closed NiiRoZz closed 4 years ago

NiiRoZz commented 4 years ago

Hello,

Currently writing UI with nuklear, and I want to know if it's possible to know if the current edit_string is active, because I want to know if he use a key, this will write into the input, just to block game input when writing into my chat.

NiiRoZz commented 4 years ago

Found how to do it, place this code if anyone wanted to know :

nk_flags event = nk_edit_string(ctx, NK_EDIT_FIELD, buffer, &len, 256, 0);
if (event & NK_EDIT_ACTIVE) {
   ...
}