+ # keys are the choice names
+ # values are a 3-tuple of image, xpos, and ypos
+ ("images/to_be.png", 500, 100),
+ ("images/not_to_be.png", 600, 200)
+ # get the right tooltip values from the choice name
+ def GetChoiceTooltip(choice = None):
+ if choice in choice_map:
+ return choice_map[choice]
+ # Slide transform for the tooltip
+ transform trn_choicetooltip:
+ easein 0.5 xalign 0.5 alpha 1.0
+ easeout 0.5 xalign 0.7 alpha 0.0
+# Separate screen for the tooltip
+screen choice_tooltip(img, x, y):
+ add img xpos x ypos y at trn_choicetooltip
+# The main choice screen
+ default choiceTooltip = None
+ for caption, action, chosen in items:
+ $ choiceTooltip = GetChoiceTooltip(caption)
+ style "menu_choice_button"
+ text caption style "menu_choice"
+ if choiceTooltip is not None:
+ hovered ShowTransient("choice_tooltip", dissolve, choiceTooltip[0], choiceTooltip[1], choiceTooltip[2])
+ unhovered Hide("choice_tooltip", dissolve)
+ text caption style "menu_caption"