Version bump

This commit is contained in:
2026-04-15 23:52:00 +02:00
parent fe5bea6aaa
commit 8ea690f252
3 changed files with 7 additions and 8 deletions

View File

@@ -161,7 +161,7 @@ pub const Simulator = struct {
rl.drawText(@tagName(self.mode), 10, c.HEIGHT - c.TEXT_SIZE, c.TEXT_SIZE, .black);
// displays id of the element we hover over over
const entityInfo = self.getHighlightedEntityInfo() catch |err| {
const entityInfo = self.getHighlightedEntityInfo(&buf) catch |err| {
std.debug.panic("Failed to capture highlighted entity info: {}\n", .{err});
};
@@ -248,14 +248,12 @@ pub const Simulator = struct {
}
/// Get ID info of the highlighted info and returns it
fn getHighlightedEntityInfo(self: *const Simulator) ![:0]const u8 {
var buf: [1024]u8 = undefined;
fn getHighlightedEntityInfo(self: *const Simulator, buf: *[1024]u8) ![:0]const u8 {
if (self.node_man.highlighted_node) |node|
return std.fmt.bufPrintZ(&buf, "Node ID: {d}", .{node.id});
return std.fmt.bufPrintZ(buf, "Node ID: {d}", .{node.id});
if (self.road_man.highlighted_road) |road|
return std.fmt.bufPrintZ(&buf, "Road ID: {d}", .{road.id});
return std.fmt.bufPrintZ(buf, "Road ID: {d}", .{road.id});
return "";
}