// methods to show or hide popups public void ShowPopups(UIPopup _popup) { if (_popup.isOn) { _popup.CloseScreen(true); } else { _popup.StartScreen(true); } }
public override void BootSequence() { if (screenManagerInstance == null) { screenManagerInstance = this; } m_Screens = GetComponentsInChildren <UIScreen>(true); // get all the screens m_ScrollSnap = GetComponentsInChildren <UISnapScrolling>(true); // get all the pop ups m_GameScreens = GetComponentsInChildren <UIGameScreen>(true); m_PopupScreens = GetComponentsInChildren <UIPopup>(true); for (int i = 0; i < m_Screens.Length; i++) { if (m_Screens[i].name == "album_screen") { albumScreen = m_Screens[i]; } else if (m_Screens[i].name == "custom_album_screen") { customAlbumScreen = m_Screens[i]; } else if (m_Screens[i].name == "user_screen") { userScreen = m_Screens[i]; } } // create temp holder for pop ups for (int i = 0; i < m_PopupScreens.Length; i++) { if (m_PopupScreens[i].name == "new_popup_album") { newAlbumPopup = m_PopupScreens[i]; } else if (m_PopupScreens[i].name == "new_popup_user") { newUserPopup = m_PopupScreens[i]; } else if (m_PopupScreens[i].name == "name_popup") { editUserNamePopup = m_PopupScreens[i]; } else if (m_PopupScreens[i].name == "age_popup") { editUserAgePopup = m_PopupScreens[i]; } else if (m_PopupScreens[i].name == "gender_popup") { editUserGenderPopup = m_PopupScreens[i]; } else if (m_PopupScreens[i].name == "error_popup") { errorPopup_parents_page = m_PopupScreens[i]; } else if (m_PopupScreens[i].name == "error_popup2") { errorPopup_user_page = m_PopupScreens[i]; } else if (m_PopupScreens[i].name == "album_select_popup") { albumSelectPopup = m_PopupScreens[i]; } else if (m_PopupScreens[i].name == "profile_select_popup") { profileSelectPopup = m_PopupScreens[i]; } } // create temp holder for gamescreens for (int i = 0; i < m_ScrollSnap.Length; i++) { if (m_ScrollSnap[i].name == "Content_expression") { expressionContent = m_ScrollSnap[i]; } else if (m_ScrollSnap[i].name == "Content_album") { albumContent = m_ScrollSnap[i]; } else if (m_ScrollSnap[i].name == "Content_profile") { profileContent = m_ScrollSnap[i]; } else if (m_ScrollSnap[i].name == "Content_game") { gameContent = m_ScrollSnap[i]; } } }