Skip to main content

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

MemberSummary
ChoiceModal()

Properties

MemberSummary
OnPickedCalled with the chosen option.

Methods

MemberSummary
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

NameTypeDescription
frameModalFrame

Handle(ModalFrame, KeyPress)

public override void Handle(ModalFrame frame, KeyPress key);

Parameters

NameTypeDescription
frameModalFrame
keyKeyPress

Take(ModalFrame, string)

public virtual void Take(ModalFrame frame, string choice);

Parameters

NameTypeDescription
frameModalFrame
choicestring