Another issue with the GUI I recently encountered was trying to give a Color3 as the .color property to a Button, which then set the text to black but left the border white (in the following example anyway, my setup was a little different):
I did not get anything in the console, which is why I first thought the real bug was that it was not setting the border (wrong!).
The whole problem showed up because I had put all colors in constants, so I expected to be able to use them for the GUI too. Could we add support for that to the GUI? It doesn’t seem too hard to implement and it would be really helpful for code reuse. I am not very familar with TypeScript, so I hope it’s not a limitation from that side.
Oh thanks, so it’s in fact two bugs rolled into one. Now I remember, I have had that problem before. I’m a sucker for those CSS shorthand codes no-one else seems to use. This problem was however not present in my current project, I used a full color code there.
Yes, I think so too. At least it should say so in the docs. I posted it into the bugs forum rather than feature requests because it is somewhat counterintuitive. Babylon.js has a very rich API in general, so of course you get accustomed to that and expect it everywhere
I would even do a quick PR, but right now I’m too busy to deal with setting everything up. Maybe in a few weeks.