diff options
author | Hop311 <hop3114@gmail.com> | 2023-04-13 20:37:31 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-04-13 20:37:31 +0200 |
commit | 66e63d41a109d85b10396e8a2dd934a829cc57fe (patch) | |
tree | dfa1b40b6f4f555b9f25e5ddc3abfa46f7728a4b /game/src/GameSession/Minimap.gd | |
parent | 7523c42190c9211ea65db3b00b9476487c61052a (diff) |
Small fixes
Diffstat (limited to 'game/src/GameSession/Minimap.gd')
-rw-r--r-- | game/src/GameSession/Minimap.gd | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/game/src/GameSession/Minimap.gd b/game/src/GameSession/Minimap.gd index d904b3d..25c7cac 100644 --- a/game/src/GameSession/Minimap.gd +++ b/game/src/GameSession/Minimap.gd @@ -17,11 +17,7 @@ func _draw() -> void: # * SS-81 # * UIFUN-127 func _unhandled_input(event : InputEvent): - if event is InputEventMouseMotion and Input.is_action_pressed(_action_click): - var pos_clicked := get_local_mouse_position() / size - Vector2(0.5, 0.5) - if abs(pos_clicked.x) < 0.5 and abs(pos_clicked.y) < 0.5: - minimap_clicked.emit(pos_clicked) - if event != InputEventMouseMotion and Input.is_action_pressed(_action_click): + if event is InputEventMouse and Input.is_action_pressed(_action_click): var pos_clicked := get_local_mouse_position() / size - Vector2(0.5, 0.5) if abs(pos_clicked.x) < 0.5 and abs(pos_clicked.y) < 0.5: minimap_clicked.emit(pos_clicked) |