GraphicsAPI reference
Struct PanelStyle
Namespace: MicroEngine.Graphics
Assembly: MicroEngine.Graphics2D.dll
Guide: Graphics
The look of a panel drawn with Panel: a box of colours, or an image of the game’s own (Image).
public readonly struct PanelStyle : IEquatable<PanelStyle>Implements
Constructors
PanelStyle(Color, Color, Color, Color, Color)
The look of a panel drawn with Panel: a box of colours, or an image of the game’s own (Image).
public PanelStyle(Color Fill, Color Border, Color Highlight = default, Color Shadow = default, Color InnerBorder = default)Parameters
Fill Color
Inside colour.
Border Color
One-pixel outer border with cut corners.
Highlight Color
A one-pixel line along the top inside edge; transparent (the default) draws none.
Shadow Color
A drop shadow offset by 2 pixels; transparent draws none.
InnerBorder Color
A second outline 2 pixels inside the border; transparent draws none.
Properties
Border
One-pixel outer border with cut corners.
public Color Border { get; init; }Property Value
Fill
Inside colour.
public Color Fill { get; init; }Property Value
Highlight
A one-pixel line along the top inside edge; transparent (the default) draws none.
public Color Highlight { get; init; }Property Value
Image
An image drawn as the panel instead of the box of colours, stretched as a nine-slice (null, the default, draws the box). Fill, Border, Highlight and InnerBorder are then not drawn; Shadow still is, in the image’s shape.
public NineSlice? Image { get; init; }Property Value
ImageTint
The colour Image is multiplied by; null (the default) draws it unchanged.
public Color? ImageTint { get; init; }Property Value
InnerBorder
A second outline 2 pixels inside the border; transparent draws none.
public Color InnerBorder { get; init; }Property Value
Shadow
A drop shadow offset by 2 pixels; transparent draws none.
public Color Shadow { get; init; }Property Value
Methods
Deconstruct(out Color, out Color, out Color, out Color, out Color)
public void Deconstruct(out Color Fill, out Color Border, out Color Highlight, out Color Shadow, out Color InnerBorder)Parameters
Fill Color
Border Color
Highlight Color
Shadow Color
InnerBorder Color
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(PanelStyle)
public bool Equals(PanelStyle other)Parameters
other PanelStyle
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(PanelStyle, PanelStyle)
public static bool operator ==(PanelStyle left, PanelStyle right)Parameters
left PanelStyle
right PanelStyle
Returns
operator !=(PanelStyle, PanelStyle)
public static bool operator !=(PanelStyle left, PanelStyle right)Parameters
left PanelStyle
right PanelStyle