aboutsummaryrefslogtreecommitdiff
path: root/src/mgui/button.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mgui/button.c')
-rw-r--r--src/mgui/button.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mgui/button.c b/src/mgui/button.c
index d8d0c58..c6b65d5 100644
--- a/src/mgui/button.c
+++ b/src/mgui/button.c
@@ -47,9 +47,10 @@ void mgui_button_on_event(mgui_button *self, mgl_window *window, mgl_event *even
}
}
-void mgui_button_draw(mgui_button *self, mgl_window *window) {
+mgl_vec2i mgui_button_draw(mgui_button *self, mgl_window *window) {
(void)window;
self->background.size = mgl_text_get_bounds(&self->label);
mgl_rectangle_draw(mgl_get_context(), &self->background);
mgl_text_draw(mgl_get_context(), &self->label);
+ return (mgl_vec2i){ self->background.size.x, self->background.size.y };
}