diff --git a/game/src/cg_gallery.rpy b/game/src/cg_gallery.rpy index f0475e9..e9baf70 100644 --- a/game/src/cg_gallery.rpy +++ b/game/src/cg_gallery.rpy @@ -113,6 +113,7 @@ screen view_image_a(fn, _origin, zoom): screen view_image_b(fn, _origin, zoom): tag menu use view_image(fn, _origin, zoom, 'a') + """ CG Gallery screen - A screen that shows the image gallery Basically Gallery Object has terrible defaults, so I just wrote my own stuff @@ -145,7 +146,10 @@ screen cg_gallery(flag, __yoffset = 0, origin = 'CG'): mousewheel True draggable True pagekeys True - xpos 440 + if renpy.variant("small"): #TODO: slightly overspills + xpos 490 + else: + xpos 440 grid GALLERY_COLS gallery_rows: for item in gallery_items: @@ -169,10 +173,6 @@ screen cg_gallery(flag, __yoffset = 0, origin = 'CG'): spacing gui.navigation_spacing for cp in CG_PATHS: -#define gui.button_text_idle_color = gui.idle_color -#define gui.button_text_hover_color = gui.hover_color -#define gui.button_text_selected_color = gui.selected_color -#define gui.button_text_insensitive_color = gui.insensitive_color if cp['name'] == origin: textbutton _(cp['name']) text_color gui.selected_color else: @@ -212,6 +212,7 @@ screen flag_button(item, yoffset, origin): text "? ? ?" xalign 0.5 add NOT_UNLOCKED_COVER + """ view_image, Loads the image in fullscreen with viewport control. """ @@ -236,9 +237,25 @@ screen view_image(fn, _origin, zoom=0.0, flag='a'): key 'K_DELETE' action zoom_b_f viewport id "vie": - #Ren'Py is isn't smart enough to not edgescroll while pressed, so we'll have to disable this for mobile - edgescroll (300, 1800) + #Ren'Py isn't smart enough to not edgescroll while pressed, + #so we'll have to disable this for mobile + if renpy.variant("pc"): + edgescroll (300, 1800) draggable True arrowkeys True pagekeys True add fn zoom zoom_arr[zoom] anchor (0.5, 0.5) + +#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"): + hbox: + style_prefix "quick" + xalign 0.5 + yalign 0.975 + use quick_buttons("gui/button/uioptionbuttons/template_idle.png", \ + [ + [ "+", zoom_a_f ], + [ "-", zoom_b_f ] + ] )