Exemplo n.º 1
0
    public void OpenLoadingPanel(bool on)
    {
        if (LoadingPanel == null)
        {
            UIBasePanel panel = GetPanel("LoadingPanel");
            if (panel == null)
            {
                panel = Open("LoadingPanel");
            }

            if (panel != null)
            {
                LoadingPanel loading = panel.GetComponent <LoadingPanel>();
                if (loading != null)
                {
                    LoadingPanel = loading;
                }
            }
        }

        if (LoadingPanel != null)
        {
            if (on == false)
            {
                LoadingPanel.Close();
            }
            else
            {
                LoadingPanel.LateInit();
            }
        }
    }
Exemplo n.º 2
0
    public void OpenPopup(string title, string message, System.Action okCallback, System.Action cancelCallback = null, string okLbl = "", string cancelLbl = "")
    {
        if (Popup != null)
        {
            return;
        }

        UIBasePanel panel = Open("PopupPanel");

        if (panel != null)
        {
            PopupPanel popup = panel.GetComponent <PopupPanel>();
            if (popup != null)
            {
                Popup = popup;
                popup.OpenPopup(title, message, okCallback, cancelCallback, okLbl, cancelLbl);
            }
        }
    }