#define BZ_ENTRYPOINT
#include <breeze.h>

enum {EASY, HARD};
static int op = EASY;
static float value = 0.6f;
static int i =  20;

void render(float dt, int *game) {
    ClearBackground(WHITE);

    if (nk_begin(NK, "Show", nk_rect(50, 50, 220, 220),
                 NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_CLOSABLE)) {
        // fixed widget pixel width
        nk_layout_row_static(NK, 30, 80, 1);
        if (nk_button_label(NK, "button")) {
            // event handling
        }
        // fixed widget window ratio width
        nk_layout_row_dynamic(NK, 30, 2);
        if (nk_option_label(NK, "easy", op == EASY)) op = EASY;
        if (nk_option_label(NK, "hard", op == HARD)) op = HARD;
        // custom widget pixel width
        nk_layout_row_begin(NK, NK_STATIC, 30, 2);
        {
            nk_layout_row_push(NK, 50);
            nk_label(NK, "Volume:", NK_TEXT_LEFT);
            nk_layout_row_push(NK, 110);
            nk_slider_float(NK, 0, &value, 1.0f, 0.1f);
        }
        nk_layout_row_end(NK);
    }
    nk_end(NK);
}

bool bzMain(BzAppDesc *appDesc, int argc, const char **argv) {
    appDesc->render = (BzAppRenderFunc) render;
    appDesc->useNuklear = true;
    return true;
}