per-box tags -> per-box tags key; cache (key -> tags_list), and (key * string -> theme_pattern) separately; accelerate all theme lookups

This commit is contained in:
Ryan Fleury committed 2025-02-19 09:35:45 -08:00
1 parent 9805f8cd20
commit f87dd1be82
5 files changed
+274 -78

No files matched your search

+2 -4
View File
@@ -1046,12 +1046,10 @@ internal UI_BOX_CUSTOM_DRAW(rd_thread_box_draw_extensions)
}
// rjf: locked icon on frozen threads
if(u->is_frozen)
if(u->is_frozen) UI_TagF("bad")
{
F32 lock_icon_off = ui_top_font_size()*0.2f;
String8 tags[] = {str8_lit("bad")};
String8Array tags_array = {tags, ArrayCount(tags)};
Vec4F32 color = ui_color_from_tags_name(tags_array, str8_lit("text"));
Vec4F32 color = ui_color_from_name(str8_lit("text"));
dr_text(rd_font_from_slot(RD_FontSlot_Icons),
box->font_size, 0, 0, FNT_RasterFlag_Smooth,
v2f32((box->rect.x0 + box->rect.x1)/2 + lock_icon_off/2,