- Jun 10, 2017
- 11,129
- 16,620
This is better for the style creation, but :Maybe like this:
Python:style mybigtext: size 42 bold True
Ren'py do not make its style propagate, so it have to be applied directly to theNow I'm not sure if the style should be applied inside or outside the vbox
text
.But there's a way to still simplify this, the
You must be registered to see the links
screen property. It works by defining the prefix that will be used to build the name of the style to apply to each screen statements inside the actual block ; the said name being prefix
_statement
. Therefore, to apply the same style to all the text
screen statements inside a vbox
:
Python:
# The style need to apply to /text/.
style mybig_text:
size 42
bold True
screen two_big_lines:
vbox:
# Tell to Ren'py which prefix to use.
style_prefix "mybig"
text "line 1"
text "line 2"
textbutton
, are particular because they have more than a single part. Like implied by its name, a textbutton
is a combination between the button
and the text
screen statements. For them, the name of the style is a little more complex :prefix
_outer statement
_inner statement
So, for a
textbutton
you need :
Python:
# Style for the /button/ part.
style myStyle_button:
background "#0F0"
# Style for the /text/ part.
style myStyle_button_text:
color "#F00"
screen whatever():
vbox:
style_prefix "myStyle"
textbutton "Click me to quit" action Return()
label start:
call screen whatever
"End."