nearrect show/hide transitions

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
Kosmo
Newbie
Posts: 10
Joined: Sat Jun 13, 2020 6:20 pm
Contact:

nearrect show/hide transitions

#1 Post by Kosmo »

I can't figure out how to add show/hide transitions to nearrect. For whatever reason, it ignores them.

Code: Select all

# show/hide transition
transform show_hide_dissolve:
    on show:
        alpha .0
        linear .2 alpha 1.0
    on hide:
        alpha 1.0
        linear .2 alpha .0
        
# Tooltip example from the docs
screen tooltip_example2():
    frame:
        padding (20, 20)
        align (.5, .3)

        has vbox

        textbutton "North":
            action Return("n")
            tooltip "To meet a polar bear."

        textbutton "South":
            action Return("s")
            tooltip "All the way to the tropics."

    $ tooltip = GetTooltip()

    if tooltip:

        nearrect:
                
            focus "tooltip"
            
            # Trying to add tansition here
            frame at show_hide_dissolve:
                            
                xalign 0.5
                text tooltip 

Post Reply

Who is online

Users browsing this forum: AWizardWithWords