In-game buttons flickering to disabled state

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
User avatar
InvertMouse
Regular
Posts: 95
Joined: Sat May 31, 2014 3:41 am
Completed: Unhack
Organization: InvertMouse
Location: Sydney, Australia
Contact:

In-game buttons flickering to disabled state

#1 Post by InvertMouse »

Hi there :). To my understanding, you can assign ground, hover, idle etc states for your buttons. I have them set up for my in-game UI. My ground buttons are set to 50% opacity to indicate they cannot be pressed on in that state.

Let's say I have this scene:

* * *

scene test

"Hi!"

scene test2 with dissolve

"Hey."

* * *

On the second play through, I should be able to hit that skip button at any point. However, I noticed that during:

scene test2 with dissolve

While the dissolve is happening, the skip button shows its disabled state , then once the transition ends, it is enabled again. This is fair enough function wise, but it results in the skip button flickering to its ground state for a tick, which is pretty distracting. Is there a way to get around this?

Thank you so much :).
Image

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: In-game buttons flickering to disabled state

#2 Post by Imperf3kt »

Use imagebuttons instead of imagemaps
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
InvertMouse
Regular
Posts: 95
Joined: Sat May 31, 2014 3:41 am
Completed: Unhack
Organization: InvertMouse
Location: Sydney, Australia
Contact:

Re: In-game buttons flickering to disabled state

#3 Post by InvertMouse »

Imperf3kt wrote:Use imagebuttons instead of imagemaps
Thank you! Let me give this a go :).
Image

User avatar
InvertMouse
Regular
Posts: 95
Joined: Sat May 31, 2014 3:41 am
Completed: Unhack
Organization: InvertMouse
Location: Sydney, Australia
Contact:

Re: In-game buttons flickering to disabled state

#4 Post by InvertMouse »

Hello again. I tried changing into imagebuttons, but unfortunately the issue persists. Here is a clip to show what I mean:

https://drive.google.com/file/d/0BxueVy ... sp=sharing

The code looks like this:

Code: Select all


screen say:
   # Included only one button as an example.
   imagebutton:
                auto "assets/images/ui/ui_t/skip_%s.png"
                action Skip()

But as you can see in the video, the button still flickers to its disabled state during transitions. I would love to receive some guidance on this. Thank you so much :).
Image

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: In-game buttons flickering to disabled state

#5 Post by PyTom »

I'm tracking this as a bug for the time being.

https://github.com/renpy/renpy/issues/1185
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: In-game buttons flickering to disabled state

#6 Post by PyTom »

Okay, the problem was that Ren'Py was never marking with statements as seen.

https://github.com/renpy/renpy/commit/d ... 13e09d73aa

has the fix for it. It's a one liner, so you can probably edit it into renpy/display/core.py yourself.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
InvertMouse
Regular
Posts: 95
Joined: Sat May 31, 2014 3:41 am
Completed: Unhack
Organization: InvertMouse
Location: Sydney, Australia
Contact:

Re: In-game buttons flickering to disabled state

#7 Post by InvertMouse »

PyTom wrote:Okay, the problem was that Ren'Py was never marking with statements as seen.

https://github.com/renpy/renpy/commit/d ... 13e09d73aa

has the fix for it. It's a one liner, so you can probably edit it into renpy/display/core.py yourself.
Yeah, that seems to have fixed it Tom. Thank you :)!
Image

Post Reply

Who is online

Users browsing this forum: Rhapsy