Showing styled text on hover over textbutton

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
GMHLee
Regular
Posts: 27
Joined: Thu Aug 25, 2022 7:00 am
Contact:

Showing styled text on hover over textbutton

#1 Post by GMHLee »

Hi all,

Another question with what is likely a simple answer perhaps?
I did check the docs but it doesn't really offer examples on how to implement exactly what I'm looking for.
I'm try to show text when I hover over a textbutton so that "attribute" changes pop up beside my character card (already shown) depending on the option hovered.
Non-working example code as below:

Code: Select all

textbutton "{font=SitkaZ.ttc}{color=#aaaaaa}{size=35}Casual Outing":
        hovered:
            text "+1" style "ultd":
                xpos 200
                 ypos 200
            text "+2" style "ultd":    
                xpos 200
                 ypos 300
        Action Jump ("whatever")
textbutton "{font=SitkaZ.ttc}{color=#aaaaaa}{size=35}Crossfit"
         hovered:
             text "+3" style "ultd":
                 xpos 200
                  ypos 400
           text "+1" style "ultd":    
                 xpos 200
                 ypos 300
          ....repeat
Any help appreciated, thanks.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]