mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-01-22 17:26:20 +01:00
Make UI for Mobile
This commit is contained in:
parent
e8b907fe1d
commit
8cd9fe8d24
1 changed files with 24 additions and 7 deletions
|
@ -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,6 +146,9 @@ screen cg_gallery(flag, __yoffset = 0, origin = 'CG'):
|
|||
mousewheel True
|
||||
draggable True
|
||||
pagekeys True
|
||||
if renpy.variant("small"): #TODO: slightly overspills
|
||||
xpos 490
|
||||
else:
|
||||
xpos 440
|
||||
|
||||
grid GALLERY_COLS gallery_rows:
|
||||
|
@ -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
|
||||
#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 ]
|
||||
] )
|
||||
|
|
Loading…
Reference in a new issue