How to create a second frame?

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
User avatar
deltadidirac
Regular
Posts: 56
Joined: Fri Nov 30, 2018 5:00 am
Projects: Slip Over Time
Deviantart: Deltadidirac67
Location: Europe
Contact:

How to create a second frame?

#1 Post by deltadidirac » Sat Jun 01, 2019 11:11 am

Hi all,

If I would like to create a second different frame, can I do this?

this is the standard code you can find in the screen file of any game:

Code: Select all

style frame:
    padding gui.frame_borders.padding
    background Frame("gui/frame.png", gui.frame_borders, tile=gui.frame_tile)
if I want to create another style frame, simply can I give a name on another one in this simply way,
or I must also modify something else?

Code: Select all

style frame 2:  ## or style frame_2:
    padding gui.frame_borders.padding
    background Frame("gui/frame2.png", gui.frame_borders, tile=gui.frame_tile)
If the example i did before is correct, to call this personal frame, must I simply write in this way?

Code: Select all

screen bla_bla_bla:
            frame2:   ## (or frame_2)
                     add "my_ backgound"
                     vbox:
                           text "bla bla bla"
                           etc....
                           etc....
thanks and see you

User avatar
Alex
Lemma-Class Veteran
Posts: 2215
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: How to create a second frame?

#2 Post by Alex » Sat Jun 01, 2019 1:33 pm

Try

Code: Select all

screen bla_bla_bla:
    frame:
        style "frame_2"
        text "?!"

User avatar
deltadidirac
Regular
Posts: 56
Joined: Fri Nov 30, 2018 5:00 am
Projects: Slip Over Time
Deviantart: Deltadidirac67
Location: Europe
Contact:

Re: How to create a second frame?

#3 Post by deltadidirac » Sun Jun 02, 2019 2:05 pm

Thanx Alex

Post Reply

Who is online

Users browsing this forum: Bing [Bot]