slick-ui icon indicating copy to clipboard operation
slick-ui copied to clipboard

How do you bring a panel to top

Open GitNitneroc opened this issue 8 years ago • 3 comments

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

GitNitneroc avatar Jul 26 '17 18:07 GitNitneroc

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);

7yl4r avatar Sep 12 '17 06:09 7yl4r

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 .

GitNitneroc avatar Sep 13 '17 13:09 GitNitneroc

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.

flowan avatar Apr 03 '18 20:04 flowan