Example #1
0
        public override void Draw(SpriteBatch batch)
        {
            batch.Draw(texture, position, Color.White);
            Vector2 textPosition = position;

            textPosition.Y -= 32;
            FontRenderer.RenderFont(batch, Global.font, username + "'s castle", textPosition, 2);
        }
Example #2
0
        public override void Draw(SpriteBatch batch)
        {
            if (texture != null)
            {
                batch.Draw(texture, position, texture.Bounds, Color.White, rotation, new Vector2(texture.Bounds.Center.X, texture.Bounds.Center.Y), 1, SpriteEffects.None, 0);
                batch.Draw(lanceTex, position, lanceTex.Bounds, Color.White, rotation, new Vector2(0, 0), 1, SpriteEffects.None, 0);
            }
            Vector2 textPosition = position;

            textPosition.Y -= 32;
            FontRenderer.RenderFont(batch, Global.font, name, textPosition, 2);
        }
Example #3
0
        public override void Draw(SpriteBatch batch)
        {
            int chatOffset = 55;

            Global.g.Clear(Color.ForestGreen); //Makes the background not red. (clears and makes the background green)

            batch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullNone, null, camera.TranslationMatrix);
            objects.Draw(batch);
            while (Global.chat.Count() > 4)
            {
                Global.chat.RemoveAt(0);
            }
            for (int i = Global.chat.Count(); i > 0; i--)
            {
                Message msg = Global.chat[i - 1];
                FontRenderer.RenderFont(batch, Global.font, msg.text.ToLower(), new Vector2(0, 65 - chatOffset), 1, msg.GetColor());
                chatOffset -= 10;
            }
            FontRenderer.RenderFont(batch, Global.font, toChat, new Vector2(0, 0), 1, Color.White);
            batch.End();
        }
Example #4
0
        public override void Draw(SpriteBatch batch)
        {
            //Global.g.Clear(Color.Black);

            batch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullNone);
            batch.Draw(textbox, new Vector2(100, 200), null, Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 1);
            batch.Draw(textbox, new Vector2(400, 200), null, Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 1);
            batch.Draw(Longtextbox, new Vector2(325, 650), null, Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 1);
            batch.Draw(texture, texturePosition, texture.Bounds, Color.White, 0, Vector2.Zero, 16, SpriteEffects.None, 0);
            FontRenderer.RenderFont(batch, font, "press the #a button #nto continue", new Vector2(500, 270));

            FontRenderer.RenderFont(batch, font, "press the #b button #nto reload the image", new Vector2(500, 400));



            FontRenderer.RenderFont(batch, font, "connect", new Vector2(100, 150), 4, target == 0 ? Color.Yellow : Color.White);
            FontRenderer.RenderFont(batch, font, "host", new Vector2(400, 150), 4, target == 1 ? Color.Orange : Color.White);
            FontRenderer.RenderFont(batch, font, "ip", new Vector2(500, 600), 4, target == 2 ? Color.Magenta : Color.White);
            FontRenderer.RenderFont(batch, font, boxValue[0], boxBox[0], 4, Color.Black);
            FontRenderer.RenderFont(batch, font, boxValue[1], boxBox[1], 4, Color.Black);
            FontRenderer.RenderFont(batch, font, boxValue[2], boxBox[2], 4, Color.Black);

            batch.End();
        }