internal bool Stack(WUIMenu wUIMenu) { if (baseComponents.wUIMenuStack.Contains(wUIMenu)) { return(false); } if (baseComponents.wUIMenuStack.Count > 0) { WUIMenu currentWUIMenu = baseComponents.wUIMenuStack.Peek(); if (currentWUIMenu != null) { if (currentWUIMenu.blockStack) { return(false); } currentWUIMenu.Unfocus(); } } wUIMenu.transform.position = baseComponents.wUIMenuStack.Count == 0 ? baseComponents.wUIMenuContainer.transform.position : baseData.deltaPosition; wUIMenu.Focus(); baseComponents.wUIMenuStack.Push(wUIMenu); return(true); }
internal void Unstack() { baseComponents.wUIMenuStack.Pop(); if (baseComponents.wUIMenuStack.Count > 0) { WUIMenu currentWUIMenu = baseComponents.wUIMenuStack.Peek(); if (currentWUIMenu != null) { currentWUIMenu.Focus(); } } else { baseComponents.background.gameObject.SetActive(false); } }