ToggleModal class
Namespace: Arlecchino.Modals.Setting · Assembly: Arlecchino
A yes-or-no answer, flipped with the arrows or picked by clicking one of the two chips.
public sealed class ToggleModal : Modal
Inherits from Modal
Constructors
| Member | Summary |
|---|---|
ToggleModal() |
Properties
| Member | Summary |
|---|---|
NoChip | Where the negative chip was drawn last frame. |
OnSubmit | Called with the answer that was confirmed. |
Value | The answer as it stands. |
YesChip | Where the affirmative chip was drawn last frame, used to turn a click into an answer. |
Methods
| Member | Summary |
|---|---|
Draw(ModalFrame) | |
Handle(ModalFrame, KeyPress) | |
HandleMouse(ModalFrame, MouseEvent) |
Constructors in detail
ToggleModal()
Obsolete
Constructors of types with required members are not supported in this version of your compiler.
public ToggleModal();
Properties in detail
NoChip
public SurfaceRegion NoChip { get; set; }
Where the negative chip was drawn last frame.
Type SurfaceRegion
OnSubmit
public Action<bool> OnSubmit { get; init; }
Called with the answer that was confirmed.
Type Action<T><bool>
Value
public bool Value { get; set; }
The answer as it stands.
Type bool
YesChip
public SurfaceRegion YesChip { get; set; }
Where the affirmative chip was drawn last frame, used to turn a click into an answer.
Type SurfaceRegion
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 |
HandleMouse(ModalFrame, MouseEvent)
public override void HandleMouse(ModalFrame frame, MouseEvent mouse);
Parameters
| Name | Type | Description |
|---|---|---|
frame | ModalFrame | |
mouse | MouseEvent |