Beispiel #1
0
    public override void _Ready()
    {
        LoadNodes();
        ConnectSignals();

        StopContainer.Hide();

        foreach (Dictionary radio in StationHandler.GetStationList())
        {
            AddRadioItem(radio);
        }
    }
Beispiel #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;
        }
    }
Beispiel #3
0
 public void PlayStream()
 {
     if (radioUrl != "")
     {
         waveOutEvent.Play();
         PlayContainer.Hide();
         StopContainer.Show();
     }
 }
Beispiel #4
0
 //Hides all the ui elements that are in the ui scen
 public void HideAllUI()
 {
     //Hide all the ui elements, used when transitioning from one scene to another
     menu.Hide();
     wait.Hide();
     programming.Hide();
     run.Hide();
     win.Hide();
     lose.Hide();
 }
Beispiel #5
0
        public void SetGameMode(GameMode gameMode)
        {
            if (gameMode == GameMode.ChatBot)
            {
                _freeTextInput.GetParent <VBoxContainer>().Show();
                _dialogueOptionsContainer.Hide();
            }
            else
            {
                _freeTextInput.GetParent <VBoxContainer>().Hide();
                _dialogueOptionsContainer.Show();

                ClearDialogueOptions();
            }
        }
Beispiel #6
0
    public void _CommandDialogPressed(int iCommand)
    {
        Command command = (Command)iCommand;

        if (command == Command.FIRE)
        {
            foreach (Unit unit in _enemyNeighbors.Values)
            {
                unit.StrobeAnimation();
            }
        }
        else
        {
            _selectedUnit = null;
            _enemyNeighbors.Clear();
        }
        _commandDialog.Hide();
    }
Beispiel #7
0
    public override void _Ready()
    {
        globals     = GetTree().Root.GetNode("Globals") as Globals;
        titleScreen = GetNode <VBoxContainer>("Title Screen");
        mainMenu    = titleScreen.GetNode <VBoxContainer>("Main Menu");
        play        = mainMenu.GetNode <TextureButton>("Play");
        menu        = mainMenu.GetNode <TextureButton>("Menu");
        exit        = mainMenu.GetNode <TextureButton>("Exit");

        optionsMenu = titleScreen.GetNode <VBoxContainer>("Options Menu");
        bgm         = optionsMenu.GetNode <HBoxContainer>("Music").GetNode <HSlider>("Slider");
        playerSfx   = optionsMenu.GetNode <HBoxContainer>("Player SFX").GetNode <HSlider>("Slider");
        enemySfx    = optionsMenu.GetNode <HBoxContainer>("Enemy SFX").GetNode <HSlider>("Slider");
        optionsMenu.Hide();

        play.Connect("pressed", this, "_OnPlayPressed");
        menu.Connect("pressed", this, "_OnMenuPressed");
        exit.Connect("pressed", this, "_OnExitPressed");

        bgm.Connect("value_changed", this, "_OnBgmDbChanged");
        playerSfx.Connect("value_changed", this, "_OnPlayerSfxDbChanged");
        enemySfx.Connect("value_changed", this, "_OnEnemySfxDbChanged");

        bgm.Value       = globals.MusicDb;
        playerSfx.Value = globals.PlayerSfxDb;
        enemySfx.Value  = globals.EnemySfxDb;

        bgm.MaxValue       = 15f;
        bgm.Value          = globals.MusicDb;
        bgm.MinValue       = globals.minDb;
        playerSfx.MaxValue = 15;
        playerSfx.Value    = globals.PlayerSfxDb;
        playerSfx.MinValue = globals.minDb;
        enemySfx.MaxValue  = 15f;
        enemySfx.Value     = globals.EnemySfxDb;
        enemySfx.MinValue  = globals.minDb;
    }
Beispiel #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();
            }
        }
    }
Beispiel #9
0
 private void ChoicePressed(int choice, EventEffect effect, float number)
 {
     prompt.Hide();
     GetNode <VBoxContainer>(String.Format("Outcome{0}", choice)).Visible = true;
     GetNode <EventSystem>("../../..").ProcessEvent(effect, number);
 }
Beispiel #10
0
 private void HideAll()
 {
     menu.Hide();
     win.Hide();
     gameOver.Hide();
 }
Beispiel #11
0
 public void _OnMenuPressed()
 {
     mainMenu.Hide();
     optionsMenu.Show();
     state = EGuiState.OPTIONS;
 }
Beispiel #12
0
 public void UpdateView(VBoxContainer view)
 {
     CurrentInterface.Hide();
     view.Show();
     CurrentInterface = view;
 }