Solved: Adding a divider line without an image inside a 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
Chekhov
Regular
Posts: 113
Joined: Tue Jun 26, 2018 9:19 am
Projects: Pluton
Contact:

Solved: Adding a divider line without an image inside a frame.

#1 Post by Chekhov »

The frame has a natural border around it.

I would like to a same-colored divider line between, but besides using an image for it (and being less flexible in changing layout colors), I can't begin to find what I would use to achieve that. Any ideas?

Code: Select all

screen girl_stats():
    frame:
        xpos 10 ypos 10
        vbox:
            frame:
            	text "above"
            	#here dividerline
            	text "below"
Last edited by Chekhov on Thu May 02, 2019 9:14 am, edited 1 time in total.

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Adding a divider line without an image inside a frame.

#2 Post by Per K Grok »

Chekhov wrote: Tue Apr 30, 2019 12:51 pm The frame has a natural border around it.

I would like to a same-colored divider line between, but besides using an image for it (and being less flexible in changing layout colors), I can't begin to find what I would use to achieve that. Any ideas?

Code: Select all

screen girl_stats():
    frame:
        xpos 10 ypos 10
        vbox:
            frame:
            	text "above"
            	#here dividerline
            	text "below"
You could use a Solid like this

Code: Select all

screen girl_stats():
    frame:
        xpos 10 ypos 10
        vbox:
            text "above"
            fixed:
                xysize(100,2)
                add Solid("#F00")
            text "below"
Fixed and xysize defines an area and Solid fills it with the color of your choice.

User avatar
Chekhov
Regular
Posts: 113
Joined: Tue Jun 26, 2018 9:19 am
Projects: Pluton
Contact:

Re: Solved: Adding a divider line without an image inside a frame.

#3 Post by Chekhov »

That works, thanks.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Solved: Adding a divider line without an image inside a frame.

#4 Post by xavimat »

You can simplify the code using Solid with properties. Instead of creating a fixed and filling it:

Code: Select all

screen girl_stats():
    frame:
        xpos 10 ypos 10
        vbox:
            text "above"
            add Solid("#F00", xysize=(100,2))
            text "below"
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Post Reply

Who is online

Users browsing this forum: No registered users