Fix slider text not disappearing when editing the UI

This commit is contained in:
2025-08-27 20:42:35 -07:00
parent 64836dbe4b
commit 98782c8ce9
2 changed files with 6 additions and 0 deletions

View File

@@ -1432,6 +1432,8 @@ MonoBehaviour:
songLoop: {fileID: 1625416039}
musicSlider: {fileID: 208042169}
sfxSlider: {fileID: 604620478}
musicSliderText: {fileID: 1859415099}
sfxSliderText: {fileID: 699129040}
fpsText: {fileID: 83812371}
scoreText: {fileID: 432923591}
highScoreText: {fileID: 1606868532}

View File

@@ -12,6 +12,8 @@ public class GamePlayerPauseMenu : MonoBehaviour
public AudioSource songLoop;
public Slider musicSlider;
public Slider sfxSlider;
public TMP_Text musicSliderText;
public TMP_Text sfxSliderText;
public TMP_Text fpsText;
public TMP_Text scoreText;
public TMP_Text highScoreText;
@@ -80,6 +82,8 @@ public class GamePlayerPauseMenu : MonoBehaviour
editingUI = !editingUI;
musicSlider.gameObject.SetActive(!musicSlider.gameObject.activeSelf);
sfxSlider.gameObject.SetActive(!sfxSlider.gameObject.activeSelf);
musicSliderText.gameObject.SetActive(musicSlider.gameObject.activeSelf);
sfxSliderText.gameObject.SetActive(sfxSlider.gameObject.activeSelf);
backButton.gameObject.SetActive(!backButton.gameObject.activeSelf);
continueButton.gameObject.SetActive(!continueButton.gameObject.activeSelf);
editUiButton.transform.GetChild(0).GetComponent<TMP_Text>().text = editUiButton.transform.GetChild(0).GetComponent<TMP_Text>().text == "Edit UI" ? "Done" : "Edit UI";