Przeglądaj źródła

Update nuklear.h

Wladislav ヴラド Artsimovich 2 lat temu
rodzic
commit
71bc457d39
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      nuklear.h

+ 4 - 0
nuklear.h

@@ -17898,6 +17898,10 @@ nk_input_button(struct nk_context *ctx, enum nk_buttons id, int x, int y, nk_boo
     btn->clicked_pos.y = (float)y;
     btn->down = down;
     btn->clicked++;
+
+    /* Fix Click-Drag for touch events. */
+    in->mouse.delta.x = 0;
+    in->mouse.delta.y = 0;
 #ifdef NK_BUTTON_TRIGGER_ON_RELEASE
     if (down == 1 && id == NK_BUTTON_LEFT)
     {