[Solved] Tooltips on the quick menu (transform/ATL)
Posted: Sun Apr 21, 2019 1:15 am
So I'm working on putting a tooltip element on one side of the quick_menu, with ATL that makes the text appear/disappear with alpha and xoffset. However, only the on show: part of the transform is visibly working, which means that the tooltip slides/fades into view, but doesn't do the reverse on hide:. I'm assuming this might have something to do with how it's structured right now.
Here's the screen quick_menu() code as it is right now, with any extraneous elements removed:
Here's the screen quick_menu() code as it is right now, with any extraneous elements removed:
Code: Select all
screen quick_menu():
## Ensure this appears on top of other screens.
zorder 100
if quick_menu:
if GetTooltip() == None:
$ quick_tooltip = ""
else:
$ quick_tooltip = GetTooltip()
showif quick_tooltip is not "":
text quick_tooltip at quick_tooltip_text:
color "#FF3"
text_align 1.0
italic True
else:
text "" at quick_tooltip_text:
text_align 1.0
italic True
hbox align(0.5,1.0):
style_prefix "quick"
imagebutton auto "gui/step-backward-%s.png" style "quick_imagebutton" action Rollback():
tooltip "back"
imagebutton auto "gui/history-%s.png" style "quick_imagebutton" action ShowMenu('history'):
tooltip "history"
imagebutton auto "gui/skip-%s.png" style "quick_imagebutton" action Skip() alternate Skip(fast=True, confirm=True):
tooltip "skip"
imagebutton auto "gui/auto-toggle-%s.png" style "quick_imagebutton" action Preference("auto-forward", "toggle"):
tooltip "auto-Forward"
null width 16
imagebutton auto "gui/save-%s.png" style "quick_imagebutton" action ShowMenu('save'):
tooltip "save"
imagebutton auto "gui/quicksave-%s.png" style "quick_imagebutton" action QuickSave():
tooltip "quickSave"
imagebutton auto "gui/quickload-%s.png" style "quick_imagebutton" action QuickLoad():
tooltip "quickLoad"
imagebutton auto "gui/cogs-%s.png" style "quick_imagebutton" action ShowMenu("preferences"):
tooltip "settings"
transform quick_tooltip_text:
align (1.0,1.0)
xoffset -30
yoffset 0
alpha 0.7
on appear:
alpha 1.0
on show:
parallel:
alpha 0.0
time 0.02
linear 0.28 alpha 0.7
parallel:
xoffset -60
linear 0.30 xoffset -30
on hide:
parallel:
alpha 0.7
time 0.02
linear 0.28 alpha 0.0
parallel:
xoffset -30
linear 0.30 xoffset 30