Пример #1
0
        /// <summary>
        /// Draws the screen and all the components in it.
        /// </summary>
        public override void DrawScreen(int par1, int par2, float par3)
        {
            Func_41040_b(par1, par2, par3);
            Tessellator tessellator = Tessellator.Instance;
            int         c           = 274;
            int         i           = Width / 2 - c / 2;
            int         j           = Height + 50;
            float       f           = -((float)UpdateCounter + par3) * Field_41043_e;

            //GL.PushMatrix();
            //GL.Translate(0.0F, f, 0.0F);
            //GL.BindTexture(TextureTarget.Texture2D, Mc.RenderEngineOld.GetTexture("/title/mclogo.png"));
            //GL.Color4(1.0F, 1.0F, 1.0F, 1.0F);
            DrawTexturedModalRect(i, j, 0, 0, 155, 44);
            DrawTexturedModalRect(i + 155, j, 0, 45, 155, 44);
            tessellator.SetColorOpaque_I(0xffffff);
            int k = j + 200;

            for (int l = 0; l < Lines.Count; l++)
            {
                if (l == Lines.Count - 1)
                {
                    float f1 = ((float)k + f) - (float)(Height / 2 - 6);

                    if (f1 < 0.0F)
                    {
                        //GL.Translate(0.0F, -f1, 0.0F);
                    }
                }

                if ((float)k + f + 12F + 8F > 0.0F && (float)k + f < (float)Height)
                {
                    string s = (string)Lines[l];

                    if (s.StartsWith("[C]"))
                    {
                        FontRenderer.DrawStringWithShadow(s.Substring(3), i + (c - (int)FontRenderer.GetStringWidth(s.Substring(3))) / 2, k, 0xffffff);
                    }
                    else
                    {
                        FontRenderer.FontRandom.SetSeed((int)l * (int)0xfca9953 + (UpdateCounter / 4));
                        FontRenderer.Func_50101_a(s, i + 1, k + 1, 0xffffff, true);
                        FontRenderer.FontRandom.SetSeed((int)l * (int)0xfca9953 + (UpdateCounter / 4));
                        FontRenderer.Func_50101_a(s, i, k, 0xffffff, false);
                    }
                }

                k += 12;
            }

            //GL.PopMatrix();
            //GL.BindTexture(TextureTarget.Texture2D, Mc.RenderEngineOld.GetTexture("%blur%/misc/vignette.png"));
            //GL.Enable(EnableCap.Blend);
            //GL.BlendFunc(BlendingFactorSrc.Zero, BlendingFactorDest.OneMinusSrcColor);
            tessellator.StartDrawingQuads();
            tessellator.SetColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F);
            int i1 = Width;
            int j1 = Height;

            tessellator.AddVertexWithUV(0.0F, j1, ZLevel, 0.0F, 1.0D);
            tessellator.AddVertexWithUV(i1, j1, ZLevel, 1.0D, 1.0D);
            tessellator.AddVertexWithUV(i1, 0.0F, ZLevel, 1.0D, 0.0F);
            tessellator.AddVertexWithUV(0.0F, 0.0F, ZLevel, 0.0F, 0.0F);
            tessellator.Draw();
            //GL.Disable(EnableCap.Blend);
            base.DrawScreen(par1, par2, par3);
        }