begin color editing, fix some bugs with meta-type-info disrupting type chain scans

This commit is contained in:
Ryan Fleury committed 2025-04-26 17:30:34 -07:00
1 parent 6a7420b7aa
commit 282f6022e1
13 files changed
+211 -30

No files matched your search

+17
View File
@@ -393,6 +393,23 @@ rd_title_fstrs_from_cfg(Arena *arena, RD_Cfg *cfg)
dr_fstrs_push_new(arena, &result, &params, dst_string, .color = dst_color);
}
//- rjf: special case: colors
if(str8_match(cfg->string, str8_lit("color"), 0))
{
String8 tags = rd_cfg_child_from_string(cfg, str8_lit("tags"))->first->string;
String8 color_string = rd_cfg_child_from_string(cfg, str8_lit("color"))->first->string;
U32 color_u32 = e_value_from_stringf("(uint32)(%S)", color_string).u32;
Vec4F32 color = rgba_from_u32(color_u32);
if(tags.size != 0)
{
dr_fstrs_push_new(arena, &result, &params, tags, .color = color);
}
else
{
dr_fstrs_push_new(arena, &result, &params, str8_lit("Color"), .color = rgba_secondary);
}
}
#undef start_secondary
scratch_end(scratch);
}