Skip to content

Commit

Permalink
Port mu_text
Browse files Browse the repository at this point in the history
  • Loading branch information
ashn-dot-dev committed Oct 28, 2023
1 parent 991c4d9 commit 74e97e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ int main(void) {
mu_begin(ctx);

if (mu_begin_window(ctx, "Hello", mu_rect(20, 20, 200, 150))) {
mu_text(ctx, "text");

mu_label(ctx, "Hello, raylib");

if (mu_button(ctx, "The button")) {
Expand Down
2 changes: 2 additions & 0 deletions demo.sunder
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ func main() void {
mu_begin(ctx);

if mu_begin_window(ctx, startof("Hello"), (:mu_Rect){.x = 20, .y = 20, .w = 200, .h = 150}) != 0 {
mu_text(ctx, startof("text"));

mu_label(ctx, startof("Hello, raylib"));

if (mu_button(ctx, startof("The button")) != 0) {
Expand Down
1 change: 1 addition & 0 deletions microui.sunder
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func mu_button(ctx: *mu_Context, label: *char) sint { return mu_button_ex(ctx, l
func mu_textbox(ctx: *mu_Context, buf: *char, bufsz: sint) sint { return mu_textbox_ex(ctx, buf, bufsz, 0); }
func mu_begin_window(ctx: *mu_Context, title: *char, rect: mu_Rect) sint { return mu_begin_window_ex(ctx, title, rect, 0); }

extern func mu_text(ctx: *mu_Context, text: *byte) void;
extern func mu_label(ctx: *mu_Context, text: *char) void;
extern func mu_button_ex(ctx: *mu_Context, label: *char, icon: sint, opt: sint) sint;
extern func mu_textbox_raw(ctx: *mu_Context, buf: *char, bufsz: sint, id: mu_Id, r: mu_Rect, opt: sint) sint;
Expand Down

0 comments on commit 74e97e3

Please sign in to comment.