How do you bring a panel to top
Hi, and sorry if I'm asking something stupid.
I built my panel ahead of time, and many other objects have been created later. I thought doing game.world.bringToTop(panel) or game.world.bringToTop(panel._sprite) would do the trick, but my panel is still behind everything else... Do you have any idea of what I'm doing wrong ?
thansk for reading
This is what I came up with, but haven't tested it thoroughly, maybe give it a try?
slickUI.container.displayGroup.bringToTop(panel.container.displayGroup);
Thanks for the tip! I decided to use Html instead for my ui, so I won't test your suggestion for the moment, but it might come handy some day.
Le 12 sept. 2017 08:07, "Tylar" [email protected] a écrit :
This is what I came up with, but haven't tested it thoroughly, maybe give it a try?
slickUI.container.displayGroup.bringToTop(panel.container.displayGroup);
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Flaxis/slick-ui/issues/24#issuecomment-328747351, or mute the thread https://github.com/notifications/unsubscribe-auth/APtoPBvPIZjbnHmSZ0kgiZSc2GadsQ2-ks5shh-WgaJpZM4OkTSt .
Hi all,
This might be related to the issue above.
When you change the state of the game, you have to add slickUI.load('assets/ui/kenney/kenney.json'); again at the end of your state. This is the only way i get to see my panels again when changing states.