public MyGuiScreenLoading(MyGuiScreenGamePlay screenToLoad, MyGuiScreenGamePlay screenToUnload, MyTexture2D textureFromConstructor) : 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_currentQuoteOfTheDay = MyQuoteOfTheDay.GetRandomQuote(); Vector2 loadingTextSize = MyGuiManager.GetNormalizedSize(MyGuiManager.GetFontMinerWarsBlue(), MyTextsWrapper.Get(MyTextsWrapperEnum.LoadingPleaseWait), MyGuiConstants.LOADING_PLEASE_WAIT_SCALE); m_rotatingWheelTexture = MyGuiManager.GetLoadingTexture(); Controls.Add(new MyGuiControlRotatingWheel(this, MyGuiConstants.LOADING_PLEASE_WAIT_POSITION - new Vector2(0, 0.075f + loadingTextSize.Y), MyGuiConstants.ROTATING_WHEEL_COLOR, MyGuiConstants.ROTATING_WHEEL_DEFAULT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, m_rotatingWheelTexture)); m_backgroundTextureFromConstructor = textureFromConstructor; m_loadFinished = false; if (m_screenToLoad != null) { MyMinerGame.IsGameReady = false; } }
public MyGuiScreenUnloading(MyGuiScreenGamePlay screenToUnload, MyGuiScreenBase screenToShowAfter) : base(Vector2.Zero, null, null) { m_screenToUnload = screenToUnload; m_closeOnEsc = false; DrawMouseCursor = false; m_loadInDrawFinished = false; m_drawEvenWithoutFocus = true; m_currentQuoteOfTheDay = MyQuoteOfTheDay.GetRandomQuote(); Vector2 loadingTextSize = MyGuiManager.GetNormalizedSize(MyGuiManager.GetFontMinerWarsBlue(), MyTextsWrapper.Get(MyTextsWrapperEnum.LoadingPleaseWait), MyGuiConstants.LOADING_PLEASE_WAIT_SCALE); m_rotatingWheelTexture = MyGuiManager.GetLoadingTexture(); Controls.Add(new MyGuiControlRotatingWheel(this, MyGuiConstants.LOADING_PLEASE_WAIT_POSITION - new Vector2(0, 0.075f + loadingTextSize.Y), MyGuiConstants.ROTATING_WHEEL_COLOR, MyGuiConstants.ROTATING_WHEEL_DEFAULT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, m_rotatingWheelTexture)); m_loadFinished = false; MyMinerGame.IsGameReady = false; m_screenToShowAfter = screenToShowAfter; }
public MyGuiScreenSimpleProgress(MyTextsWrapperEnum caption, StringBuilder text) : base(new Vector2(0.5f, 0.5f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, new Vector2(0.4f, 0.4f)) { m_text = text; m_closeOnEsc = false; m_isTopMostScreen = true; AddCaption(caption, new Vector2(0f, 0.021f)); m_progressWheel = new MyGuiControlRotatingWheel(this, Vector2.Zero, MyGuiConstants.DEFAULT_CONTROL_FOREGROUND_COLOR.ToVector4(), 0.5f, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, MyGuiManager.GetLoadingTexture()); Controls.Add(m_progressWheel); m_progressText = new MyGuiControlLabel(this, new Vector2(0f, 0.12f), null, m_text, MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER); Controls.Add(m_progressText); }