예제 #1
0
        private MenuWindow RemoveLast()
        {
            MenuWindow last = _navigationBackstack[_navigationBackstack.Count - 1];

            if (_navigationBackstack.Count > 1)
            {
                _navigationBackstack.RemoveAt(_navigationBackstack.Count - 1);
            }
            return(last);
        }
예제 #2
0
        public void Goto(MenuWindow next, bool addToBackStack)
        {
            MenuWindow prev = _navigationBackstack.LastOrDefault();

            if (addToBackStack)
            {
                _navigationBackstack.Add(next);
            }
            next.SetHeader(GetCurrentPath(), !OnMainMenu());
            MoveTo(next.transform as RectTransform);
            OnWindowChanged?.Invoke(prev, next);
        }