Table of Contents

Class OverlayWindow

Namespace
SharpConsoleUI.Windows
Assembly
SharpConsoleUI.dll

Specialized full-screen overlay window for menus, popups, and modal overlays. Automatically handles click-outside-to-dismiss and background dimming.

public class OverlayWindow : Window, IContainer
Inheritance
OverlayWindow
Implements
Inherited Members

Constructors

OverlayWindow(ConsoleWindowSystem)

Initializes a new OverlayWindow that covers the desktop area (but not status bars).

public OverlayWindow(ConsoleWindowSystem windowSystem)

Parameters

windowSystem ConsoleWindowSystem

The console window system.

Methods

CloseAndInvalidate()

Closes the overlay and forces full screen redraw.

public void CloseAndInvalidate()

Dismiss()

Dismisses the overlay by invoking callbacks and closing with invalidation.

public void Dismiss()

SetDismissOnClickOutside(bool, Action?)

Enables/disables click-outside-to-dismiss behavior.

public void SetDismissOnClickOutside(bool enable, Action? onDismiss = null)

Parameters

enable bool

True to enable dismissal on outside clicks.

onDismiss Action

Optional callback invoked when overlay is dismissed.

SetOverlayBackground(Color)

Sets the background color for the overlay (typically dark/dimmed).

public void SetOverlayBackground(Color color)

Parameters

color Color

The background color.