Пример #1
0
 public IMenuStack(MenuPage rootPage, Boolean drawBackground)
 {
     rootMenu = rootPage;
     MenuTrail.Push(rootMenu);
     currentPage    = getIMenuPageFromEnum(rootMenu);
     DrawBackground = drawBackground;
 }
Пример #2
0
 public void resetToMain()
 {
     MenuTrail.Clear();
     MenuTrail.Push(rootMenu);
     currentPage = getIMenuPageFromEnum(rootMenu);
     currentPage.enteringMenu();
 }
Пример #3
0
        private MenuPage rootMenu; //furthest menu to go back to, e.g. Splash

        #endregion Fields

        #region Constructors

        public IMenuStack(MenuPage rootPage, Boolean drawBackground)
        {
            rootMenu = rootPage;
            MenuTrail.Push(rootMenu);
            currentPage = getIMenuPageFromEnum(rootMenu);
            DrawBackground = drawBackground;
        }
Пример #4
0
 void setCurrentPage(IMenuPage page)
 {
     if (page == currentPage)
     {
         return;                      //No change so do nothing
     }
     currentPage.leavingMenu();
     currentPage = page;
     page.enteringMenu();
 }
Пример #5
0
 void setCurrentPage(IMenuPage page)
 {
     if (page == currentPage) return; //No change so do nothing
     currentPage.leavingMenu();
     currentPage = page;
     page.enteringMenu();
 }
Пример #6
0
 public void resetToMain()
 {
     MenuTrail.Clear();
     MenuTrail.Push(rootMenu);
     currentPage = getIMenuPageFromEnum(rootMenu);
     currentPage.enteringMenu();
 }