Implemented right click functionality
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user