Update Nuklear to 1.18

Fixes #907.
This commit is contained in:
Camilla Löwy
2016-11-27 13:29:07 +01:00
parent fd127d59fa
commit f44307da4e
4 changed files with 1033 additions and 603 deletions

View File

@@ -116,7 +116,6 @@ int main(int argc, char** argv)
while (!glfwWindowShouldClose(window))
{
int width, height;
struct nk_panel layout;
struct nk_rect area;
glfwGetWindowSize(window, &width, &height);
@@ -124,7 +123,7 @@ int main(int argc, char** argv)
glClear(GL_COLOR_BUFFER_BIT);
nk_glfw3_new_frame();
if (nk_begin(nk, &layout, "", area, 0))
if (nk_begin(nk, "", area, 0))
{
const GLFWgammaramp* ramp = glfwGetGammaRamp(monitor);
nk_window_set_bounds(nk, area);

View File

@@ -128,14 +128,13 @@ int main(void)
while (!glfwWindowShouldClose(window))
{
int i, width, height;
struct nk_panel layout;
glfwGetWindowSize(window, &width, &height);
glClear(GL_COLOR_BUFFER_BIT);
nk_glfw3_new_frame();
if (nk_begin(nk, &layout,
if (nk_begin(nk,
"Joysticks",
nk_rect(0.f, 0.f, 0.f, 0.f),
NK_WINDOW_MINIMIZABLE |
@@ -162,7 +161,7 @@ int main(void)
for (i = 0; i < joystick_count; i++)
{
if (nk_begin(nk, &layout,
if (nk_begin(nk,
joystick_label(joysticks[i]),
nk_rect(i * 20.f, i * 20.f, 400.f, 400.f),
NK_WINDOW_BORDER |