Skip to content

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).

C#
public readonly struct PanelStyle : IEquatable<PanelStyle>

Implements

IEquatable<PanelStyle>

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).

C#
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.

C#
public Color Border { get; init; }

Property Value

Color

Fill

Inside colour.

C#
public Color Fill { get; init; }

Property Value

Color

Highlight

A one-pixel line along the top inside edge; transparent (the default) draws none.

C#
public Color Highlight { get; init; }

Property Value

Color

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.

C#
public NineSlice? Image { get; init; }

Property Value

NineSlice?

ImageTint

The colour Image is multiplied by; null (the default) draws it unchanged.

C#
public Color? ImageTint { get; init; }

Property Value

Color?

InnerBorder

A second outline 2 pixels inside the border; transparent draws none.

C#
public Color InnerBorder { get; init; }

Property Value

Color

Shadow

A drop shadow offset by 2 pixels; transparent draws none.

C#
public Color Shadow { get; init; }

Property Value

Color

Methods

Deconstruct(out Color, out Color, out Color, out Color, out Color)

C#
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)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(PanelStyle)

C#
public bool Equals(PanelStyle other)

Parameters

other PanelStyle

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(PanelStyle, PanelStyle)

C#
public static bool operator ==(PanelStyle left, PanelStyle right)

Parameters

left PanelStyle

right PanelStyle

Returns

bool

operator !=(PanelStyle, PanelStyle)

C#
public static bool operator !=(PanelStyle left, PanelStyle right)

Parameters

left PanelStyle

right PanelStyle

Returns

bool