forked from Cavemanon/SnootGame
slightly better panning for gallery items
This commit is contained in:
@ -61,7 +61,10 @@ init python:
|
|||||||
def addGalleryItem(imageName, ext, w, h, unlocked = False):
|
def addGalleryItem(imageName, ext, w, h, unlocked = False):
|
||||||
g.button(imageName)
|
g.button(imageName)
|
||||||
g.image(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:
|
if unlocked:
|
||||||
g.unlock(imageName)
|
g.unlock(imageName)
|
||||||
|
Reference in New Issue
Block a user