48 lines
992 B
C
48 lines
992 B
C
#define BZ_ENTRYPOINT
|
|
#include <breeze.h>
|
|
|
|
#include <raylib.h>
|
|
#include <rlImGui.h>
|
|
|
|
BzUI *ui;
|
|
|
|
bool init(int *game) {
|
|
rlImGuiSetup(true);
|
|
|
|
ui = bzUICreate();
|
|
|
|
return true;
|
|
}
|
|
|
|
void render(float dt, int *game) {
|
|
ClearBackground(WHITE);
|
|
|
|
|
|
bzUIBegin(ui, GetScreenWidth(), GetScreenHeight());
|
|
bzUISetParentLayout(ui, *&(BzUILayout) {
|
|
.type = BZ_UI_LAYOUT_FLEX_BOX,
|
|
.flags = BZ_UI_FLEX_DIR_COLUMN | BZ_UI_FLEX_ALIGN_CENTER | BZ_UI_FLEX_JUSTIFY_CENTER,
|
|
});
|
|
if (bzUIButton(ui, "Hello world", NULL)) {
|
|
bzLogInfo("Hello world");
|
|
}
|
|
if (bzUIButton(ui, "foo", NULL)) {
|
|
bzLogInfo("foo");
|
|
}
|
|
if (bzUIButton(ui, "bar", NULL)) {
|
|
bzLogInfo("bar");
|
|
}
|
|
bzUIEnd(ui);
|
|
|
|
rlImGuiBegin();
|
|
igShowDemoWindow(NULL);
|
|
rlImGuiEnd();
|
|
}
|
|
|
|
bool bzMain(BzAppDesc *appDesc, int argc, const char **argv) {
|
|
appDesc->init = (BzAppInitFunc) init;
|
|
appDesc->render = (BzAppRenderFunc) render;
|
|
|
|
return true;
|
|
}
|