Skip to content

Commit

Permalink
Added feature to disable widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
yukyduky committed Oct 11, 2023
1 parent a14e55f commit 8016ff3
Show file tree
Hide file tree
Showing 22 changed files with 747 additions and 286 deletions.
2 changes: 1 addition & 1 deletion clib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuklear",
"version": "4.10.6",
"version": "4.11.0",

This comment has been minimized.

Copy link
@dyapan33

dyapan33 Jan 8, 2024

4.11.0?

This comment has been minimized.

Copy link
@dyapan33

dyapan33 Jan 8, 2024

4.11.0?

Latest Version Is 4.10.7 Right?

This comment has been minimized.

Copy link
@yukyduky

yukyduky Jan 8, 2024

Author Contributor

This PR added a new feature so it changed the API, therefore it goes to 4.11.0 :)
image

"repo": "Immediate-Mode-UI/Nuklear",
"description": "A small ANSI C gui toolkit",
"keywords": ["gl", "ui", "toolkit"],
Expand Down
20 changes: 7 additions & 13 deletions demo/common/overview.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,20 +248,14 @@ overview(struct nk_context *ctx)

nk_layout_row_static(ctx, 30, 80, 1);
if (inactive) {
struct nk_style_button button;
button = ctx->style.button;
ctx->style.button.normal = nk_style_item_color(nk_rgb(40,40,40));
ctx->style.button.hover = nk_style_item_color(nk_rgb(40,40,40));
ctx->style.button.active = nk_style_item_color(nk_rgb(40,40,40));
ctx->style.button.border_color = nk_rgb(60,60,60);
ctx->style.button.text_background = nk_rgb(60,60,60);
ctx->style.button.text_normal = nk_rgb(60,60,60);
ctx->style.button.text_hover = nk_rgb(60,60,60);
ctx->style.button.text_active = nk_rgb(60,60,60);
nk_button_label(ctx, "button");
ctx->style.button = button;
} else if (nk_button_label(ctx, "button"))
nk_widget_disable_begin(ctx);
}

if (nk_button_label(ctx, "button"))
fprintf(stdout, "button pressed\n");

nk_widget_disable_end(ctx);

nk_tree_pop(ctx);
}

Expand Down
Loading

0 comments on commit 8016ff3

Please sign in to comment.