diff examples/example-ui/example-ui.c @ 488:441c37e7474f

ui: button -> mlk_button
author David Demelier <markand@malikania.fr>
date Tue, 28 Feb 2023 13:12:05 +0100
parents f2d3c5a97884
children ad6e9970a191
line wrap: on
line diff
--- a/examples/example-ui/example-ui.c	Tue Feb 28 13:08:58 2023 +0100
+++ b/examples/example-ui/example-ui.c	Tue Feb 28 13:12:05 2023 +0100
@@ -81,7 +81,7 @@
 	} autosave;
 
 	struct {
-		struct button button;
+		struct mlk_button button;
 	} quit;
 } ui = {
 	.panel = {
@@ -163,7 +163,7 @@
 {
 	unsigned int padding = theme_default()->padding;
 	struct frame *f = &ui.panel.frame;
-	struct button *b = &ui.quit.button;
+	struct mlk_button *b = &ui.quit.button;
 
 	/* Button. */
 	b->w = f->w / 4;
@@ -232,7 +232,7 @@
 
 	checkbox_handle(&ui.autosave.cb, ev);
 
-	if (button_handle(&ui.quit.button, ev))
+	if (mlk_button_handle(&ui.quit.button, ev))
 		mlk_game_quit();
 }
 
@@ -247,7 +247,7 @@
 	label_draw(&ui.header.label);
 	checkbox_draw(&ui.autosave.cb);
 	label_draw(&ui.autosave.label);
-	button_draw(&ui.quit.button);
+	mlk_button_draw(&ui.quit.button);
 	mlk_painter_present();
 }