public MyGuiScreenLoading(MyGuiScreenGamePlay screenToLoad, MyGuiScreenGamePlay screenToUnload, string textureFromConstructor, string customText = null)
            : base(Vector2.Zero, null, null)
        {
            MyLoadingPerformance.Instance.StartTiming();

            System.Diagnostics.Debug.Assert(Static == null);
            Static = this;

            m_screenToLoad         = screenToLoad;
            m_screenToUnload       = screenToUnload;
            m_closeOnEsc           = false;
            DrawMouseCursor        = false;
            m_loadInDrawFinished   = false;
            m_drawEvenWithoutFocus = true;
            m_currentQuote         = MyLoadingScreenQuote.GetRandomQuote();
            m_isFirstForUnload     = true;

            // Has to be done because of HW Cursor
            MyGuiSandbox.SetMouseCursorVisibility(false);

            m_rotatingWheelTexture             = MyGuiConstants.LOADING_TEXTURE_LOADING_SCREEN;
            m_backgroundTextureFromConstructor = textureFromConstructor;
            m_customTextFromConstructor        = customText;

            m_loadFinished = false;

            //MyAudio.Static.Mute = true;

            if (m_screenToLoad != null)
            {
                MySandboxGame.IsUpdateReady    = false;
                MySandboxGame.AreClipmapsReady = MySandboxGame.IsDedicated;
            }

            m_authorWithDash = new StringBuilder();

            RecreateControls(true);
        }
示例#2
0
 private static void SetHardwareCursor(bool useHardwareCursor)
 {
     m_currentGraphicsSettings.HardwareCursor = useHardwareCursor;
     MySandboxGame.Static.SetMouseVisible(IsHardwareCursorUsed());
     MyGuiSandbox.SetMouseCursorVisibility(IsHardwareCursorUsed(), false);
 }
示例#3
0
 private static void SetHardwareCursor(bool useHardwareCursor)
 {
     MySandboxGame.Static.SetMouseVisible(IsHardwareCursorUsed());
     MyGuiSandbox.SetMouseCursorVisibility(IsHardwareCursorUsed(), false);
 }