From 25e6ba2597651ea7787d9ed462eb503ba8c3157f Mon Sep 17 00:00:00 2001 From: Rokas Kupstys Date: Thu, 30 Mar 2017 13:46:39 +0300 Subject: [PATCH] Fix examples to use nk_vec2 in nk_input_scroll() calls. --- example/canvas.c | 2 +- example/extended.c | 2 +- example/file_browser.c | 2 +- example/skinning.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/canvas.c b/example/canvas.c index c5f5634..a560694 100644 --- a/example/canvas.c +++ b/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) {nk_input_unicode((struct nk_context*)glfwGetWindowUserPointer(win), codepoint);} 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 pump_input(struct nk_context *ctx, GLFWwindow *win) diff --git a/example/extended.c b/example/extended.c index e555d65..003adf3 100644 --- a/example/extended.c +++ b/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) {nk_input_unicode((struct nk_context*)glfwGetWindowUserPointer(win), codepoint);} 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[]) { diff --git a/example/file_browser.c b/example/file_browser.c index ece4cb8..1945ff5 100644 --- a/example/file_browser.c +++ b/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) {nk_input_unicode((struct nk_context*)glfwGetWindowUserPointer(win), codepoint);} 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[]) { diff --git a/example/skinning.c b/example/skinning.c index 4634b09..2230d40 100644 --- a/example/skinning.c +++ b/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) {nk_input_unicode((struct nk_context*)glfwGetWindowUserPointer(win), codepoint);} 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[]) {