Applied toggleable alignment to demos

This commit is contained in:
Jacob Ahnstedt 2023-11-26 11:01:02 +01:00
parent 2a52826392
commit 6c0f814c4e
23 changed files with 46 additions and 46 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}