From 11568b08115cd0a7fe17608599abdc8a80a4ec50 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 22 Nov 2020 12:51:10 +0100 Subject: Added percentage-based GUI system --- apps/exec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'apps/exec.c') diff --git a/apps/exec.c b/apps/exec.c index 68f9e63..51aef91 100644 --- a/apps/exec.c +++ b/apps/exec.c @@ -10,7 +10,6 @@ #define HEIGHT 32 #define WIDTH 300 -#define BORDER 2 void on_submit(struct gui_event_keyboard *event, struct element *elem) { @@ -37,10 +36,9 @@ void on_submit(struct gui_event_keyboard *event, struct element *elem) int main() { - struct element *root = - gui_init("Exec", WIDTH + BORDER * 2, HEIGHT + BORDER * 2, COLOR_BLACK); + struct element *root = gui_init("Exec", WIDTH, HEIGHT, COLOR_BLACK); struct element *input = - gui_add_text_input(root, BORDER, BORDER, WIDTH, FONT_32, COLOR_WHITE, COLOR_BLACK); + gui_add_text_input(root, 0, 0, 100, FONT_32, COLOR_WHITE, COLOR_BLACK); input->event.on_submit = on_submit; -- cgit v1.2.3