Esempio n. 1
0
        public override void Render(SpriteBatch spBatch, Rectangle containerBounds)
        {
            Rectangle location;
            int       x = this.DrawingBounds.X + containerBounds.X;
            int       y = this.DrawingBounds.Y + containerBounds.Y;

            location = new Rectangle(x, y, this.DrawingBounds.Width, this.DrawingBounds.Height);
            spBatch.Draw(AssetManager.Textures[this.TextureID], location, RenderingPipe.colorMask);
            SimpleTextRenderer.DrawString(this.Font, this.Text, location, Alignment.Center, RenderingPipe.colorMask, ref spBatch);
        }
Esempio n. 2
0
        public override void Render(SpriteBatch spBatch, Rectangle containerBounds)
        {
            Rectangle location;
            int       x = this.DrawingBounds.X + containerBounds.X;
            int       y = this.DrawingBounds.Y + containerBounds.Y;

            location = new Rectangle(x, y, this.DrawingBounds.Width, this.DrawingBounds.Height);
            spBatch.Draw(AssetManager.Textures[CorrectTextureID], location, Color.White);
            SimpleTextRenderer.DrawString(this.Font, this.Text, location, Alignment.Center, Color.White, spBatch, RenderLayer.GUI);
        }
Esempio n. 3
0
        public void Draw(ref SpriteBatch spBatch)
        {
            spBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend);

            spBatch.Draw(this.Logo, this.DisplayZone.Center.ToVector2(), null, this.CalculateMask(), 0, new Vector2(this.Logo.Width / 2, this.Logo.Height / 2), 1.0f, SpriteEffects.None, 1.0f);
            SimpleTextRenderer.DrawString(this.Font, this.Text, this.TextZone, SimpleTextRenderer.Alignment.Left, RenderingPipe.colorMask, ref spBatch);

            this.Frames--;
            spBatch.End();
        }
Esempio n. 4
0
        public static void DrawButtonInContainer(MonoButton button, ref SpriteBatch spBatch, GUIContainer container)
        {
            Rectangle location;
            int       x = button.DrawingBounds.X + container.DrawingBounds.X;
            int       y = button.DrawingBounds.Y + container.DrawingBounds.Y;

            location = new Rectangle(x, y, button.DrawingBounds.Width, button.DrawingBounds.Height);
            spBatch.Draw(button.Image, location, RenderingPipe.colorMask);
            SimpleTextRenderer.DrawString(button.Font, button.Text, location, Alignment.Center, RenderingPipe.colorMask, ref spBatch);
        }
Esempio n. 5
0
        public static void DrawLabelInContainer(MonoLabel label, ref SpriteBatch spBatch, GUIContainer container)
        {
            int x      = container.DrawingBounds.X + label.DrawingBounds.X;
            int y      = container.DrawingBounds.Y + label.DrawingBounds.Y;
            int width  = label.DrawingBounds.Width;
            int height = label.DrawingBounds.Height;

            Rectangle Bounds = new Rectangle(x, y, width, height);

            SimpleTextRenderer.DrawString(label.Font, label.Text, Bounds, label.TextAlignment, RenderingPipe.colorMask, ref spBatch);
        }
Esempio n. 6
0
        public override void Render(SpriteBatch spBatch, Rectangle containerBounds)
        {
            int x      = containerBounds.X + this.DrawingBounds.X;
            int y      = containerBounds.Y + this.DrawingBounds.Y;
            int width  = this.DrawingBounds.Width;
            int height = this.DrawingBounds.Height;

            Rectangle Bounds = new Rectangle(x, y, width, height);

            SimpleTextRenderer.DrawString(this.Font, this.Text, Bounds, this.TextAlignment, RenderingPipe.colorMask, ref spBatch);
        }
Esempio n. 7
0
        public override void Render(SpriteBatch spBatch, Rectangle containerBounds)
        {
            int x      = containerBounds.X + this.DrawingBounds.X;
            int y      = containerBounds.Y + this.DrawingBounds.Y;
            int width  = this.DrawingBounds.Width;
            int height = this.DrawingBounds.Height;

            Rectangle Bounds = new Rectangle(x, y, width, height);

            if (width == 0 || height == 0)
            {
                throw new InvalidDataException("Width or height cannot be 0");
            }

            if (this.Text != null)
            {
                SimpleTextRenderer.DrawString(this.Font, this.Text, Bounds, this.TextAlignment, Color.White, spBatch, RenderLayer.GUI);
            }
        }
Esempio n. 8
0
 private void DrawText(string text, Rectangle target, SpriteFont font, Alignment alignment)
 {
     SimpleTextRenderer.DrawString(font, text, target, alignment, Color.White, this.SpriteBat, 0);
 }
Esempio n. 9
0
 public override void Render(SpriteBatch spBatch, Rectangle targetLocation)
 {
     SimpleTextRenderer.DrawString(this.Font, this.Text, targetLocation, this.Alignment, Color.White, spBatch, RenderLayer.GUI);
 }
Esempio n. 10
0
 public override void Render(SpriteBatch spBatch, Rectangle targetLocation)
 {
     SimpleTextRenderer.DrawString(this.Font, this.Text, targetLocation, SimpleTextRenderer.Alignment.Center, RenderingPipe.colorMask, ref spBatch);
 }