mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Fix integer camera zoom going smaller than 100%
This commit is contained in:
parent
645e09701e
commit
8414f3deaf
|
@ -117,9 +117,12 @@ func zoom_camera(dir: int) -> void:
|
|||
var zoom_margin := zoom * dir / 10
|
||||
if Global.integer_zoom:
|
||||
zoom_margin = (Vector2.ONE * dir).floor()
|
||||
if zoom + zoom_margin < zoom_in_max:
|
||||
if zoom + zoom_margin <= zoom_in_max:
|
||||
zoom += zoom_margin
|
||||
if zoom < zoom_out_max:
|
||||
if Global.integer_zoom:
|
||||
zoom = Vector2.ONE
|
||||
else:
|
||||
zoom = zoom_out_max
|
||||
offset = (
|
||||
offset
|
||||
|
|
Loading…
Reference in a new issue