In such cases only unhovering works (hyperlink_focus(None) runs), but it doesn't run on hovering.
Test code:
Code: Select all
init python:
test_mess = ""
def my_hyperlink_sensitive(target=None):
global test_mess
if target:
test_mess += "Focusing in " + target + ". "
else:
test_mess += " Unfocusing. "
renpy.restart_interaction()
style.default.hyperlink_functions = (
hyperlink_styler,
hyperlink_function,
my_hyperlink_sensitive)
screen test_link():
frame background None:
vbox spacing 36:
viewport id "vp":
ysize 48
text "A {a=viewport}link{/a} in viewport (works well)."
viewport id "vp2":
ysize 48
draggable True
text "A {a=draggable viewport}link{/a} in draggable viewport (only from above)."
textbutton "A {a=textbutton}link{/a} in textbutton (doesn't work).":
action Return()
text test_mess
label main_menu:
return
label start:
call screen test_link
"End"
Tested on desktop. Why do I want it to work? To change the mouse cursor hovering hyperlinks. Yes, I use complex layouts like hypertext on text buttons and in draggable viewports.