GUI Editor - Cannot change shadow alpha of an UI element?

Snippet: https://gui.babylonjs.com/#S7NWKN#3

Hi everyone, is it possible to change the shadow alpha of an UI element, or was it designed to just be a flat color? I’d like to make a smoother shadow without having to increase the shadow blur.

I’ve tried to add a child image, put the shadow on it and decreasing its alpha, hoping the alpha of the shadow would decrease as well, but the shadow needs a sprite to function, and I don’t want one for this button.

Hum? Good question. Looks to me like (at least in the editor) it doesn’t take the alpha/HEXa.
As opposed to everything else. I don’t use it all too much (I don’t really like the look of it) but it would be good to just double check if it does take a Color4 when using code?!

Hi mawa, I just checked it quickly in my project, the shadow color uses a string. I’m able to change its opacity directly this way, so apparently it’s a bug in the gui editor. I wish it didn’t come down to this, but if there’s no other option, I’ll have to set it this way, even if it’s a bit dirty.

Do you have the PG ready? I sort of recall this but wasn’t sure… Now, if it really works with code, then definetely is (not a bug) but a ‘miss’ in the Editor. We would just need to place a Feature requests . Should be an ez fix. For the long story, in fact at some point all color4 where missing from the editor. I had them added :grin: Do you have the will and time :hourglass_flowing_sand: to do it? I would upvote it and ping the Team for it.

Quick playground: https://playground.babylonjs.com/#S52V14#1

As you can see, it works fine with a string. The problem lies in the editor I guess. it seems I’ll have to go with this solution for now, until the feature is added to the gui editor.

posted in Feature requests . May be you wanna upvote? :smile: Thanks for reporting and have a great day :sunglasses:

2 Likes

Sure, will do! Have a nice day too :slight_smile: