"opacity when widget is disabled

Started by billarhos, 10 January 2019, 12:23:25

billarhos

Hi Texus. Happy new year.

Good news. I started using 0.8.2.  I finished one of my big projects. I done all the changes and now i am changing the little details in order all widgets looks like before.
Thank you for the great work you done.

I was thinking if a "opacity when widget is disabled" property in all widgets can be added. Right now, when i want for instance a check box to be disabled i set the manually the opacity to 0.3. So the user can easily understand that this widget can not be touched-changed. Ii should be great if we can have this out of the box!

Also, if i run "setOpacity" other than 1.0f before adding widget to gui manager the opacity does not apply. It works if i first add the widget and then apply new opacity. I tried this with "button".

cheers


texus

I'll add a "OpacityDisabled" property to the renderer.

QuoteAlso, if i run "setOpacity" other than 1.0f before adding widget to gui manager the opacity does not apply. It works if i first add the widget and then apply new opacity. I tried this with "button".
Could you show some code for this? I can't reproduce it.

texus

The OpacityDisabled property has been added to the version on github: https://github.com/texus/TGUI

billarhos


QuoteThe OpacityDisabled property has been added to the version on github: https://github.com/texus/TGUI

Thanks Texus. That was really quick.

QuoteCould you show some code for this? I can't reproduce it.

I made a tiny example but i can't reproduce either. I will investigate and i 'll come back.

texus

QuoteAlso, if i run "setOpacity" other than 1.0f before adding widget to gui manager the opacity does not apply. It works if i first add the widget and then apply new opacity. I tried this with "button".
I didn't realize earlier because I was focusing on the gui.add call, but the issue you are having has probably already been fixed in the github version: https://github.com/texus/TGUI/blob/d679a0a0c4b60e1895f258d10da940fbdda15e35/changelog.txt#L11

billarhos

Yes may be is that. I found the issue with 8.2. Then i download from "github" (8.3) that obviously this issue was fixed.