Buttons in front of a video?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Buttons in front of a video?

#1 Post by Zherot »

Hey, i have been messing around with videos and i made an example:

The player goes to the livingroom and decides to watch tv, then a menu pops and it alows him to select between channel 1 and channel 2 or stop watching.

Now, what i have works, the problem is that the video shows itself infront of the buttons(channel 1,channel 2 and stop watching tv), you can still click them if you know where they are but the ideal would be to show them infront of the video.

Also for some reason even though i put this "add Movie(size=(1900, 1080))" the videos are still not covering the entire screen somehow and if i increase the size more they still not cover the entire screen.

This is what i have:

Code: Select all


screen livingroom_menu:
    vbox:
        xalign 1.0
        yalign 0.5
        textbutton "Turn on TV" action Jump("tv_menu")


screen tv_menu:
    vbox:
        xalign 0.0
        yalign 0.5
        textbutton "Channel 1" action Jump("channel1")
        textbutton "Channel 2" action Jump("channel2")
        textbutton "Stop Watching TV" action Hide("tv_menu"), Jump("livingroom")
screen tv_channel1:
    add Movie(size=(1900, 1080))
    on "show" action Play("movie", "invoker1.avi", loop=True)
    on "hide" action Stop("movie")
    on "replaced" action Stop("movie")
screen tv_channel2:
    add Movie(size=(1900, 1080))
    on "show" action Play("movie", "invoker2.avi", loop=True)
    on "hide" action Stop("movie")
    on "replaced" action Stop("movie")


label livingroom:
    scene livingroom with fade
    call screen livingroom_menu

label tv_menu:
scene livingroom with fade
call screen tv_menu

label channel1:
show screen tv_menu
call screen tv_channel1

label channel2:
show screen tv_menu
call screen tv_channel2


return
I'm open to any suggestions, probably this can be done in a better/more efficient way but since i am pretty new to Renpy i can't tell this is the best solution i could come off with.

Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Re: Buttons in front of a video?

#2 Post by Zherot »

Anyone?

Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Re: Buttons in front of a video?

#3 Post by Zherot »

Please...

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: Buttons in front of a video?

#4 Post by IrinaLazareva »

Code: Select all

screen tv_menu:
    zorder 2                            # <<<<<  add this line
    vbox:
        xalign 0.0
        yalign 0.5
        textbutton "Channel 1" action Jump("channel1")
        textbutton "Channel 2" action Jump("channel2")
        textbutton "Stop Watching TV" action Hide("tv_menu"), Jump("livingroom")

https://www.renpy.org/doc/html/screens. ... -statement

Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Re: Buttons in front of a video?

#5 Post by Zherot »

IrinaLazareva wrote: Tue Aug 15, 2017 2:16 pm

Code: Select all

screen tv_menu:
    zorder 2                            # <<<<<  add this line
    vbox:
        xalign 0.0
        yalign 0.5
        textbutton "Channel 1" action Jump("channel1")
        textbutton "Channel 2" action Jump("channel2")
        textbutton "Stop Watching TV" action Hide("tv_menu"), Jump("livingroom")

https://www.renpy.org/doc/html/screens. ... -statement
Thank you for the help i really appreciate it, I will read what you linked.

Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Re: Buttons in front of a video?

#6 Post by Zherot »

Well i think this problem is solved, thanks to Irina i could solve the problem of the screen and i messed around with the size and i had to make it a bit larger so it could fit perfectly on the screen.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]