aboutsummaryrefslogtreecommitdiff
path: root/include/mgui/button.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mgui/button.h')
-rw-r--r--include/mgui/button.h22
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 */