"""We show here how to set up a helper (or hint) that is displayed to the user when an element is hovered
for a given amount of time"""
import pygame, thorpy as tp
screen = pygame.display.set_mode((1200, 700))
tp.init(screen, tp.theme_human) #bind screen to gui elements and set theme
my_button = tp.Button("Hello, world.")
my_helper = tp.Helper("Hint : click on the button to make it pressed. Yep.", my_button)
# my_helper = tp.Helper("Hint : click on the button to make it pressed. Yep.", #content of the helper
# my_button, #parent that triggers the help
# countdown=10, #number of frames before popping help when parent hovered
# generate_shadow=(True, "auto"), # : does generate shadow ?  : fast method or accurate method ? you can set  = "auto"
# offset=(0,0), #offset of the helper compared to mouse_pos
# max_width=150) #maximum width of the helper (helper is always clamped to screen)
def before_gui(): #add here the things to do each frame before blitting gui elements
tp.call_before_gui(before_gui) #tells thorpy to call before_gui() before drawing gui.
#For the sake of brevity, the main loop is replaced here by a shorter but blackbox-like method
player = my_button.get_updater().launch()