Modifying image Gallery for use with movies
Posted: Mon Oct 10, 2022 11:44 pm
Hey, all! I recently used the image/cg gallery function for use with videos. https://www.renpy.org/doc/html/rooms.html
The buttons will play the video as usual, but I want to find a way to mute the music/all other sounds whenever a movie is playing, since it has it's own music. Perhaps, is there a way to do that, or run functions whenever a button is clicked? Thanks in advance!
Code: Select all
g_video = Gallery()
g_video.button("bagelpoutine")
g_video.image("bagelpoutine")
g_video.button("opening")
g_video.image("opening")
Code: Select all
image bagelpoutine = Movie(size=(1920, 1080), play="movie/bagelpoutine.webm")
image opening = Movie(size=(1920, 1080), play="movie/opening.webm")
screen video_gallery():
tag menu
## This use statement includes the extras_menu screen inside this one.
use extras_menu("Videos"):
vpgrid:
cols 2
spacing 23
draggable True
mousewheel True
xfill False
yfill False
scrollbars "vertical"
right_margin 60
ypos 4
xpos 100
## Call make_button to show a particular button.
# add g_video.make_button("background", "bg_button")
add g_video.make_button("bagelpoutine", "montreal1_button", xalign=0.5, yalign=0.5, hover_border="gui/button/bg_gallery/button1_h.png")
add g_video.make_button("opening", "windsorstation_button", xalign=0.5, yalign=0.5, hover_border="gui/button/bg_gallery/button2_h.png")