예제 #1
0
 public void ClearOverlay()
 {
     overlay = new OverlayChar[rows][];
     for (int row = 0; row < rows; row++)
     {
         overlay[row] = new OverlayChar[columns];
         for (int column = 0; column < columns; column++)
         {
             overlay[row][column] = Whitespace;
         }
     }
     isOverlayDirty = true;
 }
예제 #2
0
 public void ClearOverlay()
 {
     overlay = new OverlayChar[rows][];
     for (int row = 0; row < rows; row++)
     {
         overlay[row] = new OverlayChar[columns];
         for (int column = 0; column < columns; column++)
         {
             overlay[row][column] = Whitespace;
         }
     }
     setRegionDirty(0, 0, (int)columns, (int)rows);
 }
예제 #3
0
    public void DrawBox(char border, Color foreground, Color background, int x, int y, int width, int height)
    {
        OverlayChar cBorder = new OverlayChar(border, foreground, background);
        OverlayChar cClear  = new OverlayChar(' ', foreground, background);

        if (x + width > columns || y + height > rows)
        {
            throw new UnityException("Box does not fit screen!");
        }

        for (int row = 0; row < height; row++)
        {
            for (int column = 0; column < width; column++)
            {
                overlay[y + row][x + column] = column == 0 || row == 0 || column == (width - 1) || row == (height - 1) ? cBorder : cClear;
            }
        }
        isOverlayDirty = true;
    }
예제 #4
0
 public void PutChar(char c, Color foreground, Color background, int x, int y)
 {
     overlay[y][x]  = new OverlayChar(c, foreground, background);
     isOverlayDirty = true;
 }
예제 #5
0
 public void PutChar(char c, Color foreground, Color background, int x, int y)
 {
     overlay[y][x] = new OverlayChar(c, foreground, background);
     setRegionDirty(x, y, 1, 1);
 }