Code: Select all
# show/hide transition
transform show_hide_dissolve:
on show:
alpha .0
linear .2 alpha 1.0
on hide:
alpha 1.0
linear .2 alpha .0
# Tooltip example from the docs
screen tooltip_example2():
frame:
padding (20, 20)
align (.5, .3)
has vbox
textbutton "North":
action Return("n")
tooltip "To meet a polar bear."
textbutton "South":
action Return("s")
tooltip "All the way to the tropics."
$ tooltip = GetTooltip()
if tooltip:
nearrect:
focus "tooltip"
# Trying to add tansition here
frame at show_hide_dissolve:
xalign 0.5
text tooltip