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.
newbiemate
Regular
Posts: 85 Joined: Tue Dec 19, 2017 1:36 pm
Contact:
#1
Post
by newbiemate » Sat Apr 27, 2019 10:48 pm
I have a text title and an image:
Code: Select all
fixed:
xpos 100
ypos 200
vbox:
text "The Book of all the Things!" xanchor 0.5 anchor 0.5 xmaximum 80
add "images/book.png" xanchor 0.5 yanchor 0.5
This would display the words like this:
But I would like all the words, especially the words wrapped, to be centered. Something like this:
Is there a way to do that?
Per K Grok
Miko-Class Veteran
Posts: 882 Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:
#2
Post
by Per K Grok » Sun Apr 28, 2019 12:57 am
newbiemate wrote: ↑ Sat Apr 27, 2019 10:48 pm
I have a text title and an image:
Code: Select all
fixed:
xpos 100
ypos 200
vbox:
text "The Book of all the Things!" xanchor 0.5 anchor 0.5 xmaximum 80
add "images/book.png" xanchor 0.5 yanchor 0.5
This would display the words like this:
But I would like all the words, especially the words wrapped, to be centered. Something like this:
Is there a way to do that?
text_align 0.5
Alex
Lemma-Class Veteran
Posts: 3094 Joined: Fri Dec 11, 2009 5:25 pm
Contact:
#3
Post
by Alex » Sun Apr 28, 2019 4:24 am
newbiemate wrote: ↑ Sat Apr 27, 2019 10:48 pm
Code: Select all
fixed:
xpos 100
ypos 200
vbox:
text "The Book of all the Things!" xanchor 0.5 anchor 0.5 xmaximum 80
add "images/book.png" xanchor 0.5 yanchor 0.5
Try to get rid of xmaximum...
newbiemate
Regular
Posts: 85 Joined: Tue Dec 19, 2017 1:36 pm
Contact:
#4
Post
by newbiemate » Fri May 03, 2019 12:17 am
Thanks!! text_align 0.5 works!
xavimat
Eileen-Class Veteran
Posts: 1461 Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:
#5
Post
by xavimat » Sat May 04, 2019 10:48 am
You can use a little know text style property: layout "subtitle"
https://www.renpy.org/doc/html/style_pr ... rty-layout