示例#1
0
    private void ChangeState(SendUIEvent suiei)
    {
        //Hide all the ui screens
        HideAllUI();
        //Set the current ui state
        currentState = suiei.uiState;
        //Depending on the state show the needed ui element
        switch (currentState)
        {
        case UIState.MENU:
            menu.Show();
            break;

        case UIState.WAIT_HUD:
            wait.Show();
            break;

        case UIState.PROGRAMMING_HUD:
            programming.Show();
            break;

        case UIState.RUN_HUD:
            run.Show();
            break;

        case UIState.WIN:
            win.Show();
            break;

        case UIState.LOSE:
            lose.Show();
            break;
        }
    }
示例#2
0
    public void Back()
    {
        switch (state)
        {
        case EGuiState.HIDDEN:
            Show();
            if (GetTree().GetNodesInGroup("Players").Count > 0)
            {
                Engine.TimeScale = 0;
            }
            else
            {
                Engine.TimeScale = 1;
            }
            state = EGuiState.MAIN;
            break;

        case EGuiState.MAIN:
            Hide();
            Engine.TimeScale = 1;
            state            = EGuiState.HIDDEN;
            break;

        case EGuiState.OPTIONS:
            optionsMenu.Hide();
            mainMenu.Show();
            state = EGuiState.MAIN;
            break;

        default:
            break;
        }
    }
示例#3
0
 public void PlayStream()
 {
     if (radioUrl != "")
     {
         waveOutEvent.Play();
         PlayContainer.Hide();
         StopContainer.Show();
     }
 }
示例#4
0
    private void ShowMenu()
    {
        PlayAudioEvent paei = new PlayAudioEvent();

        paei.musicType = MusicType.MENU;
        paei.FireEvent();

        menu.Show();
    }
示例#5
0
 private void ShowCommandDialog(Vector2 cellPosition)
 {
     GetEnemyNeighbors();
     if (_enemyNeighbors.Count > 0)
     {
         _fireButton.Show();
     }
     else
     {
         _fireButton.Hide();
     }
     _commandDialog.RectPosition = _map.MapToWorldCenter(cellPosition);
     _commandDialog.Show();
 }
示例#6
0
        public void SetGameMode(GameMode gameMode)
        {
            if (gameMode == GameMode.ChatBot)
            {
                _freeTextInput.GetParent <VBoxContainer>().Show();
                _dialogueOptionsContainer.Hide();
            }
            else
            {
                _freeTextInput.GetParent <VBoxContainer>().Hide();
                _dialogueOptionsContainer.Show();

                ClearDialogueOptions();
            }
        }
示例#7
0
 public void StopStream()
 {
     waveOutEvent.Stop();
     StopContainer.Hide();
     PlayContainer.Show();
 }
示例#8
0
    private void OnConditionClicked(string tab)
    {
        // I couldn't make these slide
        if (tab == "physical")
        {
            var minusButton = physicalConditionsButton.GetNode <TextureButton>("minusButton");
            var plusButton  = physicalConditionsButton.GetNode <TextureButton>("plusButton");

            if (!physicalConditionsBox.Visible)
            {
                physicalConditionsBox.Show();
                minusButton.Show();
                plusButton.Hide();
            }
            else
            {
                physicalConditionsBox.Hide();
                minusButton.Hide();
                plusButton.Show();
            }
        }

        if (tab == "atmospheric")
        {
            var minusButton = atmosphericConditionsButton.GetNode <TextureButton>("minusButton");
            var plusButton  = atmosphericConditionsButton.GetNode <TextureButton>("plusButton");

            if (!atmosphericConditionsBox.Visible)
            {
                atmosphericConditionsBox.Show();
                minusButton.Show();
                plusButton.Hide();
            }
            else
            {
                atmosphericConditionsBox.Hide();
                minusButton.Hide();
                plusButton.Show();
            }
        }

        if (tab == "compounds")
        {
            var minusButton = compoundsButton.GetNode <TextureButton>("minusButton");
            var plusButton  = compoundsButton.GetNode <TextureButton>("plusButton");

            if (!compoundsBox.Visible)
            {
                compoundsBox.Show();
                minusButton.Show();
                plusButton.Hide();
            }
            else
            {
                compoundsBox.Hide();
                minusButton.Hide();
                plusButton.Show();
            }
        }

        if (tab == "species")
        {
            var minusButton = speciesListButton.GetNode <TextureButton>("minusButton");
            var plusButton  = speciesListButton.GetNode <TextureButton>("plusButton");

            if (!speciesList.Visible)
            {
                speciesList.Show();
                minusButton.Show();
                plusButton.Hide();
            }
            else
            {
                speciesList.Hide();
                minusButton.Hide();
                plusButton.Show();
            }
        }
    }
示例#9
0
 private void ShowGameOver(GameOverEvent goei)
 {
     HideAll();
     gameOver.Show();
 }
示例#10
0
 private void ShowWin(WinEvent wei)
 {
     HideAll();
     win.Show();
 }
示例#11
0
 public void _OnMenuPressed()
 {
     mainMenu.Hide();
     optionsMenu.Show();
     state = EGuiState.OPTIONS;
 }
示例#12
0
 public void UpdateView(VBoxContainer view)
 {
     CurrentInterface.Hide();
     view.Show();
     CurrentInterface = view;
 }