Border.BorderParameters Struct
Definition
Section titled “Definition”The settings to use when creating a Border.
public struct Border.BorderParametersConstructors
Section titled “Constructors”BorderParameters(bool, ShapeParameters?, string?, HorizontalAlignment, Color, Color, bool, bool, bool, int, Color, Color)
Section titled “BorderParameters(bool, ShapeParameters?, string?, HorizontalAlignment, Color, Color, bool, bool, bool, int, Color, Color)”Creates a new instance of this class which contains the settings for drawing a border surface around an existing surface.
public BorderParameters(bool drawBorder, ShapeParameters? borderBox, string? title, HorizontalAlignment titleAlignment, Color titleForeground, Color titleBackground, bool drawShadedArea, bool useDefaultShadedGlyphs, bool useDefaultShadedColors, int shadedGlyph, Color shadedGlyphForeground, Color shadedGlyphBackground)Parameters
Section titled “Parameters”drawBorder bool
When true, indicates the borderBox should be used to draw a border.
borderBox ShapeParameters
The box drawn around the surface.
title string
The title to display on the border.
titleAlignment HorizontalAlignment
The alignment of the title.
titleForeground SadRogue.Primitives.Color
The foreground color of the title.
titleBackground SadRogue.Primitives.Color
The background color of the title.
drawShadedArea bool
When true, indicates the 3d shaded area of the border should be drawn.
useDefaultShadedGlyphs bool
When true, indicates the other shaded properties should be ignored and the default shaded glyphs should be used.
useDefaultShadedColors bool
When true, indicates the other shaded properties should be ignored and the default shaded glyphs should be used.
shadedGlyph int
The glyph to use in the shaded area.
shadedGlyphForeground SadRogue.Primitives.Color
The forground of the shadedGlyph.
shadedGlyphBackground SadRogue.Primitives.Color
The background of the shadedGlyph.
Properties
Section titled “Properties”DrawBorder
Section titled “DrawBorder”When true, indicates the BorderBox should be used to draw a border.
public bool DrawBorder { readonly get; set; }BorderBox
Section titled “BorderBox”The border box creation parameters.
public ShapeParameters? BorderBox { readonly get; set; }The title to display on the border.
public string? Title { readonly get; set; }TitleForeground
Section titled “TitleForeground”The foreground color of the title.
public Color TitleForeground { readonly get; set; }TitleBackground
Section titled “TitleBackground”The background color of the title.
public Color TitleBackground { readonly get; set; }TitleAlignment
Section titled “TitleAlignment”The alignment of the Title.
public HorizontalAlignment TitleAlignment { readonly get; set; }DrawShadedArea
Section titled “DrawShadedArea”When true, indicates the 3d shaded area of the border should be drawn.
public bool DrawShadedArea { readonly get; set; }UseDefaultShadedGlyphs
Section titled “UseDefaultShadedGlyphs”When true, indicates the other shaded properties should be ignored and the default shaded glyphs should be used.
public bool UseDefaultShadedGlyphs { readonly get; set; }UseDefaultShadedColors
Section titled “UseDefaultShadedColors”When true, indicates the other shaded properties should be ignored and the default shaded glyphs should be used.
public bool UseDefaultShadedColors { readonly get; set; }ShadedGlyph
Section titled “ShadedGlyph”The glyph to use in the shaded area.
public int ShadedGlyph { readonly get; set; }ShadedGlyphForeground
Section titled “ShadedGlyphForeground”The forground of the ShadedGlyph.
public Color ShadedGlyphForeground { readonly get; set; }ShadedGlyphBackground
Section titled “ShadedGlyphBackground”The background of the ShadedGlyph.
public Color ShadedGlyphBackground { readonly get; set; }Methods
Section titled “Methods”GetDefault()
Section titled “GetDefault()”Creates an instance of BorderParameters with the thin line as a border, no title and no shadow.
public static Border.BorderParameters GetDefault()Returns
Section titled “Returns”AddTitle(string)
Section titled “AddTitle(string)”Sets the Title parameter with the given text.
public Border.BorderParameters AddTitle(string title)Parameters
Section titled “Parameters”title string
Title text.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
AddTitle(string, Color, Color, HorizontalAlignment)
Section titled “AddTitle(string, Color, Color, HorizontalAlignment)”Sets the Title parameter with the given text and changes title colors.
public Border.BorderParameters AddTitle(string title, Color foregroundColor, Color backgroundColor, HorizontalAlignment horizontalAlignment = HorizontalAlignment.Center)Parameters
Section titled “Parameters”title string
Title text.
foregroundColor SadRogue.Primitives.Color
Title foreground SadRogue.Primitives.Color.
backgroundColor SadRogue.Primitives.Color
Title background SadRogue.Primitives.Color.
horizontalAlignment HorizontalAlignment
Title text HorizontalAlignment.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
AddShadow()
Section titled “AddShadow()”Sets the DrawShadedArea to true.
public Border.BorderParameters AddShadow()Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
AddShadow(int)
Section titled “AddShadow(int)”Sets the DrawShadedArea to true and modifies shadow glyph.
public Border.BorderParameters AddShadow(int shadedGlyph)Parameters
Section titled “Parameters”shadedGlyph int
Glyph number to use as a shadow.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
AddShadow(Color, Color)
Section titled “AddShadow(Color, Color)”Sets the DrawShadedArea to true and modifies default shadow colors.
public Border.BorderParameters AddShadow(Color foregroundColor, Color backgroundColor)Parameters
Section titled “Parameters”foregroundColor SadRogue.Primitives.Color
ShadedGlyph new foreground SadRogue.Primitives.Color.
backgroundColor SadRogue.Primitives.Color
ShadedGlyph new background SadRogue.Primitives.Color.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
AddShadow(int, Color, Color)
Section titled “AddShadow(int, Color, Color)”Sets the DrawShadedArea to true and modifies default shadow glyph and colors.
public Border.BorderParameters AddShadow(int shadedGlyph, Color foregroundColor, Color backgroundColor)Parameters
Section titled “Parameters”shadedGlyph int
Glyph number to use as a shadow.
foregroundColor SadRogue.Primitives.Color
ShadedGlyph new foreground SadRogue.Primitives.Color.
backgroundColor SadRogue.Primitives.Color
ShadedGlyph new background SadRogue.Primitives.Color.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
ChangeBorderStyle(ShapeParameters)
Section titled “ChangeBorderStyle(ShapeParameters)”Set the BorderBox parameter to the new value.
public Border.BorderParameters ChangeBorderStyle(ShapeParameters borderStyle)Parameters
Section titled “Parameters”borderStyle ShapeParameters
New ShapeParameters to use for the border style.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
ChangeBorderGlyph(int[])
Section titled “ChangeBorderGlyph(int[])”Changes the array of glyphs to be used as the border line.
public Border.BorderParameters ChangeBorderGlyph(int[] borderStyle)Parameters
Section titled “Parameters”borderStyle int[]
Array of glyphs to be used as the border line.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
ChangeBorderGlyph(int[], Color, Color)
Section titled “ChangeBorderGlyph(int[], Color, Color)”Changes the array of glyphs to be used as the border line and their colors.
public Border.BorderParameters ChangeBorderGlyph(int[] borderStyle, Color foregroundColor, Color backgroundColor)Parameters
Section titled “Parameters”borderStyle int[]
Array of glyphs to be used as the border line.
foregroundColor SadRogue.Primitives.Color
Border line foreground SadRogue.Primitives.Color.
backgroundColor SadRogue.Primitives.Color
Border line background SadRogue.Primitives.Color.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
ChangeBorderGlyph(int)
Section titled “ChangeBorderGlyph(int)”Fills the array of glyphs to be used as the border line with the given glyph.
public Border.BorderParameters ChangeBorderGlyph(int glyph)Parameters
Section titled “Parameters”glyph int
The glyph to be used the border line.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
ChangeBorderGlyph(int, Color, Color)
Section titled “ChangeBorderGlyph(int, Color, Color)”Fills the array of glyphs to be used as the border line with the given glyph and changes the border colors.
public Border.BorderParameters ChangeBorderGlyph(int glyph, Color foregroundColor, Color backgroundColor)Parameters
Section titled “Parameters”glyph int
The glyph to be used the border line.
foregroundColor SadRogue.Primitives.Color
Border line foreground SadRogue.Primitives.Color.
backgroundColor SadRogue.Primitives.Color
Border line background SadRogue.Primitives.Color.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
ChangeBorderGlyph(ColoredGlyphBase)
Section titled “ChangeBorderGlyph(ColoredGlyphBase)”Fills the array of glyphs to be used as the border line with the given ColoredGlyphBase.
public Border.BorderParameters ChangeBorderGlyph(ColoredGlyphBase glyph)Parameters
Section titled “Parameters”glyph ColoredGlyphBase
The ColoredGlyphBase to be used the border line.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
ChangeBorderColors(Color, Color)
Section titled “ChangeBorderColors(Color, Color)”Changes border color parameters.
public Border.BorderParameters ChangeBorderColors(Color foregroundColor, Color backgroundColor)Parameters
Section titled “Parameters”foregroundColor SadRogue.Primitives.Color
Border line foreground SadRogue.Primitives.Color.
backgroundColor SadRogue.Primitives.Color
Border line background SadRogue.Primitives.Color.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
ChangeBorderForegroundColor(Color)
Section titled “ChangeBorderForegroundColor(Color)”Changes border foreground color.
public Border.BorderParameters ChangeBorderForegroundColor(Color foregroundColor)Parameters
Section titled “Parameters”foregroundColor SadRogue.Primitives.Color
Border line foreground SadRogue.Primitives.Color.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.
ChangeBorderBackgroundColor(Color)
Section titled “ChangeBorderBackgroundColor(Color)”Changes border background color.
public Border.BorderParameters ChangeBorderBackgroundColor(Color backgroundColor)Parameters
Section titled “Parameters”backgroundColor SadRogue.Primitives.Color
Border line background SadRogue.Primitives.Color.
Returns
Section titled “Returns”Border.BorderParameters
The modified instance of Border.BorderParameters.