@@ -4933,6 +4933,7 @@ NK_API nk_bool nk_input_is_mouse_click_down_in_rect(const struct nk_input *i, en
49334933NK_API nk_bool nk_input_any_mouse_click_in_rect(const struct nk_input*, struct nk_rect);
49344934NK_API nk_bool nk_input_is_mouse_prev_hovering_rect(const struct nk_input*, struct nk_rect);
49354935NK_API nk_bool nk_input_is_mouse_hovering_rect(const struct nk_input*, struct nk_rect);
4936+ NK_API nk_bool nk_input_is_mouse_moved(const struct nk_input*);
49364937NK_API nk_bool nk_input_mouse_clicked(const struct nk_input*, enum nk_buttons, struct nk_rect);
49374938NK_API nk_bool nk_input_is_mouse_down(const struct nk_input*, enum nk_buttons);
49384939NK_API nk_bool nk_input_is_mouse_pressed(const struct nk_input*, enum nk_buttons);
@@ -18434,6 +18435,12 @@ nk_input_is_mouse_released(const struct nk_input *i, enum nk_buttons id)
1843418435 return (!i->mouse.buttons[id].down && i->mouse.buttons[id].clicked);
1843518436}
1843618437NK_API nk_bool
18438+ nk_input_is_mouse_moved(const struct nk_input *i)
18439+ {
18440+ if (!i) return nk_false;
18441+ return i->mouse.delta.x != 0 || i->mouse.delta.y != 0;
18442+ }
18443+ NK_API nk_bool
1843718444nk_input_is_key_pressed(const struct nk_input *i, enum nk_keys key)
1843818445{
1843918446 const struct nk_key *k;
@@ -20381,7 +20388,7 @@ nk_panel_end(struct nk_context *ctx)
2038120388
2038220389 /* hide scroll if no user input */
2038320390 if (window->flags & NK_WINDOW_SCROLL_AUTO_HIDE) {
20384- int has_input = ctx->input.mouse.delta.x != 0 || ctx->input.mouse.delta.y != 0 || ctx->input.mouse.scroll_delta.y != 0;
20391+ int has_input = nk_input_is_mouse_moved(& ctx->input) || ctx->input.mouse.scroll_delta.y != 0;
2038520392 int is_window_hovered = nk_window_is_hovered(ctx);
2038620393 int any_item_active = (ctx->last_widget_state & NK_WIDGET_STATE_MODIFIED);
2038720394 if ((!has_input && is_window_hovered) || (!is_window_hovered && !any_item_active))
@@ -28056,7 +28063,7 @@ nk_do_edit(nk_flags *state, struct nk_command_buffer *out,
2805628063 in->mouse.buttons[NK_BUTTON_LEFT].clicked) {
2805728064 nk_textedit_click(edit, mouse_x, mouse_y, font, row_height);
2805828065 } else if (is_hovered && in->mouse.buttons[NK_BUTTON_LEFT].down &&
28059- (in->mouse.delta.x != 0.0f || in->mouse.delta.y != 0.0f )) {
28066+ nk_input_is_mouse_moved (in)) {
2806028067 nk_textedit_drag(edit, mouse_x, mouse_y, font, row_height);
2806128068 cursor_follow = nk_true;
2806228069 } else if (is_hovered && in->mouse.buttons[NK_BUTTON_RIGHT].clicked &&
0 commit comments