1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 12:18:51 -05:00

Update Nuklear to 4.01.3

This commit is contained in:
Camilla Löwy 2020-07-08 19:55:35 +02:00
parent a122d91303
commit 74b9f309a9
2 changed files with 435 additions and 196 deletions

609
deps/nuklear.h vendored

File diff suppressed because it is too large Load Diff

View File

@ -230,7 +230,7 @@ nk_glfw3_mouse_button_callback(GLFWwindow* window, int button, int action, int m
} }
NK_INTERN void NK_INTERN void
nk_glfw3_clipbard_paste(nk_handle usr, struct nk_text_edit *edit) nk_glfw3_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
{ {
const char *text = glfwGetClipboardString(glfw.win); const char *text = glfwGetClipboardString(glfw.win);
if (text) nk_textedit_paste(edit, text, nk_strlen(text)); if (text) nk_textedit_paste(edit, text, nk_strlen(text));
@ -238,7 +238,7 @@ nk_glfw3_clipbard_paste(nk_handle usr, struct nk_text_edit *edit)
} }
NK_INTERN void NK_INTERN void
nk_glfw3_clipbard_copy(nk_handle usr, const char *text, int len) nk_glfw3_clipboard_copy(nk_handle usr, const char *text, int len)
{ {
char *str = 0; char *str = 0;
(void)usr; (void)usr;
@ -261,8 +261,8 @@ nk_glfw3_init(GLFWwindow *win, enum nk_glfw_init_state init_state)
glfwSetMouseButtonCallback(win, nk_glfw3_mouse_button_callback); glfwSetMouseButtonCallback(win, nk_glfw3_mouse_button_callback);
} }
nk_init_default(&glfw.ctx, 0); nk_init_default(&glfw.ctx, 0);
glfw.ctx.clip.copy = nk_glfw3_clipbard_copy; glfw.ctx.clip.copy = nk_glfw3_clipboard_copy;
glfw.ctx.clip.paste = nk_glfw3_clipbard_paste; glfw.ctx.clip.paste = nk_glfw3_clipboard_paste;
glfw.ctx.clip.userdata = nk_handle_ptr(0); glfw.ctx.clip.userdata = nk_handle_ptr(0);
nk_buffer_init_default(&glfw.ogl.cmds); nk_buffer_init_default(&glfw.ogl.cmds);