Skip to content

Commit

Permalink
Port panel functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ashn-dot-dev committed Oct 29, 2023
1 parent 808003a commit 0245271
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions demo.sunder
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions microui.sunder
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

0 comments on commit 0245271

Please sign in to comment.