public void HidePopupWindow(UiPopupWindow popupWindow) { if (popupWindow) { if (popupWindow.IsShown) { popupWindow.Hide(); PopupBackground.gameObject.SetActive(false); } } }
public void ShowPopupWindow <T>(string title, T content, string[] buttonTexts, UnityAction[] buttonOnClickActions) where T : Popup_VDM { UiPopupWindow popup = GetPopupWindowFromList <UiPopupWindow>(); PopupBackground.gameObject.SetActive(true); popup.SetTitle(title); popup.SetContent(content); popup.SetButtons(buttonTexts, buttonOnClickActions); popup.Show(); }