diff --git a/demo/common/overview.c b/demo/common/overview.c index 80801aea..e90a2a9a 100644 --- a/demo/common/overview.c +++ b/demo/common/overview.c @@ -640,7 +640,7 @@ overview(struct nk_context *ctx) nk_layout_row(ctx, NK_STATIC, 25, 2, ratio); active = nk_edit_string(ctx, NK_EDIT_FIELD|NK_EDIT_SIG_ENTER, text[7], &text_len[7], 64, nk_filter_ascii); if (nk_button_label(ctx, "Submit") || - (active & NK_EDIT_COMMITED)) + (active & NK_EDIT_COMMITTED)) { text[7][text_len[7]] = '\n'; text_len[7]++; diff --git a/nuklear.h b/nuklear.h index 7a3625a7..955e6ee8 100644 --- a/nuklear.h +++ b/nuklear.h @@ -3762,8 +3762,11 @@ enum nk_edit_events { NK_EDIT_INACTIVE = NK_FLAG(1), /**!< edit widget is not active and is not being modified */ NK_EDIT_ACTIVATED = NK_FLAG(2), /**!< edit widget went from state inactive to state active */ NK_EDIT_DEACTIVATED = NK_FLAG(3), /**!< edit widget went from state active to state inactive */ - NK_EDIT_COMMITED = NK_FLAG(4) /**!< edit widget has received an enter and lost focus */ + NK_EDIT_COMMITTED = NK_FLAG(4) /**!< edit widget has received an enter and lost focus */ }; + +#define NK_EDIT_COMMITED NK_EDIT_COMMITTED + NK_API nk_flags nk_edit_string(struct nk_context*, nk_flags, char *buffer, int *len, int max, nk_plugin_filter); NK_API nk_flags nk_edit_string_zero_terminated(struct nk_context*, nk_flags, char *buffer, int max, nk_plugin_filter); NK_API nk_flags nk_edit_buffer(struct nk_context*, nk_flags, struct nk_text_edit*, nk_plugin_filter); @@ -28189,7 +28192,7 @@ nk_do_edit(nk_flags *state, struct nk_command_buffer *out, if (flags & NK_EDIT_CTRL_ENTER_NEWLINE && shift_mod) nk_textedit_text(edit, "\n", 1); else if (flags & NK_EDIT_SIG_ENTER) - ret |= NK_EDIT_COMMITED; + ret |= NK_EDIT_COMMITTED; else nk_textedit_text(edit, "\n", 1); } diff --git a/src/nuklear.h b/src/nuklear.h index 1312f648..8f2f8b61 100644 --- a/src/nuklear.h +++ b/src/nuklear.h @@ -3539,8 +3539,11 @@ enum nk_edit_events { NK_EDIT_INACTIVE = NK_FLAG(1), /**!< edit widget is not active and is not being modified */ NK_EDIT_ACTIVATED = NK_FLAG(2), /**!< edit widget went from state inactive to state active */ NK_EDIT_DEACTIVATED = NK_FLAG(3), /**!< edit widget went from state active to state inactive */ - NK_EDIT_COMMITED = NK_FLAG(4) /**!< edit widget has received an enter and lost focus */ + NK_EDIT_COMMITTED = NK_FLAG(4) /**!< edit widget has received an enter and lost focus */ }; + +#define NK_EDIT_COMMITED NK_EDIT_COMMITTED + NK_API nk_flags nk_edit_string(struct nk_context*, nk_flags, char *buffer, int *len, int max, nk_plugin_filter); NK_API nk_flags nk_edit_string_zero_terminated(struct nk_context*, nk_flags, char *buffer, int max, nk_plugin_filter); NK_API nk_flags nk_edit_buffer(struct nk_context*, nk_flags, struct nk_text_edit*, nk_plugin_filter); diff --git a/src/nuklear_edit.c b/src/nuklear_edit.c index ae5daed0..ed0ae1ad 100644 --- a/src/nuklear_edit.c +++ b/src/nuklear_edit.c @@ -269,7 +269,7 @@ nk_do_edit(nk_flags *state, struct nk_command_buffer *out, if (flags & NK_EDIT_CTRL_ENTER_NEWLINE && shift_mod) nk_textedit_text(edit, "\n", 1); else if (flags & NK_EDIT_SIG_ENTER) - ret |= NK_EDIT_COMMITED; + ret |= NK_EDIT_COMMITTED; else nk_textedit_text(edit, "\n", 1); }