// 重新排序 传过来的放在最上面 public void ResetSortWindowDepth(BaseGUIMediator selectGUIMediator) { int dep = 20; foreach (KeyValuePair <string, List <string> > open in m_OpenWnd) { List <BaseGUIMediator> sortList = new List <BaseGUIMediator>(); foreach (string s in open.Value) { BaseGUIMediator bm = m_regWnd[s]; if (!bm.Equals(selectGUIMediator)) { sortList.Add(bm); } } selectGUIMediator.timestamp = Time.frameCount; sortList.Add(selectGUIMediator); foreach (BaseGUIMediator bm in sortList) { dep = bm.SetDepth(dep); } } }
public void SortWindowDepth() { int dep = 20; foreach (KeyValuePair <string, List <string> > open in m_OpenWnd) { List <BaseGUIMediator> sortList = new List <BaseGUIMediator>(); foreach (string s in open.Value) { BaseGUIMediator bm = m_regWnd[s]; sortList.Add(bm); } //sortList.Sort(CompareFunc); foreach (BaseGUIMediator bm in sortList) { dep = bm.SetDepth(dep); } } }