Exemple #1
0
        private GUI_AcuPage ValidatePage(GUI_AcuPage requestedPage)
        {
            if (Acu.IsPowered == false)
            {
                return(noPowerPage);
            }
            if (requestedPage.IsProtected && Acu.IsLocked)
            {
                return(lockedMessagePage);
            }

            return(requestedPage);
        }
Exemple #2
0
        private void SetPage(GUI_AcuPage page)
        {
            var currentPage = pageSwitcher.CurrentPage as GUI_AcuPage;

            if (page != currentPage)
            {
                EditValueModal.Close();
                currentPage.OnPageDeactivated();
                pageSwitcher.SetActivePage(page);
                page.OnPageActivated();
            }

            page.OnPeriodicUpdate();
        }
Exemple #3
0
 protected override void InitServer()
 {
     requestedPage = pageSwitcher.DefaultPage as GUI_AcuPage;
     StartCoroutine(WaitForProvider());
 }
Exemple #4
0
 public void BtnRequestPage(int pageIndex)
 {
     PlayClick();
     requestedPage = pageSwitcher.Pages[pageIndex] as GUI_AcuPage;
     SetPage(ValidatePage(requestedPage));
 }