Fixed #582 nk_edit_buffer behavior
Fixed bug in nk_edit_buffer that prevents input after activating the widget. It was caused but not correctly setting an internal flag for input.
This commit is contained in:
parent
b2b08061c7
commit
b6e0e34c9c
@ -11,6 +11,7 @@
|
||||
|
||||
Changes:
|
||||
--------
|
||||
- 2017/12/23 (2.00.7) - Fixed nk_edit_buffer behavior if activated to allow input
|
||||
- 2017/12/23 (2.00.7) - Fixed modifyable progressbar dragging visuals and input behavior
|
||||
- 2017/12/04 (2.00.6) - Added formated string tooltip widget
|
||||
- 2017/11/18 (2.00.5) - Fixed window becoming hidden with flag NK_WINDOW_NO_INPUT
|
||||
|
10
nuklear.h
10
nuklear.h
@ -15530,8 +15530,6 @@ nk_do_edit(nk_flags *state, struct nk_command_buffer *out,
|
||||
const enum nk_text_edit_type type = (flags & NK_EDIT_MULTILINE) ?
|
||||
NK_TEXT_EDIT_MULTI_LINE: NK_TEXT_EDIT_SINGLE_LINE;
|
||||
nk_textedit_clear_state(edit, type, filter);
|
||||
if (flags & NK_EDIT_ALWAYS_INSERT_MODE)
|
||||
edit->mode = NK_TEXT_EDIT_MODE_INSERT;
|
||||
if (flags & NK_EDIT_AUTO_SELECT)
|
||||
select_all = nk_true;
|
||||
if (flags & NK_EDIT_GOTO_END_ON_ACTIVATE) {
|
||||
@ -15541,6 +15539,8 @@ nk_do_edit(nk_flags *state, struct nk_command_buffer *out,
|
||||
} else if (!edit->active) edit->mode = NK_TEXT_EDIT_MODE_VIEW;
|
||||
if (flags & NK_EDIT_READ_ONLY)
|
||||
edit->mode = NK_TEXT_EDIT_MODE_VIEW;
|
||||
else if (flags & NK_EDIT_ALWAYS_INSERT_MODE)
|
||||
edit->mode = NK_TEXT_EDIT_MODE_INSERT;
|
||||
|
||||
ret = (edit->active) ? NK_EDIT_ACTIVE: NK_EDIT_INACTIVE;
|
||||
if (prev_state != edit->active)
|
||||
@ -21324,8 +21324,7 @@ nk_edit_string(struct nk_context *ctx, nk_flags flags,
|
||||
win->edit.mode = edit->mode;
|
||||
win->edit.scrollbar.x = (nk_uint)edit->scrollbar.x;
|
||||
win->edit.scrollbar.y = (nk_uint)edit->scrollbar.y;
|
||||
}
|
||||
return state;
|
||||
} return state;
|
||||
}
|
||||
|
||||
NK_API nk_flags
|
||||
@ -21387,8 +21386,7 @@ nk_edit_buffer(struct nk_context *ctx, nk_flags flags,
|
||||
} else if (prev_state && !edit->active) {
|
||||
/* current edit is now cold */
|
||||
win->edit.active = nk_false;
|
||||
}
|
||||
return ret_flags;
|
||||
} return ret_flags;
|
||||
}
|
||||
|
||||
NK_API nk_flags
|
||||
|
Loading…
x
Reference in New Issue
Block a user