Transparent textboxes?

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
VeeVeeBee
Newbie
Posts: 1
Joined: Thu Jun 28, 2018 12:20 pm
Contact:

Transparent textboxes?

#1 Post by VeeVeeBee » Thu Jun 28, 2018 12:27 pm

I've been looking all around for anything about this topic but it seems as though everyone but me has figured it out. The only tutorials I found were obviously outdated and I combed through all the code for any semblance of a clue on how to get this to work, but nothing seems to change it. I've tried making the image itself transparent where I want it to be with no success. If I can't make just one part of it transparent, I'm also open to removing the decorations around the textbox (the bits I don't want to be transparent) and using some alternative methods to place them over or around it. The main and most important thing is I need the textbox in some way or another to be transparent before I can move on.

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Transparent textboxes?

#2 Post by kivik » Thu Jun 28, 2018 12:37 pm

I assume when you say textboxes, you mean the dialogue boxes? Their background is defined by the background property: https://www.renpy.org/doc/html/style_pr ... background

The background typically uses the Frame() to allow the edges and corners to maintain certain look whilst the window is stretched into different dimensions: https://www.renpy.org/doc/html/displayables.html#Frame

So the key to doing what you want is to create an image with the Frame()'s design in mind, and setting the correct background that corresponds to your image.

Have a read of the two links I posted, and if you're still struggling, show us your code and image and we can help you narrow it down.

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: Transparent textboxes?

#3 Post by Per K Grok » Tue Jul 03, 2018 6:14 am

VeeVeeBee wrote:
Thu Jun 28, 2018 12:27 pm
--- I've tried making the image itself transparent where I want it to be with no success. If I can't make just one part of it transparent, ---
You need a graphic editor with layers and the function to have different transparency for different layers (i.e. FireAlpaca or GIMP).

You then put the stuff you want to be semitransparent in one layer setting the transparency for that layer to what ever transparency degree you want. The stuff you want to be non-transparent you place in a layer on top of the first one. Save as png.

Post Reply

Who is online

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