Fix escape not exiting from the edit ui mode but rather closing entirely in pause menu
This commit is contained in:
@@ -675,19 +675,8 @@ public class CustomGamePlayer : MonoBehaviour
|
||||
|
||||
internal void TogglePause()
|
||||
{
|
||||
if (CustomGamePlayerPauseMenu.Instance != null && CustomGamePlayerPauseMenu.Instance.statsMenu.activeSelf)
|
||||
{
|
||||
CustomGamePlayerPauseMenu.Instance.statsMenuExitButton.onClick.Invoke();
|
||||
return;
|
||||
}
|
||||
if (pausePanel.activeSelf)
|
||||
{
|
||||
DisablePause();
|
||||
}
|
||||
else
|
||||
{
|
||||
EnablePause();
|
||||
}
|
||||
if (pausePanel.activeSelf) DisablePause();
|
||||
else EnablePause();
|
||||
}
|
||||
|
||||
internal void EnablePause()
|
||||
@@ -700,12 +689,21 @@ public class CustomGamePlayer : MonoBehaviour
|
||||
|
||||
internal void DisablePause()
|
||||
{
|
||||
if (CustomGamePlayerPauseMenu.Instance.statsMenu.activeSelf)
|
||||
{
|
||||
CustomGamePlayerPauseMenu.Instance.statsMenuExitButton.onClick.Invoke();
|
||||
return;
|
||||
}
|
||||
if (CustomGamePlayerPauseMenu.Instance.editingUI == true)
|
||||
{
|
||||
CustomGamePlayerPauseMenu.Instance.ToggleEditingUI();
|
||||
return;
|
||||
}
|
||||
lastMoveTime = Time.time;
|
||||
Cursor.visible = false;
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
backgroundMusic.GetComponent<GameMusicHandler>().ResumeMusic();
|
||||
pausePanel.SetActive(false);
|
||||
if (CustomGamePlayerPauseMenu.Instance.editingUI == true) CustomGamePlayerPauseMenu.Instance.ToggleEditingUI();
|
||||
}
|
||||
|
||||
void OnApplicationPause(bool pause)
|
||||
|
||||
Reference in New Issue
Block a user