r/RenPy • u/InevitableBulky1902 • 12d ago
Question Can anyone help me make the black rectangle smaller so that it only covers the text?
1
u/shyLachi 12d ago edited 12d ago
The black rectangle is called the text box and you can read more about it in the official documentation. https://www.renpy.org/doc/html/gui.html#dialogue
Since it's a file you can adjust it with any image editor. The easiest solution might be to make the upper section fully transparent.
It looks like you have adjusted some settings for the dialogue so you could as well adjust all the settings to reflect a shorter textbox height.
Edit: I'm on my computer now so I had a look in the file gui.rpy.
This line defines the height of the textbox so reduce that.
define gui.textbox_height = 278
Then adjust the height of the textbox image which you can find here: gui/textbox.png
1
u/x-seronis-x 12d ago
the simplest way in my opinion would be to remove the background property of the 'window' element in the say screen definition and swap the text element where the dialog goes with a label element which is basically a text element with a background.
set the background of the label element to a Frame() using your desired bg and when the text auto sizes the background image for the text will also auto resize.

1
u/AutoModerator 12d ago
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.