From f0b0ad820c578e9f1ac6f8de3b1a1f70c0ae110c Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 29 Sep 2025 05:22:56 +0000 Subject: [PATCH] colorful git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@53 b9cfdab3-6d41-4d17-bbe4-086880011989 --- examples/example.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/examples/example.c b/examples/example.c index ec6731d..3dcc69b 100644 --- a/examples/example.c +++ b/examples/example.c @@ -14,11 +14,26 @@ int main(){ MwWidget window = MwVaCreateWidget(MwWindowClass, "main", NULL, 0, 0, 400, 400, MwNtitle, "hello world", NULL); - MwWidget button = MwVaCreateWidget(MwButtonClass, "button", window, 50, 50, 300, 300, + MwWidget button = MwVaCreateWidget(MwButtonClass, "button", window, 50, 50, 300, 125, MwNtext, "lorem ipsum", NULL); + MwWidget button2 = MwVaCreateWidget(MwButtonClass, "button", window, 50, 225, 100, 125, + MwNtext, "lorem ipsum", + MwNbackground, "#f66", + NULL); + MwWidget button3 = MwVaCreateWidget(MwButtonClass, "button", window, 150, 225, 100, 125, + MwNtext, "lorem ipsum", + MwNbackground, "#6f6", + NULL); + MwWidget button4 = MwVaCreateWidget(MwButtonClass, "button", window, 250, 225, 100, 125, + MwNtext, "lorem ipsum", + MwNbackground, "#66f", + NULL); MwAddUserHandler(button, MwNactivateHandler, handler, NULL); + MwAddUserHandler(button2, MwNactivateHandler, handler, NULL); + MwAddUserHandler(button3, MwNactivateHandler, handler, NULL); + MwAddUserHandler(button4, MwNactivateHandler, handler, NULL); MwLoop(window); }