forked from Cavemanon/SnootGame
Replay animations
This commit is contained in:
@ -2547,3 +2547,7 @@ label chapter_5:
|
|||||||
"..."
|
"..."
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
label fang_movie:
|
||||||
|
scene fang tail with fade
|
||||||
|
""
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
init python:
|
init python:
|
||||||
|
|
||||||
# CONST PARAMS
|
# CONST PARAMS
|
||||||
GALLERY_COLS = 3
|
GALLERY_COLS = 3
|
||||||
PREFERRED_WIDTH = 432 #px (1920 * 0.225)
|
PREFERRED_WIDTH = 432 #px (1920 * 0.225)
|
||||||
@ -46,12 +47,14 @@ init python:
|
|||||||
|
|
||||||
list_img = renpy.list_images()
|
list_img = renpy.list_images()
|
||||||
|
|
||||||
|
#if ext is "webm":
|
||||||
# Add each image to the gallery
|
# Add each image to the gallery
|
||||||
for str in list_img:
|
for str in list_img:
|
||||||
for cp in CG_PATHS:
|
for cp in CG_PATHS:
|
||||||
for ext in ACCEPTED_EXTENSIONS:
|
for ext in ACCEPTED_EXTENSIONS:
|
||||||
path = cp['path']
|
path = cp['path']
|
||||||
_str = path+str+"."+ext
|
_str = path+str+"."+ext
|
||||||
|
|
||||||
if renpy.loadable(_str): #brute force
|
if renpy.loadable(_str): #brute force
|
||||||
image = renpy.image_size(Image(_str))
|
image = renpy.image_size(Image(_str))
|
||||||
|
|
||||||
@ -67,6 +70,16 @@ init python:
|
|||||||
# Call to loading the gallery
|
# Call to loading the gallery
|
||||||
loadGallery()
|
loadGallery()
|
||||||
|
|
||||||
|
# hard code the webm because renpy is really dumb and doesn't add Movies properly until much later
|
||||||
|
fang_webm = 'images/animations/fang tail.webm'
|
||||||
|
gallery_dic['Animations'] = [{
|
||||||
|
"item": 'fang tail',
|
||||||
|
"fn": fang_webm,
|
||||||
|
"cg": Movie(fang_webm),#cg(_str, 'webm', 1920),
|
||||||
|
"ext": 'webm',
|
||||||
|
"wh": [1920, 1080]
|
||||||
|
}]
|
||||||
|
|
||||||
#for zooming in and out
|
#for zooming in and out
|
||||||
zoom_arr = [0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.0, 1.125, 1.25, 1.5, 1.75, 2.0]
|
zoom_arr = [0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.0, 1.125, 1.25, 1.5, 1.75, 2.0]
|
||||||
|
|
||||||
@ -195,7 +208,10 @@ screen flag_button(item, yoffset, origin):
|
|||||||
|
|
||||||
if flag:
|
if flag:
|
||||||
button:
|
button:
|
||||||
action ShowMenu('view_image_a', item, ShowMenu('cg_gallery_0', yoffset, origin))
|
if item['ext'] == "webm":
|
||||||
|
action Replay('fang_movie')#ShowMenu('view_movie', item, ShowMenu('cg_gallery_0', yoffset, origin))
|
||||||
|
else:
|
||||||
|
action ShowMenu('view_image_a', item, ShowMenu('cg_gallery_0', yoffset, origin))
|
||||||
xcenter 0.5 ycenter 0.5
|
xcenter 0.5 ycenter 0.5
|
||||||
padding (1,0,1,2)
|
padding (1,0,1,2)
|
||||||
vbox:
|
vbox:
|
||||||
@ -209,6 +225,16 @@ screen flag_button(item, yoffset, origin):
|
|||||||
add NOT_UNLOCKED_COVER
|
add NOT_UNLOCKED_COVER
|
||||||
|
|
||||||
|
|
||||||
|
screen view_movie(item, _origin):
|
||||||
|
tag menu
|
||||||
|
key "game_menu" action _origin
|
||||||
|
python:
|
||||||
|
renpy.movie_cutscene(item['item'], None, -1)
|
||||||
|
frame:
|
||||||
|
pass
|
||||||
|
#scene fang tail with fade
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
view_image, Loads the image in fullscreen with viewport control.
|
view_image, Loads the image in fullscreen with viewport control.
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user