How can I make image appear in the middle of the 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
gseek
Newbie
Posts: 9
Joined: Thu Mar 07, 2019 8:43 pm
Contact:

How can I make image appear in the middle of the screen?

#1 Post by gseek »

I'm a newb at renpy and I want to display a picture of a painting in the middle of the screen. When I say show at center its underneath the dialogue box, I want to be above the dialogue box so the player can read and see the painting. Is there a command that will allow me to that?

User avatar
XxrenxX
Veteran
Posts: 267
Joined: Tue Oct 02, 2012 2:40 am
Projects: Chasing
Deviantart: bara-ettie
Location: Canada
Contact:

Re: How can I make image appear in the middle of the screen?

#2 Post by XxrenxX »

Idk if there's a string to specifically show it above the window but there is a hide/show for it that I've used a few time.
You can raise the pause higher so it gives the player more time. If they click it will continue so they aren't forced to wait for that amount of time either.

Code: Select all

window hide #hide the dialogue box
show painting 
pause 60.0 #time until dialogue reappears or ctc
window show

philat
Eileen-Class Veteran
Posts: 1900
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: How can I make image appear in the middle of the screen?

#3 Post by philat »

If I understand you correctly, I think you're looking for at truecenter rather than at center.

gseek
Newbie
Posts: 9
Joined: Thu Mar 07, 2019 8:43 pm
Contact:

Re: How can I make image appear in the middle of the screen?

#4 Post by gseek »

XxrenxX wrote: Mon Apr 08, 2019 10:22 pm Idk if there's a string to specifically show it above the window but there is a hide/show for it that I've used a few time.
You can raise the pause higher so it gives the player more time. If they click it will continue so they aren't forced to wait for that amount of time either.

Code: Select all

window hide #hide the dialogue box
show painting 
pause 60.0 #time until dialogue reappears or ctc
window show
I think I will add this in later!
Thank you!

gseek
Newbie
Posts: 9
Joined: Thu Mar 07, 2019 8:43 pm
Contact:

Re: How can I make image appear in the middle of the screen?

#5 Post by gseek »

philat wrote: Wed Apr 10, 2019 11:41 am If I understand you correctly, I think you're looking for at truecenter rather than at center.
Yes! This worked for the picture. Thank you!

Post Reply

Who is online

Users browsing this forum: Google [Bot]