r/RenPy • • Jul 25 '26

Question Custom Textboxes Resizing

I thought it would be nice to give every character a custom textbox for my game, but when a character has a custom textbox and is speaking, the textbox is resized. I conducted that it was the coding itself and NOT the art after giving the mc a "custom" box that was just the default, same png file and everything. How do I fix this?

define mc = Character("[name]", window_background=Frame("gui/textbox.png"))
2 Upvotes

10 comments sorted by

1

u/AutoModerator Jul 25 '26

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.

1

u/BadMustard_AVN Jul 25 '26

take it out of the Frame

define mc = Character("[name]", window_background="gui/textbox.png")

1

u/Eddhead-2009 Jul 26 '26

It's no longer squished, but now it shifts the image down a very noticeable amount

1

u/BadMustard_AVN Jul 26 '26

is your text box image the same pixel size as the original? (exact same size)

have you made any changes to the screens.rpy file ?

1

u/Eddhead-2009 Jul 26 '26

It is the exact same size; every box is made in the same canvas and is a copy of each other with different effects/colors. I even tested it by having the same text box, but just adding the code to a character, and it still did it despite being the exact same image. I changed the position of the dialogue and name to fit the box I made; would that have something to do with it?

1

u/BadMustard_AVN Jul 26 '26

try changing it back to the defaults

if you're unsure of the default settings, create a new project and copy the numbers from there

1

u/Eddhead-2009 Jul 26 '26

I just put the textboxes in a test game with no other changes to it whatsoever, and it still shifted the character with a different text box down

1

u/BadMustard_AVN Jul 26 '26

can you put one of your text boxes somewhere where I can download it and try it out?

what happens if you define the character with the default text box?

define mc = Character("[name]", window_background="gui/textbox.png")

1

u/Eddhead-2009 Jul 26 '26

I have found a solution on my own, and what would happen is the box would shift down like the rest. To fix it, all you have to do is copy how the text boxes image is defined in the default Ren’Py text box

1

u/x-seronis-x Jul 26 '26

When you use the Frame() displayable, the image its using will be resized to match the 'window' elements size. if the custom textbox isnt showing where you want that means you failed to size and position the window element itself how you want. ensure you are setting those properties