MessageModal class
Namespace: Arlecchino.Modals.Telling · Assembly: Arlecchino
Something the user only has to read: a result, a warning, an explanation of what just failed. It takes no input beyond the key that closes it, which is what separates it from every other dialog here.
public sealed class MessageModal : Modal
Inherits from Modal
Constructors
| Member | Summary |
|---|---|
MessageModal() |
Properties
| Member | Summary |
|---|---|
OnClosed | Called once it is dismissed, for a screen that wants to carry on afterward. |
Text | The message, drawn under the title. Long text wraps to the width of the box. |
Methods
| Member | Summary |
|---|---|
Draw(ModalFrame) | |
Handle(ModalFrame, KeyPress) |
Constructors in detail
MessageModal()
Obsolete
Constructors of types with required members are not supported in this version of your compiler.
public MessageModal();
Properties in detail
OnClosed
public Action? OnClosed { get; init; }
Called once it is dismissed, for a screen that wants to carry on afterward.
Type Action
Text
public string Text { get; init; }
The message, drawn under the title. Long text wraps to the width of the box.
Type string
Methods in detail
Draw(ModalFrame)
public override void Draw(ModalFrame frame);
Parameters
| Name | Type | Description |
|---|---|---|
frame | ModalFrame |
Handle(ModalFrame, KeyPress)
public override void Handle(ModalFrame frame, KeyPress key);
Parameters
| Name | Type | Description |
|---|---|---|
frame | ModalFrame | |
key | KeyPress |