color visualizer / theme editing work

This commit is contained in:
Ryan Fleury committed 2025-04-29 12:15:41 -07:00
1 parent ddbb2148a4
commit 09372bd7c1
11 files changed
+301 -260

No files matched your search

+4 -2
View File
@@ -394,7 +394,7 @@ rd_title_fstrs_from_cfg(Arena *arena, RD_Cfg *cfg)
}
//- rjf: special case: colors
if(str8_match(cfg->string, str8_lit("color"), 0))
if(str8_match(cfg->string, str8_lit("theme_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("value"))->first->string;
@@ -402,12 +402,14 @@ rd_title_fstrs_from_cfg(Arena *arena, RD_Cfg *cfg)
Vec4F32 color = linear_from_srgba(rgba_from_u32(color_u32));
if(tags.size != 0)
{
dr_fstrs_push_new(arena, &result, &params, tags, .color = color);
dr_fstrs_push_new(arena, &result, &params, tags);
}
else
{
dr_fstrs_push_new(arena, &result, &params, str8_lit("Color"), .color = rgba_secondary);
}
dr_fstrs_push_new(arena, &result, &params, str8_lit(" "));
dr_fstrs_push_new(arena, &result, &params, rd_icon_kind_text_table[RD_IconKind_CircleFilled], .font = rd_font_from_slot(RD_FontSlot_Icons), .raster_flags = rd_raster_flags_from_slot(RD_FontSlot_Icons), .color = color);
}
#undef start_secondary