示例#1
0
 /// <summary>
 /// Creates a new console using the existing surface.
 /// </summary>
 /// <param name="surface">The surface.</param>
 /// <param name="font">The font to use with the surface.</param>
 /// <param name="fontSize">The font size.</param>
 public ControlsConsole(ICellSurface surface, IFont font = null, Point?fontSize = null) : base(surface, font, fontSize)
 {
     Controls = new ControlHost();
     SadComponents.Add(Controls);
 }
示例#2
0
 /// <summary>
 /// Creates a console with the specified width and height, with <see cref="SadRogue.Primitives.Color.Transparent"/> for the background and <see cref="SadRogue.Primitives.Color.White"/> for the foreground.
 /// </summary>
 /// <param name="width">The width of the console in cells.</param>
 /// <param name="height">The height of the console in cells.</param>
 /// <param name="bufferWidth">The total width of the console in cells.</param>
 /// <param name="bufferHeight">The total height of the console in cells.</param>
 /// <param name="initialCells">The cells to seed the console with. If <see langword="null"/>, creates the cells for you.</param>
 public ControlsConsole(int width, int height, int bufferWidth, int bufferHeight, ColoredGlyph[] initialCells) : base(width, height, bufferWidth, bufferHeight, initialCells)
 {
     Controls = new ControlHost();
     SadComponents.Add(Controls);
 }