#include "../include/mgui/list.h" #include "../include/mgui/button.h" #include #include #include int main() { if(mgl_init() != 0) return 1; mgl_window window; if(mgl_window_create(&window, "mgl", &(mgl_window_create_params){ .size = {1280, 720} }) != 0) return 1; mgui_list *list = mgui_list_create(MGUI_LIST_VERTICAL); mgui_button *button = mgui_button_create(); mgui_list_append(list, mgui_button_to_widget(button)); mgl_event event; while(mgl_window_is_open(&window)) { while(mgl_window_poll_event(&window, &event)) { mgui_list_on_event(list, &window, &event); } mgl_window_clear(&window, (mgl_color){0, 0, 0, 0}); mgui_list_draw(list, &window); mgl_window_display(&window); } mgl_deinit(); return 0; }