2025-10-15 14:15:01 +02:00
|
|
|
|
2025-10-17 13:41:37 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) Artsiom D.
|
|
|
|
|
* Copyright (C) shit-co.de
|
|
|
|
|
*/
|
|
|
|
|
|
2025-10-16 14:43:32 +02:00
|
|
|
|
2025-10-17 13:41:37 +02:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <unistd.h>
|
2025-10-15 14:15:01 +02:00
|
|
|
|
2025-10-17 13:41:37 +02:00
|
|
|
#include "box.h"
|
|
|
|
|
#include "ui.h"
|
2025-10-16 20:22:32 +02:00
|
|
|
|
|
|
|
|
|
2025-10-17 13:41:37 +02:00
|
|
|
int
|
|
|
|
|
main(void)
|
2025-10-16 20:22:32 +02:00
|
|
|
{
|
2025-10-17 13:41:37 +02:00
|
|
|
struct box *parent;
|
2025-10-16 20:22:32 +02:00
|
|
|
|
2025-10-17 13:41:37 +02:00
|
|
|
ui_init();
|
2025-10-16 20:22:32 +02:00
|
|
|
|
2025-10-17 13:41:37 +02:00
|
|
|
parent = new_vertical_box();
|
2025-10-16 20:22:32 +02:00
|
|
|
|
2025-10-17 13:41:37 +02:00
|
|
|
parent->length = 2;
|
|
|
|
|
parent->children[0] = new_button_box("hello!");
|
|
|
|
|
parent->children[0]->color = UI_BLUE;
|
|
|
|
|
parent->children[1] = new_button_box("quit");
|
2025-10-15 14:15:01 +02:00
|
|
|
|
2025-10-17 13:41:37 +02:00
|
|
|
draw_box(parent, 0, 0, 20, 30);
|
|
|
|
|
ui_refresh();
|
2025-10-15 14:15:01 +02:00
|
|
|
|
2025-10-16 14:43:32 +02:00
|
|
|
sleep(300);
|
2025-10-17 13:41:37 +02:00
|
|
|
|
|
|
|
|
ui_end();
|
2025-10-15 14:15:01 +02:00
|
|
|
}
|