What is Button.disabledColor / disabledColorItem doing?

Hello,

I’m disabling some simple buttons and want them to show as greyed out. I stumbled across their accessor disabledColor / disabledColorItem. The name implies it does exactly what I’m looking for without having to manually change colors or alpha back and forth, but it just doesn’t do anything for me.
I don’t understand what they are supposed to be affecting:
https://playground.babylonjs.com/#XCPP9Y#7509

The disabledColor is used in radio buttons, checkboxes and input text (when they are disabled).
I guess it would make sense to use it in the button as well when it’s disabled!

@msDestiny14, want to take over?

Sure. let me take a look :smiley:

Hi there! Got a PR up for you. Should wrap up soon.

3 Likes

Hi,

this actually does not work for me yet. It’s merged, so I don’t think I have to wait for a whole new version right?

I looked at the code and maybe it’s just the missing underscore for this._disabledColor?
The aforementioned controls by @RaananW that use the disabled color are also doing so in their own class and not in rectangle.ts itself. But I don’t know about how you handle your GUI stuff.
Did it work for you when you tested it?

@msDestiny14 will be able to answer that :slight_smile:

I copied your PG and ran it in local test and it changed color for me. I’m assuming you need to refresh the browser’s cache. (Mine hasn’t updated yet either) I can do a double check to make sure though.

1 Like

Ah the update wasn’t pushed yet since it was merged over the weekend. Should be in shortly.

2 Likes

Alright thanks, I’ll be patient :innocent:

2 Likes