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.
-
lackofwords
- Newbie
- Posts: 10
- Joined: Sun Mar 18, 2012 5:41 pm
-
Contact:
#1
Post
by lackofwords » Wed Mar 21, 2012 6:43 am
I'm not sure why the drop shadow for the new style isn't taking priority over the default styling when applied to a selection of text.
Such as;
Code: Select all
init:
$ style.default.drop_shadow = (1,1)
$ style.default.color = "#fff"
$ style.new = Style(style.default)
$ style.new.italic = True
$ style.new.drop_shadow = None
$ style.new.color = "#000"
label start:
"Hello, {=new}World.{/=new} Hi."
The entire text of "Hello, World. Hi." would have a 'drop shadow'. "Hello" and "Hi." text would be colored white, while "World." text is black and italic, but was unable to remove the 'drop shadow'.
Same thing goes for outline as well.
-
PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
-
Contact:
#2
Post
by PyTom » Wed Mar 21, 2012 8:50 am
The reason is drop_shadow and outlines can't be customized using a text tag like that. These tags require more than one layer to be drawn by the Text. Rather than try to deal with layer ordering, which can get weird if one part of the text has 2 layers and the other has 4, I made drop_shadow and outlines global to a block of text.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama •
https://www.patreon.com/renpytom
Users browsing this forum: No registered users