Skip to content

Commit

Permalink
Applied toggleable alignment to demos
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Ahnstedt committed Nov 26, 2023
1 parent 2a52826 commit 6c0f814
Show file tree
Hide file tree
Showing 23 changed files with 46 additions and 46 deletions.
4 changes: 2 additions & 2 deletions demo/allegro5/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ int main(void)
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 22, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
}
Expand Down
4 changes: 2 additions & 2 deletions demo/d3d11/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ int main(void)
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 22, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);

Expand Down
4 changes: 2 additions & 2 deletions demo/d3d12/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ int main(void)
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 22, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);

Expand Down
4 changes: 2 additions & 2 deletions demo/d3d9/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ int main(void)
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 22, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);

Expand Down
4 changes: 2 additions & 2 deletions demo/gdi/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ int main(void)
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 22, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
}
Expand Down
4 changes: 2 additions & 2 deletions demo/gdip/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ int main(void)
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 22, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
}
Expand Down
4 changes: 2 additions & 2 deletions demo/glfw_opengl2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ int main(void)
fprintf(stdout, "button pressed\n");

nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;

nk_layout_row_dynamic(ctx, 25, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
Expand Down
4 changes: 2 additions & 2 deletions demo/glfw_opengl3/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ int main(void)
fprintf(stdout, "button pressed\n");

nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;

nk_layout_row_dynamic(ctx, 25, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
Expand Down
4 changes: 2 additions & 2 deletions demo/glfw_opengl4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ int main(void)
fprintf(stdout, "button pressed\n");

nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;

nk_layout_row_dynamic(ctx, 25, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
Expand Down
4 changes: 2 additions & 2 deletions demo/glfw_vulkan/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2148,9 +2148,9 @@ int main(void) {
fprintf(stdout, "button pressed\n");

nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY))
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT))
op = EASY;
if (nk_option_label(ctx, "hard", op == HARD))
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT))
op = HARD;

nk_layout_row_dynamic(ctx, 25, 1);
Expand Down
4 changes: 2 additions & 2 deletions demo/sdl2surface_rawfb/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ int main(int argc, char **argv)
printf("button pressed\n");
}
nk_layout_row_dynamic(&(context->ctx), 40, 2);
if (nk_option_label(&(context->ctx), "easy", op == EASY)) op = EASY;
if (nk_option_label(&(context->ctx), "hard", op == HARD)) op = HARD;
if (nk_option_label(&(context->ctx), "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(&(context->ctx), "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(&(context->ctx), 45, 1);
nk_property_int(&(context->ctx), "Compression:", 0, &property, 100, 10, 1);
}
Expand Down
4 changes: 2 additions & 2 deletions demo/sdl_opengl2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ main(int argc, char *argv[])
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 25, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);

Expand Down
4 changes: 2 additions & 2 deletions demo/sdl_opengl3/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ int main(int argc, char *argv[])
if (nk_button_label(ctx, "button"))
printf("button pressed!\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 22, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);

Expand Down
4 changes: 2 additions & 2 deletions demo/sdl_opengles2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ MainLoop(void* loopArg){
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 25, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
}
Expand Down
4 changes: 2 additions & 2 deletions demo/sdl_renderer/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ main(int argc, char *argv[])
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 25, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);

Expand Down
4 changes: 2 additions & 2 deletions demo/sfml_opengl2/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ int main(void)
fprintf(stdout, "button pressed\n");

nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;

nk_layout_row_dynamic(ctx, 25, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
Expand Down
4 changes: 2 additions & 2 deletions demo/sfml_opengl3/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ int main(void)
fprintf(stdout, "button pressed\n");

nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;

nk_layout_row_dynamic(ctx, 25, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
Expand Down
4 changes: 2 additions & 2 deletions demo/wayland_rawfb/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,8 @@ int main ()
printf("button pressed\n");
}
nk_layout_row_dynamic(&(nk_wayland_ctx.ctx), 30, 2);
if (nk_option_label(&(nk_wayland_ctx.ctx), "easy", op == EASY)) op = EASY;
if (nk_option_label(&(nk_wayland_ctx.ctx), "hard", op == HARD)) op = HARD;
if (nk_option_label(&(nk_wayland_ctx.ctx), "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(&(nk_wayland_ctx.ctx), "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(&(nk_wayland_ctx.ctx), 25, 1);
nk_property_int(&(nk_wayland_ctx.ctx), "Compression:", 0, &property, 100, 10, 1);
}
Expand Down
4 changes: 2 additions & 2 deletions demo/x11/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ main(void)
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 25, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
}
Expand Down
4 changes: 2 additions & 2 deletions demo/x11_opengl2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ int main(void)
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 25, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);

Expand Down
4 changes: 2 additions & 2 deletions demo/x11_opengl3/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ int main(void)
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 25, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);

Expand Down
4 changes: 2 additions & 2 deletions demo/x11_rawfb/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ main(void)
if (nk_button_label(&rawfb->ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(&rawfb->ctx, 30, 2);
if (nk_option_label(&rawfb->ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(&rawfb->ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(&rawfb->ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(&rawfb->ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(&rawfb->ctx, 25, 1);
nk_property_int(&rawfb->ctx, "Compression:", 0, &property, 100, 10, 1);
}
Expand Down
4 changes: 2 additions & 2 deletions demo/x11_xft/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ main(void)
if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");
nk_layout_row_dynamic(ctx, 30, 2);
if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
if (nk_option_label(ctx, "easy", op == EASY, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = EASY;
if (nk_option_label(ctx, "hard", op == HARD, NK_WIDGET_LEFT, NK_TEXT_LEFT)) op = HARD;
nk_layout_row_dynamic(ctx, 25, 1);
nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
}
Expand Down

0 comments on commit 6c0f814

Please sign in to comment.