From 2ec96be4b94a51da9604ff00a0120127df5fdf56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wladislav=20=E3=83=B4=E3=83=A9=E3=83=89=20Artsimovich?= Date: Tue, 17 Oct 2023 11:37:30 +0900 Subject: [PATCH] Add horizontal rule demo --- demo/common/overview.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/demo/common/overview.c b/demo/common/overview.c index 86cb9f2..00042d5 100644 --- a/demo/common/overview.c +++ b/demo/common/overview.c @@ -590,6 +590,18 @@ overview(struct nk_context *ctx) } nk_tree_pop(ctx); } + + if (nk_tree_push(ctx, NK_TREE_NODE, "Horizontal Rule", NK_MINIMIZED)) + { + nk_layout_row_dynamic(ctx, 12, 1); + nk_label(ctx, "Use this subdivide spaces visually", NK_TEXT_LEFT); + nk_layout_row_dynamic(ctx, 4, 1); + nk_rule_horizontal(ctx, nk_white, nk_true); + nk_layout_row_dynamic(ctx, 75, 1); + nk_label_wrap(ctx, "Best used in 'Card' layouts, with a bigger title font on top. Takes on the size of the previous layout definition. Rounding optional."); + nk_tree_pop(ctx); + } + nk_tree_pop(ctx); }