diff --git a/demo.c b/demo.c index fc8cdc7..990bf51 100644 --- a/demo.c +++ b/demo.c @@ -76,6 +76,10 @@ int main(void) { mu_end_popup(ctx); } + mu_begin_panel(ctx, "panel"); + mu_text(ctx, "text under panel"); + mu_end_panel(ctx); + mu_textbox(ctx, buf, sizeof(buf)); mu_end_window(ctx); diff --git a/demo.sunder b/demo.sunder index 3313be6..4379c0a 100644 --- a/demo.sunder +++ b/demo.sunder @@ -58,6 +58,10 @@ func main() void { mu_end_popup(ctx); } + mu_begin_panel(ctx, startof("panel")); + mu_text(ctx, startof("text under panel")); + mu_end_panel(ctx); + mu_textbox(ctx, &buf[0], (:sint)countof(buf)); mu_end_window(ctx); diff --git a/microui.sunder b/microui.sunder index ff2b479..9531a32 100644 --- a/microui.sunder +++ b/microui.sunder @@ -99,6 +99,7 @@ func mu_number(ctx: *mu_Context, value: *mu_Real, step: mu_Real) sint { return m func mu_header(ctx: *mu_Context, label: *char) sint { return mu_header_ex(ctx, label, 0); } func mu_begin_treenode(ctx: *mu_Context, label: *char) sint { return mu_begin_treenode_ex(ctx, label, 0); } func mu_begin_window(ctx: *mu_Context, title: *char, rect: mu_Rect) sint { return mu_begin_window_ex(ctx, title, rect, 0); } +func mu_begin_panel(ctx: *mu_Context, name: *char) void { mu_begin_panel_ex(ctx, name, 0); } extern func mu_text(ctx: *mu_Context, text: *byte) void; extern func mu_label(ctx: *mu_Context, text: *char) void; @@ -116,3 +117,5 @@ extern func mu_end_window(ctx: *mu_Context) void; extern func mu_open_popup(ctx: *mu_Context, name: *char) void; extern func mu_begin_popup(ctx: *mu_Context, name: *char) sint; extern func mu_end_popup(ctx: *mu_Context) void; +extern func mu_begin_panel_ex(ctx: *mu_Context, name: *char, opt: sint) void; +extern func mu_end_panel(ctx: *mu_Context) void;