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

            if (_navigationBackstack.Count > 1)
            {
                _navigationBackstack.RemoveAt(_navigationBackstack.Count - 1);
            }
            return(last);
        }
Beispiel #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);
        }