GDevelop-extensions icon indicating copy to clipboard operation
GDevelop-extensions copied to clipboard

Update PanelSpriteButton.json

Open gemmomoh opened this issue 1 year ago • 7 comments

Add disabled state.

A disabled state is visible when the interactions are deactivated.

image

gemmomoh avatar Aug 17 '23 12:08 gemmomoh

Thank you for submitting an extension update.

Did you consider applying an effect on the button after disabling it?

D8H avatar Aug 17 '23 12:08 D8H

No, I did not add an effect. I think people usually have a disabled button sprite/image.

gemmomoh avatar Aug 17 '23 13:08 gemmomoh

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.

Bouh avatar Aug 19 '23 12:08 Bouh

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.

D8H avatar Aug 19 '23 14:08 D8H

I think we should start thinking about having different variations of buttons :)

4ian avatar Aug 19 '23 14:08 4ian

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.

Bouh avatar Aug 19 '23 22:08 Bouh

This PR should have the 'Extension updated' tag

romw314 avatar Aug 24 '23 09:08 romw314