Ejemplo n.º 1
0
    private void InternalActivateStoreTab()
    {
        inventoryButton.Deselect();

        var selectedGroup = _groupsController.GetSelectedGroup();

        if (selectedGroup != null)
        {
            _itemsController.ActivateContainer(selectedGroup.Id);
        }
    }
Ejemplo n.º 2
0
 public void Deselect()
 {
     menuButton.Deselect();
 }
Ejemplo n.º 3
0
 private void InternalActivateInventoryTab()
 {
     storeButton.Deselect();
     _itemsController.ActivateContainer(StoreConstants.INVENTORY_CONTAINER_NAME);
 }
Ejemplo n.º 4
0
    private void Awake()
    {
        ShowWindow(false, false);

        if (showAnim == null)
        {
            showAnim = new AnimationSequence(initialShowAnimation, applicationEventRelay.RequestStartingCoroutine);
            startSessionButton.SelectOnShow = true;
            showAnim.OnFinished(() => ShowButtons(true, false));
            // showAnim.OnFinished(() => startSessionButton.Select());
        }

        if (hideAnim == null)
        {
            hideAnim = new AnimationSequence(initialShowAnimation.Reversed(), applicationEventRelay.RequestStartingCoroutine);
            hideAnim.OnFinished(() => startSessionButton.Deselect());
            hideAnim.OnFinished(() => ShowButtons(false, false));
            hideAnim.OnFinished(() => sessionOverviewPanel.SetActive(false));
        }

        restartModalityWindowSettings = new ModalityWindow.ModalityWindowSettings {
            confirmAction = () => {
                applicationEventRelay.RequestStartingCoroutine(Utility.SequenceRoutine(new Func <float>[] {
                    () => {
                        applicationEventRelay.ShowModalityWindow(false, true);
                        ShowButtons(true, true);
                        ShowWindow(false, true);

                        return(1f);
                    },
                    () => {
                        if (applicationEventRelay)
                        {
                            applicationEventRelay.RequestReloadingScene(true);
                        }

                        return(0f);
                    }
                }));
            },
            cancelAction = () => {
                applicationEventRelay.ShowModalityWindow(false, true);
                startSessionButton.SelectOnShow    = false;
                quitTrainingButton.SelectOnShow    = false;
                restartTrainingButton.SelectOnShow = true;
                ShowButtons(true, true);
            },
            displayText = "Restart training program?"
        };

        quitModalityWindowSettings = new ModalityWindow.ModalityWindowSettings {
            confirmAction = () => {
                applicationEventRelay.RequestStartingCoroutine(Utility.SequenceRoutine(new Func <float>[] {
                    () => {
                        applicationEventRelay.ShowModalityWindow(false, true);
                        ShowButtons(true, true);
                        ShowWindow(false, true);

                        return(1f);
                    },
                    () => {
                        if (applicationEventRelay)
                        {
                            applicationEventRelay.RequestLoadingMainMenu(true);
                        }

                        trainingEventRelay.CurrentProgram = null;

                        return(0f);
                    }
                }));
            },
            cancelAction = () => {
                applicationEventRelay.ShowModalityWindow(false, true);
                startSessionButton.SelectOnShow    = false;
                restartTrainingButton.SelectOnShow = false;
                quitTrainingButton.SelectOnShow    = true;
                ShowButtons(true, true);
            },
            displayText = "Return to menu?"
        };

        trainingProgressButton.onSelect.AddListener(SetProgressBar);
    }