private void DisplayPopup(AbstractPopUpPanel displayPanel, AbstractPopUpPanel.PopUpPanelData popUpPanelData) { if (canvas == null) { canvas = FindObjectOfType <Canvas>(); } displayPanel.transform.parent = canvas.transform; displayPanel.transform.localPosition = Vector3.zero; displayPanel.transform.localRotation = Quaternion.identity; displayPanel.transform.localScale = Vector3.one; displayPanel.DisplayPopUpContent(popUpPanelData); BindPopUpWindowDelegates(displayPanel, popUpPanelData.confirmButtonPressedCallback, popUpPanelData.cancelButtonPressedCallback); if (activePopUp != displayPanel) { if (activePopUp) { activePopUp.Hide(); } activePopUp = displayPanel; } }
private void ClosePopUpWindow(AbstractPopUpPanel abstractPopUpPanel) { abstractPopUpPanel.Hide(); abstractPopUpPanel.Reset(); IterateThroughStack(); }