I fear this might be rather complicated and do hope someone knows a way to implement this. I copied my code here. And in case you are getting confused by it, here a short explanation to the choice menu.
A choice consists here out of an imagebutton (black box hover/unhover), a textbutton (choice text hover/unhover) and an energy ball that is sometimes shown. If it is shown, it means that the action costs energy and there is a number on that image of an energyball as well. Furthermore, all three things are made so that when you hover over one, the others are hovered (albeit the Energyball has no hovering image, so you know.)
I hope this helps and I hope someone can help me with this.
Code: Select all
menu:
"Hey, Cream. How are you doing with your homework?" (tooltip='Cream has some homework over the summer holidays. Maybe it is worth checking it out?'):
Code: Select all
style hover_choice_button2 is choice_button2:
background "gui/button/choice_hover_background2.png"
style hover_choice_button2_text is choice_button2_text:
idle_color '#919191'
style energynumber:
size 36
font "gui/NiseSegaSonic.ttf"
color '#ffffff'
outlines [ (absolute(2), "#000", absolute(0), absolute(0)) ]
screen choice(items):
default hovered_choice = None
add "gui/textbox.png":
yalign 1.0
add "gui/stats/Upperbox.png":
pos 0, 735
if txtname == "Cream":
text "Cream":
style "namebox"
color "#f59342"
outlines [ (absolute(2), "#000000", absolute(0), absolute(0)) ]
size 45
xpos 105
ypos 841
textbutton items[0].caption:
pos 85, 330
action items[0].action
if hovered_choice == 0:
style "hover_choice_button2"
else:
style "choice_button2"
hovered SetScreenVariable("hovered_choice", 0)#, Hide("say")
unhovered SetScreenVariable("hovered_choice", None)#, Show("say")
tooltip items[0].kwargs.get('tooltip')#:
#tooltip TooltipUp
imagebutton:
pos 590, 345
action items[0].action
if hovered_choice == 0:
idle "gui/button/Button_Up_[ColorUp].png"
else:
idle "gui/button/Button_Up_[ColorUp].png"
hovered SetScreenVariable("hovered_choice", 0)
unhovered SetScreenVariable("hovered_choice", None)
tooltip items[0].kwargs.get('tooltip')
if EnergyUp > 0:
imagebutton:
pos 0.03, 0.28
action items[0].action
if hovered_choice == 0:
idle "gui/button/Energy_Ball_Up.png"
else:
idle "gui/button/Energy_Ball_Up.png"
hovered SetScreenVariable("hovered_choice", 0)
unhovered SetScreenVariable("hovered_choice", None)
tooltip items[0].kwargs.get('tooltip')
text "[EnergyUp]":
pos 0.048, 0.3225 anchor 0.5, 0.5
style "energynumber"
if len(items) > 1:
textbutton items[1].caption:
(...)
(...)
(...)
$ tooltip = GetTooltip()
if tooltip:
text "[tooltip]":
style "say_dialogue"
pos 102, 895