aboutsummaryrefslogtreecommitdiff
path: root/src/imgui.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/imgui.zig')
-rw-r--r--src/imgui.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/imgui.zig b/src/imgui.zig
index bcc6b32..688e935 100644
--- a/src/imgui.zig
+++ b/src/imgui.zig
@@ -26,17 +26,17 @@ pub fn update(alloc: std.mem.Allocator, buf: [:0]u8) !void {
_ = z.sliderInt("Particles", .{ .v = &cfg.particleCount, .min = 1, .max = cfg.particleMax });
_ = z.sliderFloat("Friction", .{ .v = &cfg.friction, .min = 0, .max = 1 });
// _ = z.sliderFloat("Radius", .{ .v = &cfg.radius, .min = cfg.minDistance, .max = 500 });
- _ = z.sliderFloat("Minimum Distance", .{ .v = &cfg.minDistance, .min = 1.0, .max = 500 });
+ _ = z.sliderInt("Minimum Distance", .{ .v = &cfg.minDistance, .min = 1.0, .max = 500 });
}
if (z.collapsingHeader("Radius", .{ .default_open = true })) {
for (&cfg.radius, 0..) |*r, i| {
- const str = try std.fmt.allocPrintZ(alloc, "{s} Radius", .{rul.colorToString(i)});
- _ = z.sliderFloat(str, .{ .v = r, .min = cfg.minDistance, .max = 500 });
+ const str = rul.colorToStringZ(i);
+ _ = z.sliderInt(str, .{ .v = r, .min = cfg.minDistance, .max = 500 });
}
}
if (z.collapsingHeader("Speed", .{ .default_open = true })) {
for (&cfg.speed, 0..) |*s, i| {
- const str = try std.fmt.allocPrintZ(alloc, "{s} Speed", .{rul.colorToString(i)});
+ const str = rul.colorToStringZ(i);
_ = z.sliderInt(str, .{ .v = s, .min = 1, .max = 1000 });
}
}
@@ -72,7 +72,7 @@ pub fn update(alloc: std.mem.Allocator, buf: [:0]u8) !void {
}
z.endTable();
if (z.button("Randomize", .{}))
- cfg.rules = rul.ruleMatrix();
+ cfg.rules = rul.ruleMatrix(false, false);
}
if (z.collapsingHeader("Load / Save", .{ .default_open = true })) {
_ = z.inputText("Save Path", .{ .buf = buf });