From 67f20dbe438a480e9de8bed4acf5266e407a013b Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Tue, 14 May 2024 23:04:25 -0400 Subject: Fix Minimap click doing nothing Add MapView queue_province_hover_update Makes province hover much more reliable Fix edge scrolling continuing when mouse leaves window Add province hover reset when mouse leaves the window Change _edge_move_threshold to 0.025 --- game/src/Game/GameSession/MapControlPanel/Minimap.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'game/src/Game/GameSession/MapControlPanel') 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) -- cgit v1.2.3-56-ga3b1