[Unresolved] Possible Bug: Fade out not occurring when mouse unhovers from 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
henvu50
Veteran
Posts: 337
Joined: Wed Aug 22, 2018 1:22 am
Contact:

[Unresolved] Possible Bug: Fade out not occurring when mouse unhovers from textbutton.

#1 Post by henvu50 »

EDIT: Show/Hide Hovered/Unhovered breaks the slider on mobile.
EDIT: Just use hovered & unhovered along with Show & Hide, with transition=Dissolve(0.5) .... It's reliable and works 100% on mobile, tablet and pc.


____________________________________________________________

(I was going to submit this bug to github, but there's a small chance it might be user error, and I'd hate to waste Renpytom's time.)

When you mouse over the textbutton, the fade in works, but when you unhover the textbutton, the fade out never occurs, or maybe it does, but it gets canceled. Is this a bug or expected behavior? I was expecting the fade out to occur and finish when the mouse unhovers from the textbutton.

How to reproduce:

1. Replace script.rpy with the following code below.
2. Start new game.
3. Mouse over either textbutton. The **_on appear_** triggers correctly, the frame fades in.
4. When you unhover the mouse, the **_on hide_** never triggers, fade out never occurs.
5. Use the keyboard arrow keys to focus a textbutton. The **_on appear_** triggers correctly, the frame fades in.
6. Use the keyboard arrow to move to the next textbutton. The **_on hide_** triggers correctly, the frame shown from previous button fades out.
7. Use the keyboard arrow keys to make both textbutton's lose focus by moving up, the on hide does not trigger, the fade out does not occur.
8. Move back & forth between each textbutton using the arrow keys on keyboard, the transform events function correctly.
9. Once again use the mouse to hover over each textbutton, the on appear works, but when you unhover, the on hide event of the transform never triggers for some reason.

Maybe I'm doing something wrong?

Code: Select all


label start:
    show screen yo
    'test'
    return

screen yo():
    textbutton "123":
        tooltip '123'
        xpos 500
        ypos 500
        action NullAction()
    textbutton "abc":
        tooltip 'abc'
        xpos 400
        ypos 400
        action NullAction()
    use sometooltip


screen sometooltip():
    $ toolTip = GetTooltip()
    if toolTip is not None:
        showif toolTip == '123':
            use an_img_with_text1
        elif toolTip == 'abc':
            use an_img_with_text2

screen an_img_with_text1():
    add 'gui/frame.png' at transform_fade_in_out
    text 'text1'
screen an_img_with_text2():
    add 'gui/frame.png' xpos 800 ypos 800 at transform_fade_in_out
    text 'text2'
    
transform transform_fade_in_out():
    on appear:
        alpha 0.0
        easein 1.0 alpha 1.0
    on show:
        alpha 0.0
        easein 1.0 alpha 1.0
    on hide:
        alpha 1.0
        easein 1.0 alpha 0.0

    
Last edited by henvu50 on Sun Sep 19, 2021 3:44 pm, edited 2 times in total.

henvu50
Veteran
Posts: 337
Joined: Wed Aug 22, 2018 1:22 am
Contact:

Re: Possible Bug: Fade out not occurring when mouse unhovers from textbutton.

#2 Post by henvu50 »

I've been stuck on this problem for over a month.

Anyone know how to get a fully functional fade in & fade out system working with showif & tooltips, that also works when you're using either keyboard or mouse, across tablet, pc and mobile?

- Fade out will not work no matter what.
- When using keyboard, eventually fade in will stop working.

Post Reply

Who is online

Users browsing this forum: No registered users