Exemple #1
0
        public override bool Draw()
        {
            if (!base.Draw())
                return false;

            MyGuiSandbox.DrawGameLogo(m_transitionAlpha);
            DrawObfuscationStatus();
            DrawSteamStatus();
            DrawAppVersion();
            DrawBuildDate();

            return true;
        }
        private void DrawInternal()
        {
            Color colorQuote = new Color(255, 255, 255, 250);     //  White

            colorQuote.A = (byte)(colorQuote.A * m_transitionAlpha);
            {
                //////////////////////////////////////////////////////////////////////
                //  Normal loading screen
                //////////////////////////////////////////////////////////////////////

                //  Random background texture
                Rectangle backgroundRectangle;
                MyGuiManager.GetSafeHeightFullScreenPictureSize(MyGuiConstants.LOADING_BACKGROUND_TEXTURE_REAL_SIZE, out backgroundRectangle);
                MyGuiManager.DrawSpriteBatch(m_backgroundScreenTexture, backgroundRectangle, new Color(new Vector4(1f, 1f, 1f, m_transitionAlpha)));
                MyGuiManager.DrawSpriteBatch(MyGuiConstants.TEXTURE_BACKGROUND_FADE, backgroundRectangle, new Color(new Vector4(1f, 1f, 1f, m_transitionAlpha)));

                //  Game logo
                MyGuiSandbox.DrawGameLogo(m_transitionAlpha);
            }

            LastBackgroundTexture = m_backgroundScreenTexture;

            //  Loading Please Wait
            MyGuiManager.DrawString(m_font, MyTexts.Get(MyCommonTexts.LoadingPleaseWaitUppercase),
                                    MyGuiConstants.LOADING_PLEASE_WAIT_POSITION, MyGuiSandbox.GetDefaultTextScaleWithLanguage() * MyGuiConstants.LOADING_PLEASE_WAIT_SCALE, new Color(MyGuiConstants.LOADING_PLEASE_WAIT_COLOR * m_transitionAlpha),
                                    MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_BOTTOM);

            // Draw quote
            {
                if (string.IsNullOrEmpty(m_customTextFromConstructor))
                {
                    var font = m_font;
                    var controlBottomLeft = m_quoteTextControl.GetPositionAbsoluteBottomLeft();
                    var textSize          = m_quoteTextControl.TextSize;
                    var controlSize       = m_quoteTextControl.Size;
                    var authorTopLeft     = controlBottomLeft +
                                            new Vector2((controlSize.X - textSize.X) * 0.5f + 0.025f, 0.025f);
                    MyGuiManager.DrawString(font, m_authorWithDash, authorTopLeft,
                                            MyGuiSandbox.GetDefaultTextScaleWithLanguage());
                }
                m_quoteTextControl.Draw(1, 1);
            }
        }
Exemple #3
0
        public override bool Draw()
        {
            if (!base.Draw())
            {
                return(false);
            }

            MyGuiSandbox.DrawGameLogo(m_transitionAlpha);

            if (DrawBuildInformation)
            {
                DrawObfuscationStatus();
                DrawSteamStatus();
                DrawAppVersion();
                DrawBuildDate();
            }

            return(true);
        }
Exemple #4
0
        public override bool Draw()
        {
            if (!base.Draw())
            {
                return(false);
            }

            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            //  Credits
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

            float movingY = m_scrollingPositionY;

            var font = MyFontEnum.GameCredits;

            for (int i = 0; i < MyPerGameSettings.Credits.Departments.Count; i++)
            {
                MyGuiManager.DrawString(font, MyPerGameSettings.Credits.Departments[i].Name,
                                        new Vector2(0.5f, movingY), 0.78f,
                                        ChangeTextAlpha(color, movingY),
                                        MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER);
                movingY += 0.05f;

                for (int j = 0; j < MyPerGameSettings.Credits.Departments[i].Persons.Count; j++)
                {
                    MyGuiManager.DrawString(font, MyPerGameSettings.Credits.Departments[i].Persons[j].Name,
                                            new Vector2(0.5f, movingY), 1.04f,
                                            ChangeTextAlpha(color, movingY),
                                            MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER);
                    movingY += 0.05f;
                }

                movingY += 0.04f;
            }

            movingY += 0.05f;

            for (int i = 0; i < MyPerGameSettings.Credits.CreditNotices.Count; i++)
            {
                var notice = MyPerGameSettings.Credits.CreditNotices[i];
                if (notice.LogoTexture != null)
                {
                    if (notice.LogoNormalizedSize.HasValue)
                    {
                        MyGuiManager.DrawSpriteBatch(
                            notice.LogoTexture,
                            new Vector2(0.5f, movingY),
                            notice.LogoNormalizedSize.Value,
                            ChangeTextAlpha(color, movingY),
                            MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER);
                    }
                    else if (notice.LogoScale.HasValue)
                    {
                        MyGuiManager.DrawSpriteBatch(
                            notice.LogoTexture,
                            new Vector2(0.5f, movingY),
                            notice.LogoScale.Value,
                            ChangeTextAlpha(color, movingY),
                            MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER,
                            0.0f, Vector2.Zero);
                    }
                    else
                    {
                        throw new InvalidBranchException();
                    }
                    movingY += notice.LogoOffset;
                }

                for (int j = 0; j < notice.CreditNoticeLines.Count; j++)
                {
                    MyGuiManager.DrawString(font, notice.CreditNoticeLines[j],
                                            new Vector2(0.5f, movingY), 0.78f,
                                            ChangeTextAlpha(color, movingY),
                                            MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER);
                    movingY += 0.025f;
                }

                movingY += 0.15f;
            }

            //  This will start scrolling again after last word was scrolled through the top
            if (movingY <= 0)
            {
                ResetScrollingPositionY();
            }

            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            //  Company Logo - with shadow (thus drawing two times)
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

            MyGuiSandbox.DrawGameLogo(m_transitionAlpha);

            return(true);
        }