From c048d6fbc3c85ad5d9c0e0bc278501c197a266eb Mon Sep 17 00:00:00 2001 From: PROP 65 <132837123+PROP65@users.noreply.github.com> Date: Mon, 19 Aug 2024 00:44:47 +0000 Subject: [PATCH] add knobs --- demo/common/overview.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/demo/common/overview.c b/demo/common/overview.c index dfc6fcb..a743975 100644 --- a/demo/common/overview.c +++ b/demo/common/overview.c @@ -264,6 +264,12 @@ overview(struct nk_context *ctx) nk_labelf(ctx, NK_TEXT_LEFT, "Progressbar: %u" , (int)prog_value); nk_progress(ctx, &prog_value, 100, NK_MODIFIABLE); + nk_layout_row(ctx, NK_STATIC, 40, 2, ratio); + nk_labelf(ctx, NK_TEXT_LEFT, "Knob int: %d", int_knob); + nk_knob_int(ctx, 0, &int_knob, 10, 1, NK_DOWN, 60.0f); + nk_labelf(ctx, NK_TEXT_LEFT, "Knob float: %.2f", float_knob); + nk_knob_float(ctx, 0, &float_knob, 5.0, 0.5f, NK_DOWN, 60.0f); + nk_layout_row(ctx, NK_STATIC, 25, 2, ratio); nk_label(ctx, "Property float:", NK_TEXT_LEFT); nk_property_float(ctx, "Float:", 0, &property_float, 64.0f, 0.1f, 0.2f);