This commit is contained in:
Krzosa Karol
2025-04-03 10:52:11 +02:00
parent c8e73ac245
commit 706bd89385
11 changed files with 759 additions and 78 deletions

View File

@@ -55,12 +55,12 @@ fn void mt_ui_stacks(ma_arena_t *arena, sb8_t *c, sb8_t *h) {
// create `stack` and `node` columns
for (ast_t *it = table->first; it; it = it->next) {
s8_t type = mtts(it, "type");
if (s8_ends_with(type, s8_lit("_t"), false)) {
if (s8_ends_with(type, s8_lit("_t"))) {
type = s8_chop(type, 2);
}
s8_t ui_type = type;
if (!s8_starts_with(ui_type, s8_lit("ui_"), false)) {
if (!s8_starts_with(ui_type, s8_lit("ui_"))) {
ui_type = s8_printf(arena, "ui_%S", ui_type);
}
@@ -136,7 +136,7 @@ fn void mt_ui_stacks(ma_arena_t *arena, sb8_t *c, sb8_t *h) {
sb8_stmtf(c, "fn void ui_box_fill_with_colors(ui_box_t *box) {");
for (ast_t *it = table->first; it; it = it->next) {
if (!s8_ends_with(mtts(it, "name"), s8_lit("_color"), false)) {
if (!s8_ends_with(mtts(it, "name"), s8_lit("_color"))) {
continue;
}
mt_stmtf(c, it, "box->@name = ui_top_@name();");