prep settings menu for real

This commit is contained in:
minenice55 2022-07-08 18:49:15 -04:00
parent 2409a20aab
commit be5aff5aae
3 changed files with 1581 additions and 98 deletions

File diff suppressed because it is too large Load diff

View file

@ -97,6 +97,24 @@ namespace HeavenStudio
fade.GetComponent<SpriteRenderer>().color = new Color(0, 0, 0, 0); fade.GetComponent<SpriteRenderer>().color = new Color(0, 0, 0, 0);
fade.GetComponent<SpriteRenderer>().DOColor(Color.black, fadeDuration).OnComplete(() => { SceneManager.LoadScene(loadedScene); fade.GetComponent<SpriteRenderer>().DOColor(new Color(0, 0, 0, 0), fadeDuration).OnComplete(() => { Destroy(fade); }); }); fade.GetComponent<SpriteRenderer>().DOColor(Color.black, fadeDuration).OnComplete(() => { SceneManager.LoadScene(loadedScene); fade.GetComponent<SpriteRenderer>().DOColor(new Color(0, 0, 0, 0), fadeDuration).OnComplete(() => { Destroy(fade); }); });
} }
public static void WindowFullScreen()
{
Debug.Log("WindowFullScreen");
// Toggle fullscreen
Screen.fullScreen = !Screen.fullScreen;
if (Screen.fullScreen)
{
// Set the resolution to the display's current resolution
Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, true);
}
else
{
Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, false);
}
}
} }
} }

View file

@ -467,6 +467,11 @@ namespace HeavenStudio.Editor
} }
} }
public void WindowFullScreen()
{
GlobalGameManager.WindowFullScreen();
}
private void UpdateEditorStatus(bool updateTime) private void UpdateEditorStatus(bool updateTime)
{ {
if (discordDuringTesting || !Application.isEditor) if (discordDuringTesting || !Application.isEditor)