Commit: 26904641f91e252780ac15f640cb58403b572713
Parent: f1bf7cc3eeaf6501014d1d07abaab54cb603f0a3
Author: Randy Palamar
Date: Sun, 27 Jul 2025 14:55:20 -0600
ui: cycle colours for bar graph
it doesn't matter if a stage has a consistent colour or not what
matters is that colours don't repeat themselves next to each other
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui.c b/ui.c
@@ -2619,7 +2619,7 @@ draw_compute_stats_bar_view(BeamformerUI *ui, Arena arena, ComputeShaderStats *s
rect.size = (v2){.y = 0.7f * cr.size.h};
for (i32 i = 0; i < stages_count; i++) {
rect.size.w = total_width * stats->table.times[frame_index][stages[i]] / total_times[row_index];
- Color color = colour_from_normalized(g_colour_palette[stages[i] % countof(g_colour_palette)]);
+ Color color = colour_from_normalized(g_colour_palette[i % countof(g_colour_palette)]);
DrawRectangleRec(rect.rl, color);
if (point_in_rect(mouse, rect)) {
text_pos = v2_add(rect.pos, (v2){.x = table->cell_pad.w});