Text Tag Hyperlinks aren't Clickable (Solved)

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.
Post Reply
Message
Author
User avatar
PetPeeve
Regular
Posts: 70
Joined: Tue Nov 06, 2012 10:40 am
Tumblr: agamemakingblogforcoolkids
Contact:

Text Tag Hyperlinks aren't Clickable (Solved)

#1 Post by PetPeeve »

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.
Avatar by shiohh
ImageImageImageImage

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Text Tag Hyperlinks aren't Clickable

#2 Post by Alex »

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

User avatar
PetPeeve
Regular
Posts: 70
Joined: Tue Nov 06, 2012 10:40 am
Tumblr: agamemakingblogforcoolkids
Contact:

Re: Text Tag Hyperlinks aren't Clickable

#3 Post by PetPeeve »

Thanks, that works perfectly.
Avatar by shiohh
ImageImageImageImage

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]