ChoiceModal class
Namespace: Arlecchino.Modals.Choosing · Assembly: Arlecchino
One option out of a filterable list.
public sealed class ChoiceModal : OptionListModal, ITextEntry
Inherits from OptionListModal
Implements ITextEntry
Constructors
| Member | Summary |
|---|---|
ChoiceModal() |
Properties
| Member | Summary |
|---|---|
OnPicked | Called with the chosen option. |
Methods
| Member | Summary |
|---|---|
Draw(ModalFrame) | |
Handle(ModalFrame, KeyPress) | |
Take(ModalFrame, string) |
Constructors in detail
ChoiceModal()
Obsolete
Constructors of types with required members are not supported in this version of your compiler.
public ChoiceModal();
Properties in detail
OnPicked
public Action<string> OnPicked { get; init; }
Called with the chosen option.
Type Action<T><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 |
Take(ModalFrame, string)
public virtual void Take(ModalFrame frame, string choice);
Parameters
| Name | Type | Description |
|---|---|---|
frame | ModalFrame | |
choice | string |