Centering the text during user input? [nevermind!]

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
User avatar
euphorics
Regular
Posts: 44
Joined: Wed Aug 18, 2010 7:51 pm
Tumblr: niraniranegi
Deviantart: euphorics
Location: raiding your fridge
Contact:

Centering the text during user input? [nevermind!]

#1 Post by euphorics »

Sorry if this is a really simple, easy question! ;_; I've been reading through the tutorials for Ren'Py all day, but still can't seem to get the hang of it.

Basically, for the beginning of my game, I want text to first appear in the center of the screen, going, "Welcome to -insert game's name here-! Blahblahblah.."
Then, "If you don't mind telling us, what is your name?" with the $ name = renpy.input code I copied.
I centered the "Welcome.." part with 'centered' before the quotes, but wanted to know if there was a way to center the part that comes after? =x Since it looks a bit strange to have text in the center of the screen, then suddenly see it jump to the lower left-hand corner.

8D;; Thanks in advance for any suggestions!
Last edited by euphorics on Tue Aug 24, 2010 7:47 pm, edited 1 time in total.

shahab96
Veteran
Posts: 228
Joined: Mon May 24, 2010 5:40 am
Location: Lahore, Pakistan
Contact:

Re: Centering the text during user input?

#2 Post by shahab96 »

how about using a screen statement?
try this...

Code: Select all

 
screen name_screen:
     
     python:
          name = ""

     frame:
          xpos 0.5
          ypos 0.5

          $ name = input default "Default name"
and use the call screen statement to call it?
The true measure of a man is what he does with his power.

User avatar
euphorics
Regular
Posts: 44
Joined: Wed Aug 18, 2010 7:51 pm
Tumblr: niraniranegi
Deviantart: euphorics
Location: raiding your fridge
Contact:

Re: Centering the text during user input?

#3 Post by euphorics »

Aaack, sorry for the late reply. >< Thank you so much for the advice, though!
Although, ahem, due to my complete lack of programming skills, I can't seem to get it to work. @__@; It keeps saying that there's something wrong with the line where I've entered "screen name_screen:"?

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


On line 14 of C:\Users\Yvonne\Documents\Dropbox\Le Beau Reve\Becoming an Idol/game/script.rpy: expected statement.
screen name_screen:
       ^
And here's what I have so far:

Code: Select all

label start:
screen name_screen:
    
     python:
          name = ""

     frame:
          xpos 0.5
          ypos 0.5

          $ name = input default "Default name"   
    
     centered "Welcome to {b}Becoming an Idol{/b}! In just a few more seconds, you will be immersed in the world of a
     not-so-average high school girl. Before we start, however, we just need one more thing to make your
     experience complete..."
     
     call screen name_screen

     "Well then, pleased to meet you, %(name)s. Enjoy the game!"
    
     scene title with slowDissolve

Aha, ignore the horrible game title and intro. XD;; But, yeah, any help would be hugely appreciated! Again, sorry if this is just a really stupid question. >>;

User avatar
euphorics
Regular
Posts: 44
Joined: Wed Aug 18, 2010 7:51 pm
Tumblr: niraniranegi
Deviantart: euphorics
Location: raiding your fridge
Contact:

Re: Centering the text during user input?

#4 Post by euphorics »

Actually, I realized that I don't know how to customize the screen with "What might your name be?" or something along those lines either. XD;;
So, I think I'll just leave out the name input option or just move it all to the bottom of the screen; should be fine.

Sorry for the trouble, and thanks again! :D
bring on the shotas
tumblr devart

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot]