forked from Cavemanon/SnootGame
slightly better panning for gallery items
This commit is contained in:
parent
dfc3a2263e
commit
81cd41ac9a
@ -61,7 +61,10 @@ init python:
|
||||
def addGalleryItem(imageName, ext, w, h, unlocked = False):
|
||||
g.button(imageName)
|
||||
g.image(imageName)
|
||||
g.transform(Pan((w - 1920, h - 1080), (0, h - 1080), 30.0)) #TODO: niceify
|
||||
|
||||
horizontalPan = Pan((w - 1920, h - 1080), (0, h - 1080), 30.0)
|
||||
verticalPan = Pan((w - 1920, h - 1080), (w - 1920, 0), 30.0)
|
||||
g.transform(horizontalPan if w > h else verticalPan) #TODO: niceify
|
||||
|
||||
if unlocked:
|
||||
g.unlock(imageName)
|
||||
|
Loading…
Reference in New Issue
Block a user