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.
PetPeeve
Regular
Posts: 70 Joined: Tue Nov 06, 2012 10:40 am
Tumblr: agamemakingblogforcoolkids
Contact:
#1
Post
by PetPeeve » Sun Jun 05, 2016 2:27 am
Hi there,
I've been messing with my text tags and have been trying to get several different styles of text tag using
Code: Select all
init python:
style.rumble_hyperlink = Style(style.hyperlink_text)
style.rumble_hyperlink.color = "#00f"
style.rumble_hyperlink.hover_color = "#DD002B"
def hyperlink_styler(target):
if target.startswith("RUMBLE"):
return style.rumble_hyperlink
else:
return style.hyperlink_text
config.hyperlink_styler = hyperlink_styler
And while this changes the style of the text tags it also makes them unclickable. Am I doing something dumb?
Last edited by
PetPeeve on Tue Jun 07, 2016 11:32 pm, edited 1 time in total.
Alex
Lemma-Class Veteran
Posts: 3094 Joined: Fri Dec 11, 2009 5:25 pm
Contact:
#2
Post
by Alex » Tue Jun 07, 2016 3:16 pm
Not tested, but instead of
Code: Select all
config.hyperlink_styler = hyperlink_styler
try to set the style
Code: Select all
style.default.hyperlink_functions = (hyperlink_styler, hyperlink_function, None)
See ...\renpy-6.99.9-sdk\renpy\common\00defaults.rpy (line about 142) and also
viewtopic.php?f=8&t=32048&hilit=hyperlink#p370409
PetPeeve
Regular
Posts: 70 Joined: Tue Nov 06, 2012 10:40 am
Tumblr: agamemakingblogforcoolkids
Contact:
#3
Post
by PetPeeve » Tue Jun 07, 2016 11:32 pm
Thanks, that works perfectly.
Users browsing this forum: Bing [Bot] , Google [Bot]