static void AddHideUI(UIWindowBase UI)
    {
        if (!s_hideUIs.ContainsKey(UI.name))
        {
            s_hideUIs.Add(UI.name, new List <UIWindowBase>());
        }

        s_hideUIs[UI.name].Add(UI);

        UI.Hide();
    }
Exemple #2
0
 static int Hide(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UIWindowBase obj = (UIWindowBase)ToLua.CheckObject(L, 1, typeof(UIWindowBase));
         obj.Hide();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemple #3
0
    public static UIWindowBase HideUI(UIWindowBase ui)
    {
        UISystemEvent.Dispatch(ui, UIEvent.OnHide);  //派发OnHide事件

        try
        {
            ui.Hide();
            ui.OnHide();
        }
        catch (Exception e)
        {
            Debug.LogError(ui.UIName + " OnShow Exception: " + e.ToString());
        }

        return(ui);
    }