summaryrefslogtreecommitdiff
path: root/bindings/main.c
blob: 0c0aee4c0bdf10e3f76ca7505b1062cf59ef927c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
}