Improve UI scaling

This commit is contained in:
2024-01-15 11:48:24 +01:00
parent f7b235abe5
commit b2bf934c14
2 changed files with 13 additions and 3 deletions

View File

@@ -247,6 +247,8 @@ void uiGameBuild(const char *label, Rectangle rec, Texture2D tex, bool *selected
BzUINode *btn = bzUINodeMake(UI, bzUIKeyFromString(label), &(BzUINodeDesc) {
.flags = BZ_UI_CLICKABLE | BZ_UI_ALIGN_CENTER | BZ_UI_DRAW_BORDER,
.margin[BZ_UI_AXIS_X] = 10.0f * scl,
.margin[BZ_UI_AXIS_Y] = 10.0f * scl,
.margin[BZ_UI_AXIS_Y * 2] = 10.0f * scl,
.semanticSize[BZ_UI_AXIS_X] = {BZ_UI_SIZE_CHILD_MAX},
.semanticSize[BZ_UI_AXIS_Y] = {BZ_UI_SIZE_CHILD_SUM},
});