public IMenuStack(MenuPage rootPage, Boolean drawBackground) { rootMenu = rootPage; MenuTrail.Push(rootMenu); currentPage = getIMenuPageFromEnum(rootMenu); DrawBackground = drawBackground; }
public void resetToMain() { MenuTrail.Clear(); MenuTrail.Push(rootMenu); currentPage = getIMenuPageFromEnum(rootMenu); currentPage.enteringMenu(); }
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; }
void setCurrentPage(IMenuPage page) { if (page == currentPage) { return; //No change so do nothing } currentPage.leavingMenu(); currentPage = page; page.enteringMenu(); }
void setCurrentPage(IMenuPage page) { if (page == currentPage) return; //No change so do nothing currentPage.leavingMenu(); currentPage = page; page.enteringMenu(); }