summaryrefslogtreecommitdiff
path: root/bindings/main.c
diff options
context:
space:
mode:
authorSteven Van Dorp <steven@vandorp.lu>2026-02-06 10:00:08 +0100
committerSteven Van Dorp <steven@vandorp.lu>2026-02-06 10:00:08 +0100
commit0d8aeb6464103ec8e35c10c448bf08b0b9edc156 (patch)
tree80ab47bf3e0f137856d8494753e774c8456c85c8 /bindings/main.c
Initial CommitHEADmaster
Diffstat (limited to 'bindings/main.c')
-rw-r--r--bindings/main.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/bindings/main.c b/bindings/main.c
new file mode 100644
index 0000000..0c0aee4
--- /dev/null
+++ b/bindings/main.c
@@ -0,0 +1,29 @@
+#include "minimgui.h"
+
+Context ui;
+bool init () {
+ ui = context_init();
+ return true;
+}
+
+float time = 0;
+bool loop (float dt) {
+ rectangle(ui, ((Rect){
+ .x = time / 10,
+ .y = 0.1f,
+ .w = 0.2f,
+ .h = 0.2f
+ }), .color = color_hex(0xffff0000));
+ time += dt;
+ return true;
+}
+
+void deinit () {
+ context_deinit(ui);
+}
+
+int main () {
+ run(init, loop, deinit);
+ return 0;
+}
+