Fix pause edit ui button
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user