aboutsummaryrefslogtreecommitdiff
path: root/game/src/GameSession/MapView.gd
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-05-10 22:53:56 +0200
committer GitHub <noreply@github.com>2023-05-10 22:53:56 +0200
commitbd08b517ed8e3a42de981b7173a99fa362134021 (patch)
tree2a9a0816b571946c7d9fb00b49fc74203101c3ab /game/src/GameSession/MapView.gd
parent088a6ada0468f0bf73e8b9a5bb92e59ac2739fae (diff)
parent8a59cb15b58f512f27f01a71248feef4777e3a41 (diff)
Merge pull request #109 from Nemrav/gui-scaling
Add UI scaling through menu option
Diffstat (limited to 'game/src/GameSession/MapView.gd')
-rw-r--r--game/src/GameSession/MapView.gd2
1 files changed, 1 insertions, 1 deletions
diff --git a/game/src/GameSession/MapView.gd b/game/src/GameSession/MapView.gd
index dc62594..c3b5cbb 100644
--- a/game/src/GameSession/MapView.gd
+++ b/game/src/GameSession/MapView.gd
@@ -175,7 +175,7 @@ func _movement_process(delta : float) -> void:
func _edge_scrolling_vector() -> Vector2:
if not _mouse_over_viewport:
return Vector2()
- var mouse_vector := _mouse_pos_viewport / _viewport_dims - Vector2(0.5, 0.5)
+ var mouse_vector := _mouse_pos_viewport * GuiScale.get_current_guiscale() / _viewport_dims - Vector2(0.5, 0.5)
if abs(mouse_vector.x) < 0.5 - _edge_move_threshold and abs(mouse_vector.y) < 0.5 - _edge_move_threshold:
mouse_vector *= 0
return mouse_vector * _edge_move_speed