public void HideUILayout(string layoutname) { AbstractLayout layout = this[layoutname]; if (layout != null) { layout.HideUILayout(); } }
public void Dump() { List <AbstractLayout> lays = this.layouts.Values; for (int i = 0; i < lays.Count; ++i) { AbstractLayout lay = lays[i]; lay.Dump(); } }
public void AddLayout(AbstractLayout lay) { if (!layouts.ContainsKey(lay.LayoutName)) { layouts.Add(lay.LayoutName, lay); } else { LogMgr.LogErrorFormat("{0} 为已经注册的Layout", lay.LayoutName); } }
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); }
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"); }
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(); }
public void RemoveLayout(AbstractLayout lay) { layouts.RemoveValue(lay); }