[SOLVED] Is it possible to remove the border and background fill of a frame/vbox?

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] Is it possible to remove the border and background fill of a frame/vbox?

#1 Post by Chekhov »

I'm trying some new things out with screens and I'm doing something where I'd like images to overlap, as well as have a 100% transparent part.

Essentially I'm building a gameboard out of non-rectangular spaces that fit into each other.

Here's an example of two pieces fitting together. However, it also creates a border around the whole thing AND a black background. I've tried to see if I can remove it, but I can't find any way to do so.

Code: Select all

screen Gameboard():
    frame:
        xpos 300 ypos 400
        vbox:
            fixed:
                xysize(200,100)
                add "tile.png" xalign 0.0 yalign 0.0

            
            fixed:
                xysize(200,100)
                xoffset -30
                add "tile.png" xalign 0.0 yalign 0.0
Last edited by Chekhov on Thu Sep 12, 2019 2:48 pm, edited 1 time in total.

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: Is it possible to remove the border and background fill of a frame/vbox?

#2 Post by hell_oh_world »

Chekhov wrote: Thu Sep 12, 2019 5:27 am I'm trying some new things out with screens and I'm doing something where I'd like images to overlap, as well as have a 100% transparent part.

Essentially I'm building a gameboard out of non-rectangular spaces that fit into each other.

Here's an example of two pieces fitting together. However, it also creates a border around the whole thing AND a black background. I've tried to see if I can remove it, but I can't find any way to do so.

Code: Select all

screen Gameboard():
    frame:
        xpos 300 ypos 400
        vbox:
            fixed:
                xysize(200,100)
                add "tile.png" xalign 0.0 yalign 0.0

            
            fixed:
                xysize(200,100)
                xoffset -30
                add "tile.png" xalign 0.0 yalign 0.0
You need to override the default background image for frames.

Code: Select all

screen Gameboard():
    frame:
        xpos 300 ypos 400
        background None ## Set the background property to None
        vbox:
            fixed:
                xysize(200,100)
                add "tile.png" xalign 0.0 yalign 0.0

            
            fixed:
                xysize(200,100)
                xoffset -30
                add "tile.png" xalign 0.0 yalign 0.0

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Is it possible to remove the border and background fill of a frame/vbox?

#3 Post by trooper6 »

Also, you don’t need to use a frame at all.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

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

Re: Is it possible to remove the border and background fill of a frame/vbox?

#4 Post by Chekhov »

trooper6 wrote: Thu Sep 12, 2019 8:28 am Also, you don’t need to use a frame at all.
How would I set the position without a frame?

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

Re: Is it possible to remove the border and background fill of a frame/vbox?

#5 Post by Chekhov »

NVM! I figured it out. Just put the xpos and ypos after the vbox instead. Thanks!

Post Reply

Who is online

Users browsing this forum: Google [Bot]