Disable Zoom

This commit is contained in:
Nutbuster 2021-07-19 19:06:41 +10:00
parent 914dd89b02
commit 795a58e5ca

View File

@ -1,6 +1,7 @@
init python:
# CONST PARAMS
ALLOW_ZOOM = False
GALLERY_COLS = 3
PREFERRED_WIDTH = 432 #px (1920 * 0.225)
PREFERRED_HEIGHT = 243 #px (1080 * 0.225)
@ -249,12 +250,13 @@ screen view_image(item, _origin, zoom = zoom_arr.index(1.0), flag='a'):
key "game_menu" action _origin
# mousewheel & insert+delete
if zoom < len(zoom_arr)-1: #zoom in
key 'mousedown_4' action zoom_a_f
key 'K_INSERT' action zoom_a_f
if zoom > 0: #and (item['wh'][0] <= 1920 or item['wh'][1] <= 1080):
key 'mousedown_5' action zoom_b_f
key 'K_DELETE' action zoom_b_f
if (ALLOW_ZOOM):
if zoom < len(zoom_arr)-1: #zoom in
key 'mousedown_4' action zoom_a_f
key 'K_INSERT' action zoom_a_f
if zoom > 0: #and (item['wh'][0] <= 1920 or item['wh'][1] <= 1080):
key 'mousedown_5' action zoom_b_f
key 'K_DELETE' action zoom_b_f
viewport id "vie":
#Ren'Py isn't smart enough to not edgescroll while pressed,
@ -271,7 +273,7 @@ screen view_image(item, _origin, zoom = zoom_arr.index(1.0), flag='a'):
#Reuse quick buttons, Ren'Py handles touch input lazy, it doesn't have
#double finger pinch zoom, it translates taps as mouse events - have to use
#buttons
if renpy.variant("small"):
if (ALLOW_ZOOM) and renpy.variant("small"):
hbox:
style_prefix "quick"
xalign 0.5