-
Notifications
You must be signed in to change notification settings - Fork 16
Dialogues
lively.next
provides a number of ready to use dialogues via lively.components/prompts.js
.
They can be used via promises as examplified here:
"Change Window Title",
async () => {
let newTitle = await w.prompt("Enter New Name", {input: this.title});
if (newTitle) this.title = newTitle;
}
Examplecode for all of these can be found in lively.components/prompts.js
.
A prompt that displays text. Provides the possibility to confirm with a single button.
A prompt that displays text. Can be either accepted or rejected via two distinct buttons.
User can choose from a pre-defined list of options and cofirm or cancel the prompt via two distinct buttons.
Allows the user to enter some text and confirm or cancel the dialogue.
Like a TextPrompt
, but with an editorpane instead of a simple text-box.
Like the TextPrompt
, but stars-out the input
A black, semi-transparent overlay appears which holds different list-items. One can be selected. Allows for confirmation and cancellation.
Like a ListPrompt
but allows the user to add/remove items from the displayed list.