aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/GameSession/MapControlPanel/Minimap.gd
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2024-05-19 00:10:48 +0200
committer GitHub <noreply@github.com>2024-05-19 00:10:48 +0200
commitfb74bc86d194b50cb3277c7f367a5e5a0316c948 (patch)
tree50c95d72c3a5435372225143b33531240907bb74 /game/src/Game/GameSession/MapControlPanel/Minimap.gd
parent963a4a84a0cb6990f4542eafa0b8a82cfc032834 (diff)
parent67f20dbe438a480e9de8bed4acf5266e407a013b (diff)
Merge pull request #231 from Spartan322/fix/map-behavior
Fix Minimap click doing nothing
Diffstat (limited to 'game/src/Game/GameSession/MapControlPanel/Minimap.gd')
-rw-r--r--game/src/Game/GameSession/MapControlPanel/Minimap.gd4
1 files changed, 2 insertions, 2 deletions
diff --git a/game/src/Game/GameSession/MapControlPanel/Minimap.gd b/game/src/Game/GameSession/MapControlPanel/Minimap.gd
index ce27302..7cf1794 100644
--- a/game/src/Game/GameSession/MapControlPanel/Minimap.gd
+++ b/game/src/Game/GameSession/MapControlPanel/Minimap.gd
@@ -32,8 +32,8 @@ func _draw() -> void:
# REQUIREMENTS
# * SS-81
# * UIFUN-127
-func _unhandled_input(event : InputEvent) -> void:
- if event is InputEventMouse and Input.is_action_pressed(_action_click):
+func _gui_input(event : InputEvent) -> void:
+ if 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)