/// <summary> /// Draw inventory panel /// </summary> /// <param name="brush"></param> public override void DrawContent(Brush brush) { int columnOffset = 0; int y = 0; var font = GraphicsDispenser.GetFont("Calibri"); int columnWidth = Width / items.Length; int source = 0; int index = 0; foreach (var container in items) { index = 0; y = 0; foreach (var item in container) { brush.DrawString(font, item.Name, new Vector2(columnOffset + 5, y), selectedSource == source && selectedIndex == index ? Color.Yellow : Color.White); y += font.LineSpacing; ++index; } ++source; columnOffset = columnWidth * source; brush.DrawLine(new Vector2(columnOffset, 0), new Vector2(columnOffset, Height), Color.White); } }
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, IEnumerable <string> _messages) : this(x, y, width, height, _messages, GraphicsDispenser.GetFont("Default"), Color.Gold) { }