I use a button. The button is working fine, but on one scene, i lower the opacity to make it inactive (50) and when certain conditions match i put it back to 100% (so 255)
What is the expected result
I would like the button to be 100% opacity, back to its original state
What is the actual result
When i set the opacity back to 255, the button seems still not at 100% opacity, however the text, is well at 100%
Can you help me on that ?
Why the button doesn’t show up as expected ?
thx for the screenshot.
can you post the first full condition too…i mean the one which set the initial opacity to 50?better if you can post the full event.
@RMDB Hey, it’s not a repeated each frame issue.
On beginning of scene → change opacity of button to 50
On any key released → change opacity of button to 255
The result is that the text (of the button) works normally and change opacity to 255, whereas the button’s opacity (the button’s sprite) stays at 50 when not hovered (changes to 255 only when hovered). So it’s clearly a bug.
@Pixalion I went ahead and transferred this topic to the Bugs reports section.
thaz what i thought… that is an extension…
the op never said it was using an extension…thaz why i said above that i dunno if he’s using a custom button or a premeade/asset (behavioured?) one.
That is a different thing, bcs everything could happen.
From a first glance the problem could be here in ther extension bcs the tween in your case…but i’m not gonna dig in it …since i don’t think is related to the OP.
The OP didn’t mention it as an extension because the “Button” object is one of the main objects in GDevelop where you add it just like you add any other object. So I won’t call it an extension.
Sure it uses an extension to function (which is automatically added by default), but since you have the option to change the opacity via an action, it should not conflict with the the internal functionality and produce this bug.
Let the team at GDevelop check and decide whether it’s a bug or not instead of making this thread longer than it should and more complicated for them to follow.
If an action to change the opacity is available, you should be able to use it without any issues.
I’ll do that, but it seems a pretty tedious thing for just a prefab button.
By the way don’t you think those button, to be fully usable, should contain a simple “disable” state (as all UserInterface button should) ?
You can try a workaround for now by adding a “blending mode” effect on the button with opacity of 0.2, then enable / disable the effect, instead of changing opacity via an action.