aboutsummaryrefslogtreecommitdiff
path: root/include/mgui/list.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-12-04 01:37:07 +0100
committerdec05eba <dec05eba@protonmail.com>2021-12-04 01:37:07 +0100
commitd3a5b3d579e30ce02afd5e270dfdd511af195c31 (patch)
tree7d5aaa9d8289e7f8af2d62f796336f207375b610 /include/mgui/list.h
parent9644f3c05b808a3cac3892aae36ffca2cce9357d (diff)
Add image
Diffstat (limited to 'include/mgui/list.h')
-rw-r--r--include/mgui/list.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/mgui/list.h b/include/mgui/list.h
index 6f359c9..f0080c8 100644
--- a/include/mgui/list.h
+++ b/include/mgui/list.h
@@ -3,6 +3,7 @@
#include "widget.h"
#include <stddef.h>
+#include <mgl/graphics/color.h>
typedef struct mgl_window mgl_window;
typedef struct mgl_event mgl_event;
@@ -16,19 +17,19 @@ typedef struct {
mgui_widget widget;
mgui_list_direction direction;
mgl_vec2i position;
- mgl_vec2i size;
+ mgl_color background_color;
mgui_widget **items;
- size_t num_items;
size_t items_capacity;
+ size_t num_items;
} mgui_list;
-mgui_list* mgui_list_create(mgui_list_direction direction, mgl_vec2i size);
+mgui_list* mgui_list_create(mgui_list_direction direction);
mgui_widget* mgui_list_to_widget(mgui_list *list);
mgui_list* mgui_widget_to_list(mgui_widget *widget);
void mgui_list_set_position(mgui_list *self, mgl_vec2i position);
-void mgui_list_set_size(mgui_list *self, mgl_vec2i size);
void mgui_list_set_width(mgui_list *self, int width);
+void mgui_list_set_background_color(mgui_list *self, mgl_color color);
void mgui_list_append(mgui_list *self, mgui_widget *widget);
void mgui_list_on_event(mgui_list *self, mgl_window *window, mgl_event *event);
/* Returns the size of the widget */