[SOLVED] Custom frame border

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
Kinmoku
Miko-Class Veteran
Posts: 560
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: Love IRL, Memories
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

[SOLVED] Custom frame border

#1 Post by Kinmoku » Thu Jul 23, 2020 12:50 pm

Hi all,

I'm trying to create a custom frame but can't seem to find any documentation or posts on how to do this.

Right now, my screen is using the default one, but i want to use another style. Any attempts I've tried haven't worked :(

I'd also like to add padding/ spacing to this custom frame if possible, too.
Last edited by Kinmoku on Fri Jul 24, 2020 3:08 am, edited 1 time in total.

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Custom frame border

#2 Post by Remix » Thu Jul 23, 2020 1:10 pm

Not really a tutorial... Does show how to work out the borders and content padding though...

https://github.com/RenpyRemix/speech-bu ... ing-frames
Frameworks & Scriptlets:

User avatar
Kinmoku
Miko-Class Veteran
Posts: 560
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: Love IRL, Memories
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

Re: Custom frame border

#3 Post by Kinmoku » Fri Jul 24, 2020 3:08 am

Remix wrote:
Thu Jul 23, 2020 1:10 pm
Not really a tutorial... Does show how to work out the borders and content padding though...

https://github.com/RenpyRemix/speech-bu ... ing-frames
Thank you so much! This is exactly what I needed :)

My code, in case it helps anyone:

Code: Select all

screen chat_entry(entry):
    style_prefix "chat_style"

    frame:
        has hbox:
            spacing 40
            # etc
            
style chat_style_frame:
    background Frame(
        theme_image("frame"), 
        left = Borders(6, 6, 6, 6)
        )

    left_padding 20
    top_padding 20
    right_padding 20
    bottom_padding 20

Post Reply

Who is online

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