public void Dialog(char[,] viewport, char border, string title, int ys, int xs, int yf, int xf) { if (isOpen == true) { Draw.Box(viewport, border, ys, xs, yf, xf); Draw.PerpendicularLine(viewport, border, ys + 2, xs, ys + 2, xf); Draw.Sentence(viewport, title, ys + 1, xs + 2); char[,] content = new char[yf - 6, xf - 4]; content = Draw.Rectangle(content, '$', 0, 0, yf - 7, xf - 5); Draw.Sprite(viewport, content, ys + 3, xs + 1); } }
public void Dropdown(char[,] viewport, char border, int y, int x, int width) { if (isOpen == true) { Draw.Box(viewport, border, y, x, y + options.Length, x + width); for (int i = 0; i < options.Length / 2; i++) { string option = ""; option = options[i, 0]; int current = i + 1; string display = Convert.ToString(current) + ". " + option; Draw.Sentence(viewport, display, 2 * i + (y + 1), x + 1); } } }
public char[,] Default() { char[,] viewport = new char[height, width]; //fill with background viewport = Draw.Rectangle(viewport, background, 0, 0, height - 1, width - 1); //add border if (addBorder == true) { viewport = Draw.Box(viewport, border, 0, 0, height - 1, width - 1); return(viewport); } else { return(viewport); } }