From 4ef82b5d4ce1e7dc0f30672519310e81113e6fe7 Mon Sep 17 00:00:00 2001 From: Nic Gaffney Date: Wed, 12 Jun 2024 21:18:49 -0500 Subject: Updated imgui to have more verbose names for colors --- src/imgui.zig | 2 +- src/particle.zig | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/imgui.zig b/src/imgui.zig index fb9285d..b6def48 100644 --- a/src/imgui.zig +++ b/src/imgui.zig @@ -52,7 +52,7 @@ pub fn update() !void { for (&cfg.rules, 0..) |*row, i| { _ = z.tableNextRow(.{}); _ = z.tableSetColumnIndex(0); - z.text("Row {}", .{i + 1}); + z.text("{s}", .{part.colorToString(i)}); _ = z.tableNextColumn(); for (row, 0..) |*cols, j| { var id: [2:0]u8 = undefined; diff --git a/src/particle.zig b/src/particle.zig index 8efae69..05ffb7f 100644 --- a/src/particle.zig +++ b/src/particle.zig @@ -37,14 +37,14 @@ pub fn printRules(rules: [cfg.colorAmnt][cfg.colorAmnt]f32) void { /// Convert the color index to a string pub fn colorToString(c: usize) []const u8 { return switch (c) { - 0 => "R", - 1 => "Grn", - 2 => "Bl", - 3 => "Y", - 4 => "M", - 5 => "Br", - 6 => "O", - 7 => "Gry", + 0 => "Red", + 1 => "Green", + 2 => "Blue", + 3 => "Yellow", + 4 => "Magenta", + 5 => "Brown", + 6 => "Orange", + 7 => "Gray", else => " ", }; } -- cgit v1.2.3