diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-05-15 05:04:25 +0200 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-05-19 00:03:40 +0200 |
commit | 67f20dbe438a480e9de8bed4acf5266e407a013b (patch) | |
tree | 3ea2aca648d2780895dc12a90021db204bb9f67f /game/src/Game/GameSession/MapControlPanel/Minimap.gd | |
parent | bfccdb87d66304604ad018037db1581746646bfa (diff) |
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
Diffstat (limited to 'game/src/Game/GameSession/MapControlPanel/Minimap.gd')
-rw-r--r-- | game/src/Game/GameSession/MapControlPanel/Minimap.gd | 4 |
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) |