public void Set(ProChar symbol) { Copy(ref originalScreen, ref screen); Copy(ref proposedScreen, ref screen); proposedScreen[symbol.X, symbol.Y] = symbol; screenState = ScreenState.Changed; }
public Screen(int width, int height, ConsoleColor foreColor, ConsoleColor backColor) { this.width = width; this.height = height; this.foreColor = foreColor; this.backColor = backColor; screen = new ProChar[width, height]; Copy(ref proposedScreen, ref screen); Copy(ref originalScreen, ref screen); for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { screen[x, y] = new ProChar(' ', x, y, foreColor, backColor); } } screenState = ScreenState.Normal; }
protected void loadTitle() { int leftMagrin = 2; for (int fx = leftMagrin; fx < this.finalTitle.Length + leftMagrin + 4; fx++) { window[fx, 0].CopySymbol(Borders[22]); if (fx > 3 && fx < finalTitle.Length - 1 + leftMagrin + 3) { window[fx, 0].CopySymbol(new ProChar(Char.Parse(finalTitle[fx - leftMagrin - 2].ToString()), ConsoleColor.White, ConsoleColor.Black)); window[fx, 0].ForeColor = titleColor; window[fx, 0].BackColor = ProChar.GetInvertedColor(titleColor); } if (fx == 0 + leftMagrin) { window[fx, 0].CopySymbol(Borders[7 + 11]); } if (fx == finalTitle.Length - 1 + leftMagrin + 4) { window[fx, 0].CopySymbol(Borders[6 + 11]); } } }
public void CopySymbol(ProChar source) { this = new ProChar(source.Character, this.X, this.Y, this.ForeColor, this.BackColor); }
public void CopyChar(ProChar source) { this = source; }