public override void Backward(IUIBase ui) { if (ui == null) { return; } INGUIInterface ngui_base = ui as INGUIInterface; if (ngui_base == null) { return; } for (int i = 0; i < ngui_base.Panels.Length; i++) { ms_all_depths.Remove(ngui_base.Panels[i].depth); ngui_base.Panels[i].depth = i; } if (ms_all_depths.Count > 0) { ms_cur_top_depth = ms_all_depths[0]; } else { ms_cur_top_depth = MAIN_UI_MAX_DEPTH; } }
public override void Forward(IUIBase ui) { if (ui == null) { return; } INGUIInterface ngui_base = ui as INGUIInterface; if (ngui_base == null) { return; } ms_all_depths.Sort((s1, s2) => s2 - s1); if (ms_all_depths.Count > 0) { ms_cur_top_depth = ms_all_depths[0]; } for (int i = 0; i < ngui_base.Panels.Length; ++i) { ngui_base.Panels[i].depth = ms_cur_top_depth + i + 1; ms_all_depths.Add(ngui_base.Panels[i].depth); } ms_cur_top_depth = ms_cur_top_depth + ngui_base.Panels.Length; }