Exemple #1
0
 public TextBox(int x, int y, int width, int height, Screen screen, IEnumerable<string> _messages, SpriteFont _font, Color _color)
     : base(x, y, width, height, screen)
 {
     font = _font;
     textReader = new TextReader(font, width);
     messages = _messages;
     color = _color;
 }
Exemple #2
0
 public Panel(int x, int y, int width, int height, Color backgroundColour, Color BorderColour, Screen screen)
     : base(x, y, width, height)
 {
     margin = 5;
     border = 1;
     Screen = screen;
     BackgroundColour = backgroundColour;
     BorderColour = BorderColour;
 }
Exemple #3
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;
 }
Exemple #4
0
 public MessageLog(int x, int y, int width, int height, Screen screen, Color color)
     : base(x, y, width, height, screen, String.Empty)
 {
     MessageBus.Instance.AddListener(this);
     int textHeight = (int)Font.MeasureString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!?").Y;
     this.bufferSize = (int)Math.Floor((float)(height - (2 * margin)) / textHeight);
     this.color = color;
     buffer = new Queue<string>();
     base.messages = buffer as IEnumerable<string>;
 }
Exemple #5
0
 public TextBox(int x, int y, int width, int height, Screen screen, IEnumerable<string> _messages)
     : this(x, y, width, height, screen, _messages, GraphicsDispenser.GetFont("Calibri"), Color.Gold)
 {
 }
Exemple #6
0
 public TextBox(int x, int y, int width, int height, Screen screen, string _message)
     : this(x, y, width, height, screen, new string[] { _message })
 {
 }
Exemple #7
0
 public InteractivePanel(int x, int y, int width, int height, Screen screen)
     : base(x, y, width, height, screen)
 {
 }
Exemple #8
0
 public Panel(int x, int y, int width, int height, Screen screen)
     : this(x, y, width, height, Color.Black, Color.DarkGray, screen)
 {
 }
Exemple #9
0
 public MessageLog(int x, int y, int width, int height, Screen screen)
     : this(x, y, width, height, screen, new Color(0xEB, 0xC0, 0x2C))
 {
 }