GDevelop-extensions
GDevelop-extensions copied to clipboard
Update PanelSpriteButton.json
Add disabled state.
A disabled state is visible when the interactions are deactivated.
Thank you for submitting an extension update.
Did you consider applying an effect on the button after disabling it?
No, I did not add an effect. I think people usually have a disabled button sprite/image.
As the other states are already in images, it's a good to have this new state as an image too, to be consistent. The effects are also rendered at each frame, which is a minor hit on the GPU, an additional cost that can be avoided.
As the other states are already in images, it's a good to have this new state as an image too, to be consistent. The effects are also rendered at each frame, which is a minor hit on the GPU, an additional cost that can be avoided.
Adding a new state means that every assets from the store must be updated with an image for this state. Also, I think it's not very practical to use an image when, for most buttons, it will just be a grey-ish version of the idle state.
Effects performance is another matter. There is no need to evaluate a shader each frame on a still image.
I think we should start thinking about having different variations of buttons :)
I think we should start thinking about having different variations of buttons :)
What did you suggest, kept the object in this version, and duplicate the a new object with improvment on a disabled state? It will duplicate the object buttons just for that difference...
Also, I think it's not very practical to use an image when, for most buttons, it will just be a grey-ish version of the idle state.
I agree.
Effects performance is another matter. There is no need to evaluate a shader each frame on a still image.
I think the shaders from effects are calculated at every frame, I'm not sure. But if we can calculate the effect one time on the object its a wonderful solution. Except the effects doesn't work on children objects in a EBO (Event Base Object) like I saw and shared on discord, so we can't use them for the moment to greyed a state.
This PR should have the 'Extension updated' tag