Hi Everyone,
I’m at the moment busy with creating a GUI for my environment. I want to make a button visible and invisible by clicking on another button. I can’t find any information about this specific. Can somebody help me?
Hi Everyone,
I’m at the moment busy with creating a GUI for my environment. I want to make a button visible and invisible by clicking on another button. I can’t find any information about this specific. Can somebody help me?
Hi and welcome,
I think creating a playground could be a nice way to help us… helping you
But basically you probably just have to play with the isVisible property I think? Button | Babylon.js Documentation
I’m creating my babylon in visual studio code. But i’ve putted now in playground. I tried isVisible property but it doesn’t work.
In specific: the button “CheckWandstatus” must become visible if I’ve pushed ButOpenWindow once and dissapeared when I pushed again.
By creating a playground I was implying that you should create a tiny scene so we can focus on your issue. Here : just create 2 buttons (the one which control the visibility of the other) in the same way you’re doing in your main application, and that’s all
I made it small. The tools button must let the “wanden” button dissapear and appear
first, you do not have any code attached to your buttons, so I guess it could explain why it does not work
So you need to listen for a click and as @Vinc3r mentionned rely on the visibility to toggle. https://playground.babylonjs.com/#4U5EKB#3