Is this possible to achieve?
Code: Select all
em "After some days of sight-seeing in Paris, to which we were almost strangers, on an August afternoon, 1901, Miss Lamont and I went to {i}{outlinecolor=#00ff00}Versailles{/outlinecolor}{/i}."
Code: Select all
em "After some days of sight-seeing in Paris, to which we were almost strangers, on an August afternoon, 1901, Miss Lamont and I went to {i}{outlinecolor=#00ff00}Versailles{/outlinecolor}{/i}."
Code: Select all
init python:
# custom tag, apply {=style} + {outlinecolor}
def highlight_tag(tag, argument, contents):
return [
(renpy.TEXT_TAG, u"={}".format(argument)),
(renpy.TEXT_TAG, u"outlinecolor={}".format(highlight_colors[argument])),
] + contents + [
(renpy.TEXT_TAG, u"/outlinecolor"),
(renpy.TEXT_TAG, u"/"),
]
config.custom_text_tags["highlight"] = highlight_tag
define gui.dialogue_text_outlines = [ (1, "#FFFFFF00") ] # default fully transparent white outlines
define highlight_colors = { "place": "#00FF00", "name": "#F0F56E" } # dictionary with our outline colors
define e = Character("Eileen")
# text style definitions
style place:
color "#B01C90"
italic True
style name:
color "#EB6234"
# game starts here
label start:
e "After some days of sight-seeing in Paris, to which we were almost strangers, on an August afternoon, 1901, {highlight=name}Miss Lamont{/highlight} and I went to {highlight=place}Versailles{/highlight}."
return
Users browsing this forum: Ocelot