Example #1
0
        public static void SetScreen(Screen newScreen)
        {
            CurrentScreen?.ChangeFrom();

            CurrentScreen = newScreen;

            if (ControllerHandler.IsConnected())
            {
                GameInstance.IsMouseVisible = GameInstance.IsMouseVisible && newScreen.MouseVisible;
            }
            else
            {
                GameInstance.IsMouseVisible = CurrentScreen.MouseVisible;
            }

            CurrentScreen.ChangeTo();
        }