daniu54 / earie-treasures

A 2d top-down loot-em-up with horror and stealth elements
0 stars 0 forks source link

Implement "layered" hiding of UI elements #94

Open Abb4 opened 9 months ago

Abb4 commented 9 months ago

When we have Ui elements such as Container->Inventory we want to hide them in order when pressing e.g. esc. First hide Container then Inventory. After that, pressing esc should instead toggle main menu.

For that consider z-level ordering of the CanvasElements. First hide highest ones, then lowest ones. We should definitely avoid ray casts.

Remember to adjust code that adds elements to "stack" them on the highest layer.