aboutsummaryrefslogtreecommitdiff
path: root/include/mgui
diff options
context:
space:
mode:
Diffstat (limited to 'include/mgui')
-rw-r--r--include/mgui/button.h3
-rw-r--r--include/mgui/list.h3
-rw-r--r--include/mgui/widget.h3
3 files changed, 6 insertions, 3 deletions
diff --git a/include/mgui/button.h b/include/mgui/button.h
index 8f9a2db..864d3c6 100644
--- a/include/mgui/button.h
+++ b/include/mgui/button.h
@@ -17,6 +17,7 @@ mgui_button* mgui_widget_to_button(mgui_widget *widget);
void mgui_button_set_position(mgui_button *self, mgl_vec2i position);
void mgui_button_on_event(mgui_button *self, mgl_window *window, mgl_event *event);
-void mgui_button_draw(mgui_button *self, mgl_window *window);
+/* Returns the size of the widget */
+mgl_vec2i mgui_button_draw(mgui_button *self, mgl_window *window);
#endif /* MGUI_BUTTON_H */
diff --git a/include/mgui/list.h b/include/mgui/list.h
index 1da326d..82efaf8 100644
--- a/include/mgui/list.h
+++ b/include/mgui/list.h
@@ -28,6 +28,7 @@ mgui_list* mgui_widget_to_list(mgui_widget *widget);
void mgui_list_set_position(mgui_list *self, mgl_vec2i position);
void mgui_list_append(mgui_list *self, mgui_widget *widget);
void mgui_list_on_event(mgui_list *self, mgl_window *window, mgl_event *event);
-void mgui_list_draw(mgui_list *self, mgl_window *window);
+/* Returns the size of the widget */
+mgl_vec2i mgui_list_draw(mgui_list *self, mgl_window *window);
#endif /* MGUI_LIST_H */
diff --git a/include/mgui/widget.h b/include/mgui/widget.h
index 60f850c..4ff394c 100644
--- a/include/mgui/widget.h
+++ b/include/mgui/widget.h
@@ -28,6 +28,7 @@ void mgui_widget_init(mgui_widget *self, mgui_widget_type type);
void mgui_widget_set_margin(mgui_widget *self, int left, int top, int right, int bottom);
void mgui_widget_set_position(mgui_widget *self, mgl_vec2i position);
void mgui_widget_on_event(mgui_widget *self, mgl_window *window, mgl_event *event);
-void mgui_widget_draw(mgui_widget *self, mgl_window *window);
+/* Returns the size of the widget */
+mgl_vec2i mgui_widget_draw(mgui_widget *self, mgl_window *window);
#endif /* MGUI_WIDGET_H */