phaselock Posted July 23, 2018 Share Posted July 23, 2018 Hi ! I read in the babylon gui documentation that its possible to access gui containers as controls. So I tried it in the PG: https://www.babylonjs-playground.com/#HETZDX#6 But it seems to fail. May I know what is the correct syntax to use as the container in the callback for executeOnAllControls() ? Quote Link to comment Share on other sites More sharing options...
brianzinn Posted July 23, 2018 Share Posted July 23, 2018 I think the function is switching to _rootContainer, so it's not recursively going through the children hierarchy. I haven't had my coffee yet today, though! In this PG, I get access from the immediate child(panel) directly to 'cont1': https://www.babylonjs-playground.com/#HETZDX#8 edit: it's the continue statement. func() is not run on anything containing a .children property. phaselock 1 Quote Link to comment Share on other sites More sharing options...
phaselock Posted July 23, 2018 Author Share Posted July 23, 2018 Thanks, @brianzinn. I'm aware of using children[0] directly but my stackpanels are instances generated during runtime. I've given the stackpanels names but they are not directly referenceable in code like panel.children[0] does. If I can access the stackpanels in place of 'this._rootContainer', I can reach my rects. It's late over here, perhaps I can explain my use test in more depth tom. Thanks for the efforts and much appreciated, cheers ! Quote Link to comment Share on other sites More sharing options...
Guest Posted July 23, 2018 Share Posted July 23, 2018 I will fix the executeOnAllControl function to also execute on container phaselock 1 Quote Link to comment Share on other sites More sharing options...
phaselock Posted July 24, 2018 Author Share Posted July 24, 2018 14 hours ago, Deltakosh said: I will fix the executeOnAllControl function to also execute on container Thanks @Deltakosh ! It seems to be fixed now: https://www.babylonjs-playground.com/#XCPP9Y#580 GameMonetize and brianzinn 2 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.