Basic Entity ID display for debugging

This commit is contained in:
2026-05-01 15:44:00 +02:00
parent 2a3064b0fe
commit 643712f529
7 changed files with 64 additions and 31 deletions

View File

@@ -33,9 +33,9 @@ pub const NodeManager = struct {
}
/// Regular draw function
pub fn draw(self: *const NodeManager, pos: Vector2) void {
pub fn draw(self: *const NodeManager, pos: Vector2, display_info: bool) void {
for (self.nodes.items) |node| {
node.draw(null);
node.draw(null, display_info);
}
if (self.temp_node) |node| {
@@ -43,10 +43,10 @@ pub const NodeManager = struct {
var cur_node = Node.init(0, pos);
// Temporary road that is to be drawn as one in the making
const road: Road = .init(0, node, &cur_node);
road.draw(false);
road.draw(false, false);
node.draw(c.NODE_TEMP_COLOUR);
cur_node.draw(c.NODE_CURSOR_COLOUR);
node.draw(c.NODE_TEMP_COLOUR, display_info);
cur_node.draw(c.NODE_CURSOR_COLOUR, false);
}
}