Border Class
Definition
Section titled “Definition”Creates a 3D border around a surface.
public class Border : ScreenSurface, IDisposable, IScreenSurfaceEditable, IScreenSurface, IScreenObject, IPositionable, IComponentHost, ISurface, ISurfaceSettable, ICellSurfaceResizeInheritance object → ScreenObject → ScreenSurface
Implements IDisposable, IScreenSurfaceEditable, IScreenSurface, IScreenObject, SadRogue.Primitives.IPositionable, IComponentHost, ISurface, ISurfaceSettable, ICellSurfaceResize
Constructors
Section titled “Constructors”Border(IScreenSurface, BorderParameters, IFont?)
Section titled “Border(IScreenSurface, BorderParameters, IFont?)”Creates a border and adds it as a child object to contents.
public Border(IScreenSurface contents, Border.BorderParameters parameters, IFont? font = null)Parameters
Section titled “Parameters”contents IScreenSurface
The object the border will be around.
parameters Border.BorderParameters
Border.BorderParameters to be used in creating the Border.
font IFont
Optional IFont for the border CellSurface.
Border(IScreenSurface, string)
Section titled “Border(IScreenSurface, string)”Creates a border (with a shadow and a title) and adds it as a child object to contents.
public Border(IScreenSurface contents, string title)Parameters
Section titled “Parameters”contents IScreenSurface
The object the border will be around.
title string
Title to display on the border.
Border(IScreenSurface, string, Color, Color)
Section titled “Border(IScreenSurface, string, Color, Color)”Creates a border (with a shadow and a title) and adds it as a child object to contents.
public Border(IScreenSurface contents, string title, Color textColor, Color borderColor)Parameters
Section titled “Parameters”contents IScreenSurface
The object the border will be around.
title string
Optional title to display on the border.
textColor SadRogue.Primitives.Color
Title text foreground color.
borderColor SadRogue.Primitives.Color
Border line foreground color and title text background color.
Border(Window)
Section titled “Border(Window)”Creates a border and adds it as a child object to the window.
public Border(Window contents)Parameters
Section titled “Parameters”contents Window
The window the border will be around.
Methods
Section titled “Methods”Create3DForSurface(IScreenSurface, string, Color?, Color?, Color?, Color?, Color?)
Section titled “Create3DForSurface(IScreenSurface, string, Color?, Color?, Color?, Color?, Color?)”Creates a chunky 3d border using SadConsole.ICellSurface.Connected3dBox glyphs.
public static Border Create3DForSurface(IScreenSurface contents, string title, Color? titleForeground = null, Color? titleBackground = null, Color? borderBrightColor = null, Color? borderDarkColor = null, Color? borderBetweenColor = null)Parameters
Section titled “Parameters”contents IScreenSurface
The object the border will be around.
title string
Optional title to display on the border.
titleForeground System.NullableSadRogue.Primitives.Color
Foreground color of the title. Defaults to a brighter version of the content’s DefaultBackground.
titleBackground System.NullableSadRogue.Primitives.Color
Background color of the title. Defaults to the content’s DefaultForeground.
borderBrightColor System.NullableSadRogue.Primitives.Color
The bright color of the 3D border. Defaults to SadRogue.Primitives.Color.AnsiWhiteBright.
borderDarkColor System.NullableSadRogue.Primitives.Color
The dark color of the 3D border. Defaults to SadRogue.Primitives.Color.AnsiBlackBright.
borderBetweenColor System.NullableSadRogue.Primitives.Color
The corner color of the 3D border. Defaults to the content’s DefaultBackground.
Returns
Section titled “Returns”Border
The created border, attached to the content.
Remarks
Section titled “Remarks”For a nice looking border, set the content’s DefaultForeground to SadRogue.Primitives.Color.AnsiWhite and the DefaultBackground to SadRogue.Primitives.Color.AnsiBlue, before calling this method.
CreateForSurface(IScreenSurface, string)
Section titled “CreateForSurface(IScreenSurface, string)”Helper method to add a border to a surface.
public static void CreateForSurface(IScreenSurface contents, string title)Parameters
Section titled “Parameters”contents IScreenSurface
The object the border will be around.
title string
Optional title to display on the border.
CreateForWindow(Window)
Section titled “CreateForWindow(Window)”Helper method to add a border to a window.
public static void CreateForWindow(Window contents)Parameters
Section titled “Parameters”contents Window
The window the border will be around.