#ifndef MGUI_BUTTON_H #define MGUI_BUTTON_H #include "widget.h" #include #include #include typedef struct { mgui_widget widget; char *str; size_t str_size; mgl_rectangle background; mgl_text text; } mgui_button; mgui_button* mgui_button_create(const char *str, size_t size, unsigned char character_size); void mgui_button_destroy(mgui_button *button); mgui_widget* mgui_button_to_widget(mgui_button *list); mgui_button* mgui_widget_to_button(mgui_widget *widget); void mgui_button_set_position(mgui_button *self, mgl_vec2i position); void mgui_button_calculate_size(mgui_button *self, mgl_vec2i max_size); void mgui_button_on_event(mgui_button *self, mgl_window *window, mgl_event *event); void mgui_button_draw(mgui_button *self, mgl_window *window); #endif /* MGUI_BUTTON_H */