Table of Contents

Class Overlay

Namespace
MiniTui
Assembly
MiniTui.dll

A modal component drawn over the screens, inside a themed block. While any overlay is open, the top one gets every key.

public abstract class Overlay : Component
Inheritance
Overlay
Derived
Inherited Members

Properties

CloseOnClickOutside

Whether a press of any mouse button outside the overlay closes it (1.x spec §7.6). The press goes nowhere else. False by default.

public virtual bool CloseOnClickOutside { get; }

Property Value

bool

CloseOnEscape

Whether an unhandled Esc closes the overlay. True by default.

public virtual bool CloseOnEscape { get; }

Property Value

bool

Framed

Whether the app draws the themed block around the overlay. When false, the app only clears the Placement(Rect) rect, and Render(Buffer, Rect, RenderContext) gets all of it to draw, border included. True by default.

public virtual bool Framed { get; }

Property Value

bool

KeysGroup

The heading for this component's bindings in the help overlay.

public override string KeysGroup { get; }

Property Value

string

Title

The title in the overlay's border.

public virtual string? Title { get; }

Property Value

string

Methods

Centered(Rect, int, int)

A rect of up to width × height, centered in the screen minus a 2-cell margin.

protected static Rect Centered(Rect screen, int width, int height)

Parameters

screen Rect
width int
height int

Returns

Rect

Close()

Close this overlay.

protected void Close()

Placement(Rect)

Where the overlay goes, including its border. The default is centered, 60% × 50% of the screen, at least 30 × 7, and clamped to the screen minus a 2-cell margin.

public virtual Rect Placement(Rect screen)

Parameters

screen Rect

Returns

Rect