Version bump
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
/.zig-cache/
|
/.zig-cache/
|
||||||
/zig-out/
|
/zig-out/
|
||||||
/.idea/
|
/.idea/
|
||||||
|
/zig-pkg/
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
// internet connectivity.
|
// internet connectivity.
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.raylib_zig = .{
|
.raylib_zig = .{
|
||||||
.url = "git+https://github.com/raylib-zig/raylib-zig#aa9ee05f2246b813f75206bf817c9fbdfcb06101",
|
.url = "git+https://github.com/raylib-zig/raylib-zig?ref=devel#4b6a05cd102d51f00523dd5c5e18e628df359d20",
|
||||||
.hash = "raylib_zig-5.6.0-dev-KE8RECFQBQBn0BrEyEyK5NST461oRzpk6XeGeF9qBU2M",
|
.hash = "raylib_zig-5.6.0-dev-KE8REKNmBQDek2Sz27ULioxYpY9IYR0K0CeIC-iJRLCI",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ pub const Simulator = struct {
|
|||||||
rl.drawText(@tagName(self.mode), 10, c.HEIGHT - c.TEXT_SIZE, c.TEXT_SIZE, .black);
|
rl.drawText(@tagName(self.mode), 10, c.HEIGHT - c.TEXT_SIZE, c.TEXT_SIZE, .black);
|
||||||
|
|
||||||
// displays id of the element we hover over over
|
// 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});
|
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
|
/// Get ID info of the highlighted info and returns it
|
||||||
fn getHighlightedEntityInfo(self: *const Simulator) ![:0]const u8 {
|
fn getHighlightedEntityInfo(self: *const Simulator, buf: *[1024]u8) ![:0]const u8 {
|
||||||
var buf: [1024]u8 = undefined;
|
|
||||||
|
|
||||||
if (self.node_man.highlighted_node) |node|
|
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|
|
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 "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user