Basic Entity ID display for debugging
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user