Implemented right click functionality

This commit is contained in:
2026-04-30 08:00:14 +02:00
parent e72aa8fc5f
commit 0d77c912a8
2 changed files with 18 additions and 3 deletions

View File

@@ -114,7 +114,12 @@ pub const Simulator = struct {
/// Sub input handling function for mouse input only
fn handleMouseInput(self: *Simulator, pos: rl.Vector2) void {
if (rl.isMouseButtonReleased(.left)) self.leftClickEvent(pos);
if (rl.isMouseButtonReleased(.left)) {
self.leftClickEvent(pos);
return;
}
if (rl.isMouseButtonReleased(.right)) self.node_man.deleteTempNode(self.allocator);
}
/// Function that handles functionality that executes upon left click