Fix pause edit ui button

This commit is contained in:
2025-09-20 13:51:04 -07:00
parent 55d2e5dbce
commit 391b082a1b
4 changed files with 0 additions and 10 deletions

View File

@@ -1338,7 +1338,6 @@ MonoBehaviour:
sfxSlider: {fileID: 604620478}
musicSliderText: {fileID: 1859415099}
sfxSliderText: {fileID: 699129040}
fpsText: {fileID: 0}
scoreText: {fileID: 432923591}
boostText: {fileID: 497996347}
pauseButton: {fileID: 1577031227}

View File

@@ -1355,7 +1355,6 @@ MonoBehaviour:
sfxSlider: {fileID: 604620478}
musicSliderText: {fileID: 1859415099}
sfxSliderText: {fileID: 699129040}
fpsText: {fileID: 0}
scoreText: {fileID: 432923591}
highScoreText: {fileID: 1606868532}
boostText: {fileID: 497996347}

View File

@@ -14,7 +14,6 @@ public class CustomGamePlayerPauseMenu : MonoBehaviour
public Slider sfxSlider;
public TMP_Text musicSliderText;
public TMP_Text sfxSliderText;
public TMP_Text fpsText;
public TMP_Text scoreText;
public TMP_Text boostText;
public Button pauseButton;
@@ -45,10 +44,8 @@ public class CustomGamePlayerPauseMenu : MonoBehaviour
});
resetUiButton.onClick.AddListener(() =>
{
((RectTransform)fpsText.transform).anchoredPosition = new Vector2(210f, -35f);
((RectTransform)scoreText.transform).anchoredPosition = new Vector2(0f, -70f);
((RectTransform)boostText.transform).anchoredPosition = new Vector2(0f, -190f);
PlayerPrefs.DeleteKey("DraggedUIFPSText");
PlayerPrefs.DeleteKey("DraggedUIScoreText");
PlayerPrefs.DeleteKey("DraggedUIBoostTextCustom");
if (Application.isMobilePlatform)
@@ -78,7 +75,6 @@ public class CustomGamePlayerPauseMenu : MonoBehaviour
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";
resetUiButton.gameObject.SetActive(!resetUiButton.gameObject.activeSelf);
fpsText.GetComponent<DraggableUI>().canDrag = !fpsText.GetComponent<DraggableUI>().canDrag;
scoreText.GetComponent<DraggableUI>().canDrag = !scoreText.GetComponent<DraggableUI>().canDrag;
boostText.GetComponent<DraggableUI>().canDrag = !boostText.GetComponent<DraggableUI>().canDrag;
if (Application.isMobilePlatform)

View File

@@ -14,7 +14,6 @@ public class GamePlayerPauseMenu : MonoBehaviour
public Slider sfxSlider;
public TMP_Text musicSliderText;
public TMP_Text sfxSliderText;
public TMP_Text fpsText;
public TMP_Text scoreText;
public TMP_Text highScoreText;
public TMP_Text boostText;
@@ -47,12 +46,10 @@ public class GamePlayerPauseMenu : MonoBehaviour
});
resetUiButton.onClick.AddListener(() =>
{
((RectTransform)fpsText.transform).anchoredPosition = new Vector2(210f, -35f);
((RectTransform)scoreText.transform).anchoredPosition = new Vector2(0f, -70f);
((RectTransform)highScoreText.transform).anchoredPosition = new Vector2(0f, -140f);
((RectTransform)boostText.transform).anchoredPosition = new Vector2(0f, -190f);
((RectTransform)coinsText.transform).anchoredPosition = new Vector2(260f, 47.5f);
PlayerPrefs.DeleteKey("DraggedUIFPSText");
PlayerPrefs.DeleteKey("DraggedUIScoreText");
PlayerPrefs.DeleteKey("DraggedUIHighScoreText");
PlayerPrefs.DeleteKey("DraggedUIBoostText");
@@ -84,7 +81,6 @@ public class GamePlayerPauseMenu : MonoBehaviour
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";
resetUiButton.gameObject.SetActive(!resetUiButton.gameObject.activeSelf);
fpsText.GetComponent<DraggableUI>().canDrag = !fpsText.GetComponent<DraggableUI>().canDrag;
scoreText.GetComponent<DraggableUI>().canDrag = !scoreText.GetComponent<DraggableUI>().canDrag;
highScoreText.GetComponent<DraggableUI>().canDrag = !highScoreText.GetComponent<DraggableUI>().canDrag;
boostText.GetComponent<DraggableUI>().canDrag = !boostText.GetComponent<DraggableUI>().canDrag;