Hyperlink in ui.button

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
Preludian
Regular
Posts: 81
Joined: Wed Nov 05, 2008 9:10 am
Contact:

Hyperlink in ui.button

#1 Post by Preludian »

Hi,

seen it in Heileen in the main-menu, a hyperlink to a http adress. I thought putting a {a=http://www.andsoon.com}Take me there{/a} in the ui.text part would work but it doesn't. Any ideas?

User avatar
PyTom
Ren'Py Creator
Posts: 16097
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:

Re: Hyperlink in ui.button

#2 Post by PyTom »

That should work with sufficently modern versions of Ren'Py.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Preludian
Regular
Posts: 81
Joined: Wed Nov 05, 2008 9:10 am
Contact:

Re: Hyperlink in ui.button

#3 Post by Preludian »

At least it doesn't show a syntax error. I forgot the ' ' around the tag.

But unfortunately no website opens. A configuration setting I am missing?

Code: Select all

$ ui.text('{a=http://www.renpy.org/}RenPy{/a}',hover_color='#c8ffff',color='#c8ffff',size=22,font='DejaVuSans.ttf')
Edit: I have 6.9.1

Edit2: jack_norton already had asked this question over here and your second solution works great, many thanks.

Post Reply

Who is online

Users browsing this forum: Ocelot