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; } }
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; } }
public void PlayStream() { if (radioUrl != "") { waveOutEvent.Play(); PlayContainer.Hide(); StopContainer.Show(); } }
private void ShowMenu() { PlayAudioEvent paei = new PlayAudioEvent(); paei.musicType = MusicType.MENU; paei.FireEvent(); menu.Show(); }
private void ShowCommandDialog(Vector2 cellPosition) { GetEnemyNeighbors(); if (_enemyNeighbors.Count > 0) { _fireButton.Show(); } else { _fireButton.Hide(); } _commandDialog.RectPosition = _map.MapToWorldCenter(cellPosition); _commandDialog.Show(); }
public void SetGameMode(GameMode gameMode) { if (gameMode == GameMode.ChatBot) { _freeTextInput.GetParent <VBoxContainer>().Show(); _dialogueOptionsContainer.Hide(); } else { _freeTextInput.GetParent <VBoxContainer>().Hide(); _dialogueOptionsContainer.Show(); ClearDialogueOptions(); } }
public void StopStream() { waveOutEvent.Stop(); StopContainer.Hide(); PlayContainer.Show(); }
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(); } } }
private void ShowGameOver(GameOverEvent goei) { HideAll(); gameOver.Show(); }
private void ShowWin(WinEvent wei) { HideAll(); win.Show(); }
public void _OnMenuPressed() { mainMenu.Hide(); optionsMenu.Show(); state = EGuiState.OPTIONS; }
public void UpdateView(VBoxContainer view) { CurrentInterface.Hide(); view.Show(); CurrentInterface = view; }