Example #1
0
        public void LeaveSection(InGameMenuSection section)
        {
            if (sectionStack.Count > 0)
            {
                InGameMenuSection activeSection = sectionStack.Pop();
                if (activeSection != section)
                {
                    throw new InvalidOperationException();
                }

                activeSection.OnHide();

                if (sectionStack.Count > 0)
                {
                    sectionStack.Peek().OnShow(this);
                }
            }
        }