summaryrefslogtreecommitdiff
path: root/project-base/src/qui/fixed_container.c
diff options
context:
space:
mode:
Diffstat (limited to 'project-base/src/qui/fixed_container.c')
-rw-r--r--project-base/src/qui/fixed_container.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/project-base/src/qui/fixed_container.c b/project-base/src/qui/fixed_container.c
new file mode 100644
index 0000000..acc3b05
--- /dev/null
+++ b/project-base/src/qui/fixed_container.c
@@ -0,0 +1,21 @@
+void _qui_update_fixed_container(qui_widget* el) {
+}
+
+void _qui_render_fixed_container(qui_widget* el) {
+ renderer->render_rectangle(el->x, el->y, el->width, el->height, rgb(0,255,0));
+}
+
+qui_widget* qui_create_fixed_container(qui_widget* qui, u16 size)
+{
+ log_assert(qui->type == WIDGET_VERTICAL_LAYOUT, "Fixed container can only be added to vertical or horizontal layout");
+
+ qui_widget* wg = _qui_create_empty_widget(qui);
+ wg->type = WIDGET_FIXED_CONTAINER;
+ if (qui && qui->type == WIDGET_VERTICAL_LAYOUT) {
+ wg->height = size;
+ }
+ else {
+ log_assert(0, "Fixed container must be placed in vertical or horizontal layout");
+ }
+ return wg;
+} \ No newline at end of file