Przeglądaj źródła

fix: using nk_layout_row_begin() with NK_STATIC makes incorrect layout

Naoyuki Sawa 9 lat temu
rodzic
commit
344f121468
1 zmienionych plików z 1 dodań i 4 usunięć
  1. 1 4
      nuklear.h

+ 1 - 4
nuklear.h

@@ -18215,10 +18215,7 @@ nk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx,
         item_width = layout->row.item_width;
         item_offset = layout->row.item_offset;
         item_spacing = (float)layout->row.index * spacing.x;
-        if (modify) {
-            layout->row.item_offset += item_width;
-            layout->row.index = 0;
-        }
+        if (modify) layout->row.item_offset += item_width;
     } break;
     case NK_LAYOUT_STATIC_FREE: {
         /* free widget placing */