aboutsummaryrefslogtreecommitdiff
path: root/src/mgui/list.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-12-07 20:20:27 +0100
committerdec05eba <dec05eba@protonmail.com>2021-12-07 20:20:27 +0100
commit864ee5f167d1e2dda9bfce24ef617d71ce49bfd8 (patch)
tree14c3bfe2d9b28dce43be9efae8e18156de7787fc /src/mgui/list.c
parentd3a5b3d579e30ce02afd5e270dfdd511af195c31 (diff)
scrollview
Diffstat (limited to 'src/mgui/list.c')
-rw-r--r--src/mgui/list.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/mgui/list.c b/src/mgui/list.c
index a3a2422..cf39b02 100644
--- a/src/mgui/list.c
+++ b/src/mgui/list.c
@@ -1,8 +1,6 @@
#include "../../include/mgui/list.h"
#include "../../include/alloc.h"
#include <mgl/window/window.h>
-#include <mgl/graphics/rectangle.h>
-#include <mgl/mgl.h>
#include <assert.h>
/*
@@ -82,23 +80,14 @@ static int max_int(int a, int b) {
return a >= b ? a : b;
}
+/* TODO: Check if visible in scissor */
+
mgl_vec2i mgui_list_draw(mgui_list *self, mgl_window *window) {
mgl_vec2i position = self->position;
/* TODO: */
mgl_vec2i size = (mgl_vec2i){ 0, 0 };
/* TODO:
- mgl_scissor prev_scissor;
- mgl_window_get_scissor(window, &prev_scissor);
-
- mgl_scissor new_scissor = {
- .position = self->position,
- .size = self->size
- };
- mgl_window_set_scissor(window, &new_scissor);
- */
-
- /* TODO:
if(self->background_color.a > 0) {
mgl_rectangle rect = {
.position = { self->position.x, self->position.y },
@@ -134,7 +123,5 @@ mgl_vec2i mgui_list_draw(mgui_list *self, mgl_window *window) {
}
}
- /* TODO: Remove */
- /*mgl_window_set_scissor(window, &prev_scissor);*/
return size;
}