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
windowSystemConsoleWindowSystemThe 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
enableboolTrue to enable dismissal on outside clicks.
onDismissActionOptional callback invoked when overlay is dismissed.
SetOverlayBackground(Color)
Sets the background color for the overlay (typically dark/dimmed).
public void SetOverlayBackground(Color color)
Parameters
colorColorThe background color.