Esempio n. 1
0
        public void HideUILayout(string layoutname)
        {
            AbstractLayout layout = this[layoutname];

            if (layout != null)
            {
                layout.HideUILayout();
            }
        }
Esempio n. 2
0
        public void Dump()
        {
            List <AbstractLayout> lays = this.layouts.Values;

            for (int i = 0; i < lays.Count; ++i)
            {
                AbstractLayout lay = lays[i];
                lay.Dump();
            }
        }
Esempio n. 3
0
 public void AddLayout(AbstractLayout lay)
 {
     if (!layouts.ContainsKey(lay.LayoutName))
     {
         layouts.Add(lay.LayoutName, lay);
     }
     else
     {
         LogMgr.LogErrorFormat("{0} 为已经注册的Layout", lay.LayoutName);
     }
 }
Esempio n. 4
0
        public void ClearUILayouts()
        {
            List <AbstractLayout> lays = this.layouts.Values;

            this.layouts.Clear();
            for (int i = 0; i < lays.Count; ++i)
            {
                AbstractLayout lay = lays[i];
                this.layouts.Add(lay.LayoutName, lay);
            }

            ListPool.TryDespawn(lays);
        }
Esempio n. 5
0
        public void Destroy()
        {
            List <AbstractLayout> lays = this.layouts.ReadOnlyValues;

            for (int i = 0; i < lays.Count; ++i)
            {
                AbstractLayout lay = lays[i];
                lay.Release();
                lay.Clear(true);
            }

            this.layouts.Clear();

            FrameworkAttRegister.DestroyStaticAttEvent(MainLoopEvent.OnLevelLeaved, typeof(GameUIControl), "ListenerScene");
            FrameworkAttRegister.DestroyStaticAttEvent(MainLoopEvent.OnLevelWasLoaded, typeof(GameUIControl), "ListenSceneEnter");
        }
Esempio n. 6
0
        protected override void OnDestroy()
        {
            this.enterParams = null;
            this.enterBefore = false;
#if TOLUA
            if (this.enterFunc != null)
            {
                this.enterFunc.Dispose();
                this.enterFunc = null;
            }

            if (this.exitFunc != null)
            {
                this.exitFunc.Dispose();
                this.exitFunc = null;
            }

            if (this.refreshFunc != null)
            {
                this.refreshFunc.Dispose();
                this.refreshFunc = null;
            }

            if (this.releaseFunc != null)
            {
                this.releaseFunc.Dispose();
                this.releaseFunc = null;
            }
#endif

            if (this.ParentLayout != null)
            {
                this.ParentLayout.CloseChildrenFromThis(this);
            }
            this.ParentLayout = null;

            base.OnDestroy();
        }
Esempio n. 7
0
 public void RemoveLayout(AbstractLayout lay)
 {
     layouts.RemoveValue(lay);
 }