#include #include #include #include #include #include "nk.h" static void drawstuff(struct nk_context *ctx) { if(nk_begin(ctx, "mainmenu", nk_rect(0, 0, Dx(screen->r), Dy(screen->r)), NK_WINDOW_NO_SCROLLBAR|NK_WINDOW_BACKGROUND)){ nk_layout_row_dynamic(ctx, 0, 1); nk_label(ctx, "Hello, world!", NK_TEXT_LEFT); } nk_end(ctx); } void usage(void) { fprint(2, "usage: %s\n", argv0); threadexitsall("usage"); } void threadmain(int argc, char *argv[]) { ARGBEGIN{ default: usage(); }ARGEND nkinit(drawstuff); }