Version bump
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
/.zig-cache/
|
||||
/zig-out/
|
||||
/.idea/
|
||||
/zig-pkg/
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
// internet connectivity.
|
||||
.dependencies = .{
|
||||
.raylib_zig = .{
|
||||
.url = "git+https://github.com/raylib-zig/raylib-zig#aa9ee05f2246b813f75206bf817c9fbdfcb06101",
|
||||
.hash = "raylib_zig-5.6.0-dev-KE8RECFQBQBn0BrEyEyK5NST461oRzpk6XeGeF9qBU2M",
|
||||
.url = "git+https://github.com/raylib-zig/raylib-zig?ref=devel#4b6a05cd102d51f00523dd5c5e18e628df359d20",
|
||||
.hash = "raylib_zig-5.6.0-dev-KE8REKNmBQDek2Sz27ULioxYpY9IYR0K0CeIC-iJRLCI",
|
||||
},
|
||||
},
|
||||
.paths = .{
|
||||
|
||||
@@ -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 "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user