From 6c0f814c4e47d033622011cf3f775682df0fbe73 Mon Sep 17 00:00:00 2001 From: Jacob Ahnstedt Date: Sun, 26 Nov 2023 11:01:02 +0100 Subject: [PATCH] Applied toggleable alignment to demos --- demo/allegro5/main.c | 4 ++-- demo/d3d11/main.c | 4 ++-- demo/d3d12/main.c | 4 ++-- demo/d3d9/main.c | 4 ++-- demo/gdi/main.c | 4 ++-- demo/gdip/main.c | 4 ++-- demo/glfw_opengl2/main.c | 4 ++-- demo/glfw_opengl3/main.c | 4 ++-- demo/glfw_opengl4/main.c | 4 ++-- demo/glfw_vulkan/main.c | 4 ++-- demo/sdl2surface_rawfb/main.c | 4 ++-- demo/sdl_opengl2/main.c | 4 ++-- demo/sdl_opengl3/main.c | 4 ++-- demo/sdl_opengles2/main.c | 4 ++-- demo/sdl_renderer/main.c | 4 ++-- demo/sfml_opengl2/main.cpp | 4 ++-- demo/sfml_opengl3/main.cpp | 4 ++-- demo/wayland_rawfb/main.c | 4 ++-- demo/x11/main.c | 4 ++-- demo/x11_opengl2/main.c | 4 ++-- demo/x11_opengl3/main.c | 4 ++-- demo/x11_rawfb/main.c | 4 ++-- demo/x11_xft/main.c | 4 ++-- 23 files changed, 46 insertions(+), 46 deletions(-) diff --git a/demo/allegro5/main.c b/demo/allegro5/main.c index ee01de744..ff2228ce7 100644 --- a/demo/allegro5/main.c +++ b/demo/allegro5/main.c @@ -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); } diff --git a/demo/d3d11/main.c b/demo/d3d11/main.c index 338dde2e8..63bb4953a 100644 --- a/demo/d3d11/main.c +++ b/demo/d3d11/main.c @@ -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); diff --git a/demo/d3d12/main.c b/demo/d3d12/main.c index 57e7bc3a6..90d8ab950 100644 --- a/demo/d3d12/main.c +++ b/demo/d3d12/main.c @@ -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); diff --git a/demo/d3d9/main.c b/demo/d3d9/main.c index 638c5845f..03a953093 100644 --- a/demo/d3d9/main.c +++ b/demo/d3d9/main.c @@ -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); diff --git a/demo/gdi/main.c b/demo/gdi/main.c index 281f82b14..9410e97f3 100644 --- a/demo/gdi/main.c +++ b/demo/gdi/main.c @@ -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); } diff --git a/demo/gdip/main.c b/demo/gdip/main.c index 7151964eb..78db5ed1e 100644 --- a/demo/gdip/main.c +++ b/demo/gdip/main.c @@ -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); } diff --git a/demo/glfw_opengl2/main.c b/demo/glfw_opengl2/main.c index 8d977735b..6296a7680 100644 --- a/demo/glfw_opengl2/main.c +++ b/demo/glfw_opengl2/main.c @@ -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); diff --git a/demo/glfw_opengl3/main.c b/demo/glfw_opengl3/main.c index 8eb749de4..cbe692e82 100644 --- a/demo/glfw_opengl3/main.c +++ b/demo/glfw_opengl3/main.c @@ -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); diff --git a/demo/glfw_opengl4/main.c b/demo/glfw_opengl4/main.c index 176a1efd0..502d1add6 100644 --- a/demo/glfw_opengl4/main.c +++ b/demo/glfw_opengl4/main.c @@ -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); diff --git a/demo/glfw_vulkan/main.c b/demo/glfw_vulkan/main.c index 555a5aa06..0bc17b4d3 100644 --- a/demo/glfw_vulkan/main.c +++ b/demo/glfw_vulkan/main.c @@ -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); diff --git a/demo/sdl2surface_rawfb/main.c b/demo/sdl2surface_rawfb/main.c index a8b661af1..c2238d9da 100644 --- a/demo/sdl2surface_rawfb/main.c +++ b/demo/sdl2surface_rawfb/main.c @@ -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); } diff --git a/demo/sdl_opengl2/main.c b/demo/sdl_opengl2/main.c index 45c51d2ea..508d42a61 100644 --- a/demo/sdl_opengl2/main.c +++ b/demo/sdl_opengl2/main.c @@ -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); diff --git a/demo/sdl_opengl3/main.c b/demo/sdl_opengl3/main.c index e039a2f71..048362600 100644 --- a/demo/sdl_opengl3/main.c +++ b/demo/sdl_opengl3/main.c @@ -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); diff --git a/demo/sdl_opengles2/main.c b/demo/sdl_opengles2/main.c index b114159f3..c527e5fe3 100644 --- a/demo/sdl_opengles2/main.c +++ b/demo/sdl_opengles2/main.c @@ -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); } diff --git a/demo/sdl_renderer/main.c b/demo/sdl_renderer/main.c index 940ea84c9..a8af16b5a 100644 --- a/demo/sdl_renderer/main.c +++ b/demo/sdl_renderer/main.c @@ -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); diff --git a/demo/sfml_opengl2/main.cpp b/demo/sfml_opengl2/main.cpp index 82f8e0fb6..6594ad356 100644 --- a/demo/sfml_opengl2/main.cpp +++ b/demo/sfml_opengl2/main.cpp @@ -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); diff --git a/demo/sfml_opengl3/main.cpp b/demo/sfml_opengl3/main.cpp index 22aafcc4b..8fa6df8ad 100644 --- a/demo/sfml_opengl3/main.cpp +++ b/demo/sfml_opengl3/main.cpp @@ -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); diff --git a/demo/wayland_rawfb/main.c b/demo/wayland_rawfb/main.c index cf60eedf1..baf4cc833 100644 --- a/demo/wayland_rawfb/main.c +++ b/demo/wayland_rawfb/main.c @@ -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); } diff --git a/demo/x11/main.c b/demo/x11/main.c index 0d02ad735..4cbf4c4b6 100644 --- a/demo/x11/main.c +++ b/demo/x11/main.c @@ -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); } diff --git a/demo/x11_opengl2/main.c b/demo/x11_opengl2/main.c index 2dc845e17..679f7b1a7 100644 --- a/demo/x11_opengl2/main.c +++ b/demo/x11_opengl2/main.c @@ -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); diff --git a/demo/x11_opengl3/main.c b/demo/x11_opengl3/main.c index a4a30081d..455346923 100644 --- a/demo/x11_opengl3/main.c +++ b/demo/x11_opengl3/main.c @@ -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); diff --git a/demo/x11_rawfb/main.c b/demo/x11_rawfb/main.c index 52a1c9359..5a19bb314 100644 --- a/demo/x11_rawfb/main.c +++ b/demo/x11_rawfb/main.c @@ -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); } diff --git a/demo/x11_xft/main.c b/demo/x11_xft/main.c index 263f43b8f..b4cc2ca63 100644 --- a/demo/x11_xft/main.c +++ b/demo/x11_xft/main.c @@ -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); }