aboutsummaryrefslogtreecommitdiff
path: root/src/mgui/widget.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-12-02 14:44:54 +0100
committerdec05eba <dec05eba@protonmail.com>2021-12-02 14:44:54 +0100
commitdf3eb74930491458f97a3328a68bf8526fef3caf (patch)
tree129dbc6e6d1c7c65af25d13427f92c45271f433e /src/mgui/widget.c
parent14770f42df291753a240def91fb488a904a909c1 (diff)
list set items position with rendering
Diffstat (limited to 'src/mgui/widget.c')
-rw-r--r--src/mgui/widget.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mgui/widget.c b/src/mgui/widget.c
index 242174d..f35ff05 100644
--- a/src/mgui/widget.c
+++ b/src/mgui/widget.c
@@ -36,13 +36,12 @@ void mgui_widget_on_event(mgui_widget *self, mgl_window *window, mgl_event *even
}
}
-void mgui_widget_draw(mgui_widget *self, mgl_window *window) {
+mgl_vec2i mgui_widget_draw(mgui_widget *self, mgl_window *window) {
switch(self->type) {
case MGUI_WIDGET_LIST:
- mgui_list_draw(mgui_widget_to_list(self), window);
- break;
+ return mgui_list_draw(mgui_widget_to_list(self), window);
case MGUI_WIDGET_BUTTON:
- mgui_button_draw(mgui_widget_to_button(self), window);
- break;
+ return mgui_button_draw(mgui_widget_to_button(self), window);
}
+ return (mgl_vec2i){ 0, 0 };
}