Example #1
0
        public override void Draw(ZSpriteBatch spriteBatch)
        {
            spriteBatch.DrawRectangle(X, Y, Width, Height, BackgroundColour, this.border, BorderColour);
            Brush brush = new Brush(spriteBatch, this);

            DrawContent(brush);
        }
Example #2
0
 public void Draw(GameTime gameTime, ZSpriteBatch spriteBatch)
 {
     foreach (var panel in Panels)
     {
         panel.Draw(spriteBatch);
     }
 }
Example #3
0
 public void Draw(GameTime gameTime, ZSpriteBatch spriteBatch)
 {
     foreach (var panel in Panels)
     {
         panel.Draw(spriteBatch);
     }
 }
Example #4
0
 public Brush(ZSpriteBatch spriteBatch, Panel panel)
     : base(spriteBatch.GraphicsDevice)
 {
     this.spriteBatch = spriteBatch;
     X      = panel.X;
     Y      = panel.Y;
     Offset = new Vector2(X, Y);
 }
Example #5
0
 public GameState(Game game)
 {
     this.spriteBatch = game.SpriteBatch;
     this.player      = game.Player;
     this.map         = game.Map;
     this.entities    = game.Entities;
     this.Exit        = game.Exit;
     this.font        = game.Font;
 }
Example #6
0
 public GameState(Game game)
 {
     this.spriteBatch = game.SpriteBatch;
     this.player = game.Player;
     this.map = game.Map;
     this.entities = game.Entities;
     this.Exit = game.Exit;
     this.font = game.Font;
 }
Example #7
0
 protected GameState(Game game, Screen screen)
 {
     this.spriteBatch = game.SpriteBatch;
     this.player = game.Player;
     this.map = game.Map;
     this.entities = game.Entities;
     this.Exit = game.Exit;
     this.font = game.Font;
     Screen = screen;
 }
Example #8
0
 protected GameState(Game game, Screen screen)
 {
     this.spriteBatch = game.SpriteBatch;
     this.player      = game.Player;
     this.map         = game.Map;
     this.entities    = game.Entities;
     this.Exit        = game.Exit;
     this.font        = game.Font;
     Screen           = screen;
 }
Example #9
0
 public override void Draw(ZSpriteBatch spriteBatch)
 {
     int currY;
     currY = y;
     spriteBatch.DrawRectangle(X, Y, width, height, Color.Black);
     foreach (string msg in messages)
     {
         foreach (string line in textReader.Lines(msg))
         {
             currY += font.LineSpacing;
             if (currY > Y + Height)
                 return;
             else
             {
                 spriteBatch.DrawString(font, line, new Vector2(X, currY), color);
             }
         }
     }
 }
Example #10
0
        public override void Draw(ZSpriteBatch spriteBatch)
        {
            int currY;

            currY = y;
            spriteBatch.DrawRectangle(X, Y, width, height, Color.Black);
            foreach (string msg in messages)
            {
                foreach (string line in textReader.Lines(msg))
                {
                    currY += font.LineSpacing;
                    if (currY > Y + Height)
                    {
                        return;
                    }
                    else
                    {
                        spriteBatch.DrawString(font, line, new Vector2(X, currY), color);
                    }
                }
            }
        }
Example #11
0
 public override void Draw(ZSpriteBatch spriteBatch)
 {
     spriteBatch.DrawRectangle(X, Y, Width, Height, Color.Black, this.border, Color.DarkGray);
 }
Example #12
0
 public override void Draw(ZSpriteBatch spriteBatch)
 {
     spriteBatch.DrawRectangle(X, Y, Width, Height, BackgroundColour, this.border, BorderColour);
     Brush brush = new Brush(spriteBatch, this);
     DrawContent(brush);
 }
Example #13
0
 public abstract void Draw(ZSpriteBatch spriteBatch);
Example #14
0
 public override void Draw(ZSpriteBatch spriteBatch)
 {
     spriteBatch.DrawRectangle(X, Y, Width, Height, Color.Black, this.border, Color.DarkGray);
 }
Example #15
0
 public abstract void Draw(ZSpriteBatch spriteBatch);