I am creating my GUI which includes a number of main panels. These are all under one centered anchor. When I press a left or right button, one panel disappears and another appears using UIButtonPlayAnimation. I need to display a popup window (another panel, for reference i'll call it sub panel) to show error messages when the user does something wrong . I'm having trouble though.
1. I cannot find how to disable the main panel's widgets when the sub panel appears without having to check through all panel widgets and disabling them one by one. Is there some other smarter way for this?
2. I cannot find how to cleanly control the sub panel to show or hide. What I did to display the sub panels when the game starts and on start I save an instance of each and hide them again. When I need to pop up a window, I'll check which one I need from the sub panels and display it using NGUITools.SetActive(popupWindow.gameObject, true);
I feel like I'm missing something which I'm not using. Is there any way better to handle these issues?