diff options
author | Marvin Borner | 2020-11-22 12:51:10 +0100 |
---|---|---|
committer | Marvin Borner | 2020-11-22 12:51:10 +0100 |
commit | 11568b08115cd0a7fe17608599abdc8a80a4ec50 (patch) | |
tree | 82df8168992fe1f938ff41dcbc661981b398ff6a /apps/window.c | |
parent | c0decce503f945ac5883b811443ddca44a7525b9 (diff) |
Added percentage-based GUI system
Diffstat (limited to 'apps/window.c')
-rw-r--r-- | apps/window.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/window.c b/apps/window.c index 7e1b4be..835a978 100644 --- a/apps/window.c +++ b/apps/window.c @@ -15,15 +15,12 @@ void on_click() int main() { - /* print("[test context loaded]\n"); */ - struct element *root = gui_init("test", 600, 400, COLOR_BG); - struct element *container = - gui_add_container(root, 0, 0, root->ctx->width / 2, root->ctx->height, COLOR_RED); + struct element *container = gui_add_container(root, 0, 0, 50, 100, COLOR_RED); struct element *button = gui_add_button(container, 10, 10, FONT_24, strdup("Button"), COLOR_WHITE, COLOR_BLACK); struct element *text_input = - gui_add_text_input(container, 10, 50, 200, FONT_24, COLOR_WHITE, COLOR_BLACK); + gui_add_text_input(container, 10, 50, 70, FONT_24, COLOR_WHITE, COLOR_BLACK); (void)text_input; button->event.on_click = on_click; |