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; }
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; }
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; }
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>; }
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) { }
public TextBox(int x, int y, int width, int height, Screen screen, string _message) : this(x, y, width, height, screen, new string[] { _message }) { }
public InteractivePanel(int x, int y, int width, int height, Screen screen) : base(x, y, width, height, screen) { }
public Panel(int x, int y, int width, int height, Screen screen) : this(x, y, width, height, Color.Black, Color.DarkGray, screen) { }
public MessageLog(int x, int y, int width, int height, Screen screen) : this(x, y, width, height, screen, new Color(0xEB, 0xC0, 0x2C)) { }