From 74e97e308be00c0c1f1f93cecc584c62646182ca Mon Sep 17 00:00:00 2001 From: ashn Date: Sat, 28 Oct 2023 13:33:50 -0400 Subject: [PATCH] Port mu_text --- demo.c | 2 ++ demo.sunder | 2 ++ microui.sunder | 1 + 3 files changed, 5 insertions(+) diff --git a/demo.c b/demo.c index 62af748..d3ccd89 100644 --- a/demo.c +++ b/demo.c @@ -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")) { diff --git a/demo.sunder b/demo.sunder index 93cfa65..dbaf75b 100644 --- a/demo.sunder +++ b/demo.sunder @@ -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) { diff --git a/microui.sunder b/microui.sunder index a75cb3d..6eeae83 100644 --- a/microui.sunder +++ b/microui.sunder @@ -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;