public void WriteBox(int x, int y, int w, int h, CurseDecoration d) { byte[] deco; switch (d) { case CurseDecoration.DoubleLine: deco = m_CurseDecorationDoubleLine; break; case CurseDecoration.Block: deco = m_CurseDecorationBlock; break; default: deco = m_CurseDecorationBlock; break; } m_CharBuffer[x + y * CharsWide] = deco[0]; m_CharBuffer[x + w + y * CharsWide] = deco[2]; m_CharBuffer[x + (y + h) * CharsWide] = deco[6]; m_CharBuffer[x + w + (y + h) * CharsWide] = deco[8]; for (int i = 1; i < w; i++) { m_CharBuffer[x + i + y * CharsWide] = deco[1]; m_CharBuffer[x + i + (y + h) * CharsWide] = deco[7]; } for (int i = 1; i < h; i++) { m_CharBuffer[x + (y + i) * CharsWide] = deco[3]; m_CharBuffer[x + w + (y + i) * CharsWide] = deco[5]; } }