diff options
Diffstat (limited to 'src/mgui/widget.c')
-rw-r--r-- | src/mgui/widget.c | 9 |
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 }; } |