diff options
| author | Steven Van Dorp <steven@vandorp.lu> | 2026-02-06 10:00:08 +0100 |
|---|---|---|
| committer | Steven Van Dorp <steven@vandorp.lu> | 2026-02-06 10:00:08 +0100 |
| commit | 0d8aeb6464103ec8e35c10c448bf08b0b9edc156 (patch) | |
| tree | 80ab47bf3e0f137856d8494753e774c8456c85c8 /bindings/main.c | |
Diffstat (limited to 'bindings/main.c')
| -rw-r--r-- | bindings/main.c | 29 |
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; +} + |
