diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-12-02 14:20:48 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-12-02 14:29:13 +0100 |
commit | 14770f42df291753a240def91fb488a904a909c1 (patch) | |
tree | c1ef52c408cb365890da4aeb5536256040bb96fd /include/mgui/button.h |
Initial commit, set up skeleton with list and button
Diffstat (limited to 'include/mgui/button.h')
-rw-r--r-- | include/mgui/button.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/mgui/button.h b/include/mgui/button.h new file mode 100644 index 0000000..8f9a2db --- /dev/null +++ b/include/mgui/button.h @@ -0,0 +1,22 @@ +#ifndef MGUI_BUTTON_H +#define MGUI_BUTTON_H + +#include <mgl/graphics/rectangle.h> +#include <mgl/graphics/text.h> +#include "widget.h" + +typedef struct { + mgui_widget widget; + mgl_rectangle background; + mgl_text label; +} mgui_button; + +mgui_button* mgui_button_create(); +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_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 */ |