diff options
author | Nemrav <> | 2023-05-10 02:08:41 +0200 |
---|---|---|
committer | Nemrav <> | 2023-05-10 02:08:41 +0200 |
commit | df97602c6d7335d0a8c83cddefef8716e47c37a0 (patch) | |
tree | 4596426fc3b6723438fa1c4c24455bbb076b9755 /game/src/GameSession/MapView.gd | |
parent | 088a6ada0468f0bf73e8b9a5bb92e59ac2739fae (diff) |
Add UI scaling through menu option
Diffstat (limited to 'game/src/GameSession/MapView.gd')
-rw-r--r-- | game/src/GameSession/MapView.gd | 2 |
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 |