mecanicus Posted January 20, 2018 Share Posted January 20, 2018 Hello, I have a problem with the change of cursor on a hover button. On the PG I created two AdvancedDynamicTexture. First to create two buttons that display alternately. Their function is to display the labels associated with the meshes The mouse pointer changes well on the labels of the meshes but not on the button on the bottom left. And when I click to hide the labels then the mouse cursor changes to the button at the bottom left. I think it's related to the layers of the advancedDynamicTexture, but I have no idea to solve the problem. I need help. Thanks http://playground.babylonjs.com/#DRCMQB#12 Quote Link to comment Share on other sites More sharing options...
brianzinn Posted January 20, 2018 Share Posted January 20, 2018 http://playground.babylonjs.com/#DRCMQB#13 I think it's because you have 2 FullScreenUI's - I think you can only have one. Quote Link to comment Share on other sites More sharing options...
mecanicus Posted January 20, 2018 Author Share Posted January 20, 2018 I'm working on two advancedDynamicTexture, one that is still active and the second that I show or remove for to display or not the labels: line 60 advancedTexture.dispose (); if i work with a single advanceddynamictexture, i lose the action show / hide labels Quote Link to comment Share on other sites More sharing options...
brianzinn Posted January 20, 2018 Share Posted January 20, 2018 https://doc.babylonjs.com/how_to/gui Please note that only one fullscreen mode GUI is allowed per scene note that the bold emphasis is not mine. you cannot dispose (or use) a second full screen GUI. attach GUI to mesh or hide the meshes yourself in full screen. it is a limitation you have to work within. Quote Link to comment Share on other sites More sharing options...
mecanicus Posted January 20, 2018 Author Share Posted January 20, 2018 Thank you, I note for "note that the bold emphasis" . I had read a while ago but as on the PG of demo http://playground.babylonjs.com/#DRCMQB#12, there are two full screen GUI line 40 and line 199 that are used so I tried. But there is a second instruction that I do not understand line 200: advancedTexture.layer.layerMask = 2; Do you know its usefulness? If I work with a single full screen I have to find another way to make the button show / hide labels. I tried using the property isVisible but it does not work. An idea ? http://playground.babylonjs.com/#DRCMQB#15 Quote Link to comment Share on other sites More sharing options...
brianzinn Posted January 20, 2018 Share Posted January 20, 2018 cool - i didn't know about the layerMask allowing more than 1! if you get it working with layerMask, please share. thanks. http://playground.babylonjs.com/#DRCMQB#16 edit: problem in your PG was that button3 was not in scope. see my PG to get access to the buttons you created. you can use alpha or isVisible. mecanicus and GameMonetize 1 1 Quote Link to comment Share on other sites More sharing options...
mecanicus Posted January 20, 2018 Author Share Posted January 20, 2018 Thanks for your help. montrerButtons cacherButtons in french ;-) !! And in addition it allows me to understand why I did not access the properties of the buttons. I will not use layermask, but your solution that works very well and that I understand it. It opens up a lot of possibilities. again thank you brianzinn 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.