Prevented building mode from working if delete mode keybind is being
held
This commit is contained in:
@@ -37,10 +37,11 @@ handle_mouse_input :: proc(self: ^Simulator, pos: rl.Vector2) {
|
|||||||
// Handles left click functionality
|
// Handles left click functionality
|
||||||
@(private="file")
|
@(private="file")
|
||||||
left_click_event :: proc(self: ^Simulator, pos: rl.Vector2) {
|
left_click_event :: proc(self: ^Simulator, pos: rl.Vector2) {
|
||||||
if road, ok := self.highlighted_road.?; ok && self.delete_mode {
|
if self.delete_mode {
|
||||||
delete_road(self, road)
|
if road, ok := self.highlighted_road.?; ok do delete_road(self, road)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
create_road(self, pos)
|
create_road(self, pos)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user