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