瀏覽代碼

Merge branch 'master' of https://github.com/vurtun/gui

vurtun 8 年之前
父節點
當前提交
274d9c416b
共有 5 個文件被更改,包括 5 次插入8 次删除
  1. 1 1
      example/canvas.c
  2. 1 1
      example/extended.c
  3. 1 1
      example/file_browser.c
  4. 1 1
      example/skinning.c
  5. 1 4
      nuklear.h

+ 1 - 1
example/canvas.c

@@ -307,7 +307,7 @@ static void error_callback(int e, const char *d){printf("Error %d: %s\n", e, d);
 static void text_input(GLFWwindow *win, unsigned int codepoint)
 static void text_input(GLFWwindow *win, unsigned int codepoint)
 {nk_input_unicode((struct nk_context*)glfwGetWindowUserPointer(win), codepoint);}
 {nk_input_unicode((struct nk_context*)glfwGetWindowUserPointer(win), codepoint);}
 static void scroll_input(GLFWwindow *win, double _, double yoff)
 static void scroll_input(GLFWwindow *win, double _, double yoff)
-{UNUSED(_);nk_input_scroll((struct nk_context*)glfwGetWindowUserPointer(win), (float)yoff);}
+{UNUSED(_);nk_input_scroll((struct nk_context*)glfwGetWindowUserPointer(win), nk_vec2(0, (float)yoff));}
 
 
 static void
 static void
 pump_input(struct nk_context *ctx, GLFWwindow *win)
 pump_input(struct nk_context *ctx, GLFWwindow *win)

+ 1 - 1
example/extended.c

@@ -734,7 +734,7 @@ static void error_callback(int e, const char *d){printf("Error %d: %s\n", e, d);
 static void text_input(GLFWwindow *win, unsigned int codepoint)
 static void text_input(GLFWwindow *win, unsigned int codepoint)
 {nk_input_unicode((struct nk_context*)glfwGetWindowUserPointer(win), codepoint);}
 {nk_input_unicode((struct nk_context*)glfwGetWindowUserPointer(win), codepoint);}
 static void scroll_input(GLFWwindow *win, double _, double yoff)
 static void scroll_input(GLFWwindow *win, double _, double yoff)
-{UNUSED(_);nk_input_scroll((struct nk_context*)glfwGetWindowUserPointer(win), (float)yoff);}
+{UNUSED(_);nk_input_scroll((struct nk_context*)glfwGetWindowUserPointer(win), nk_vec2(0, (float)yoff));}
 
 
 int main(int argc, char *argv[])
 int main(int argc, char *argv[])
 {
 {

+ 1 - 1
example/file_browser.c

@@ -765,7 +765,7 @@ static void error_callback(int e, const char *d){printf("Error %d: %s\n", e, d);
 static void text_input(GLFWwindow *win, unsigned int codepoint)
 static void text_input(GLFWwindow *win, unsigned int codepoint)
 {nk_input_unicode((struct nk_context*)glfwGetWindowUserPointer(win), codepoint);}
 {nk_input_unicode((struct nk_context*)glfwGetWindowUserPointer(win), codepoint);}
 static void scroll_input(GLFWwindow *win, double _, double yoff)
 static void scroll_input(GLFWwindow *win, double _, double yoff)
-{UNUSED(_);nk_input_scroll((struct nk_context*)glfwGetWindowUserPointer(win), (float)yoff);}
+{UNUSED(_);nk_input_scroll((struct nk_context*)glfwGetWindowUserPointer(win), nk_vec2(0, (float)yoff));}
 
 
 int main(int argc, char *argv[])
 int main(int argc, char *argv[])
 {
 {

+ 1 - 1
example/skinning.c

@@ -334,7 +334,7 @@ static void error_callback(int e, const char *d){printf("Error %d: %s\n", e, d);
 static void text_input(GLFWwindow *win, unsigned int codepoint)
 static void text_input(GLFWwindow *win, unsigned int codepoint)
 {nk_input_unicode((struct nk_context*)glfwGetWindowUserPointer(win), codepoint);}
 {nk_input_unicode((struct nk_context*)glfwGetWindowUserPointer(win), codepoint);}
 static void scroll_input(GLFWwindow *win, double _, double yoff)
 static void scroll_input(GLFWwindow *win, double _, double yoff)
-{UNUSED(_);nk_input_scroll((struct nk_context*)glfwGetWindowUserPointer(win), (float)yoff);}
+{UNUSED(_);nk_input_scroll((struct nk_context*)glfwGetWindowUserPointer(win), nk_vec2(0, (float)yoff));}
 
 
 int main(int argc, char *argv[])
 int main(int argc, char *argv[])
 {
 {

+ 1 - 4
nuklear.h

@@ -13760,7 +13760,7 @@ nk_scrollbar_behavior(nk_flags *state, struct nk_input *in,
     const struct nk_rect *empty1, float scroll_offset,
     const struct nk_rect *empty1, float scroll_offset,
     float target, float scroll_step, enum nk_orientation o)
     float target, float scroll_step, enum nk_orientation o)
 {
 {
-    nk_flags ws;
+    nk_flags ws = 0;
     int left_mouse_down;
     int left_mouse_down;
     int left_mouse_click_in_cursor;
     int left_mouse_click_in_cursor;
     float scroll_delta;
     float scroll_delta;
@@ -16239,8 +16239,6 @@ nk_finish(struct nk_context *ctx, struct nk_window *win)
 {
 {
     struct nk_popup_buffer *buf;
     struct nk_popup_buffer *buf;
     struct nk_command *parent_last;
     struct nk_command *parent_last;
-    struct nk_command *sublast;
-    struct nk_command *last;
     void *memory;
     void *memory;
 
 
     NK_ASSERT(ctx);
     NK_ASSERT(ctx);
@@ -16803,7 +16801,6 @@ nk_panel_end(struct nk_context *ctx)
             scroll_target = (float)(int)(layout->max_x - scroll.x);
             scroll_target = (float)(int)(layout->max_x - scroll.x);
             scroll_step = layout->max_x * 0.05f;
             scroll_step = layout->max_x * 0.05f;
             scroll_inc = layout->max_x * 0.005f;
             scroll_inc = layout->max_x * 0.005f;
-            scroll_has_scrolling = scroll_has_scrolling;
             scroll_offset = nk_do_scrollbarh(&state, out, scroll, scroll_has_scrolling,
             scroll_offset = nk_do_scrollbarh(&state, out, scroll, scroll_has_scrolling,
                 scroll_offset, scroll_target, scroll_step, scroll_inc,
                 scroll_offset, scroll_target, scroll_step, scroll_inc,
                 &ctx->style.scrollh, in, style->font);
                 &ctx->style.scrollh, in, style->font);