[Solved] background image in screen

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
dellcartoons
Regular
Posts: 29
Joined: Sat Jul 13, 2019 3:35 pm
Contact:

[Solved] background image in screen

#1 Post by dellcartoons »

I want to set up a small screen w/ a background image, and text written over the image. I tried "add", but that just pushes the text below the image

Additionally, I would like this background image to change, depending on certain variables

Thank you
Last edited by dellcartoons on Sat Sep 21, 2019 6:17 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: background image in screen

#2 Post by hell_oh_world »

dellcartoons wrote: Sat Sep 21, 2019 10:18 am I want to set up a small screen w/ a background image, and text written over the image. I tried "add", but that just pushes the text below the image

Additionally, I would like this background image to change, depending on certain variables

Thank you
if your text is in a vbox container, it will push any superseding elements. So that's prolly the reason why it pushes your text below.

Code: Select all

screen sample_screen:
	vbox:
		add "img.png"
	text "sample" ## The text should be outside the vbox or similar container such as hbox if you want it not to be pushed down.

dellcartoons
Regular
Posts: 29
Joined: Sat Jul 13, 2019 3:35 pm
Contact:

Re: background image in screen

#3 Post by dellcartoons »

Thank you

I actually had to put the text in a second vbox to get it to work the way I needed, but now it works. Thank you

Now I just have to make sure it's readable. But that's a design problem, not a code problem

Post Reply

Who is online

Users browsing this forum: No registered users