Class enchant.widget.PromptScene
- Defined in: widget.enchant.js
- Extends enchant.widget.Modal
Constructor Attributes | Constructor Name and Description |
---|---|
enchant.widget.PromptScene(content, acceptName, cancelName, placeholder)
Confirm scene.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
enchant.widget.PromptScene.onaccept
|
<static> |
enchant.widget.PromptScene.oncancel
|
<static> |
enchant.widget.PromptScene.value
content of prompt
|
- Fields borrowed from class enchant.Group:
- childNodes, firstChild, lastChild, originX, originY, rotation, scaleX, scaleY
- Fields borrowed from class enchant.Node:
- age, parentNode, scene, x, y
Method Summary
- Methods borrowed from class enchant.Group:
- addChild
- insertBefore
- removeChild
- Methods borrowed from class enchant.Node:
- moveBy
- moveTo
- Methods borrowed from class enchant.EventTarget:
- addEventListener
- clearEventListener
- dispatchEvent
- on
- removeEventListener
Class Detail
enchant.widget.PromptScene(content, acceptName, cancelName, placeholder)
Confirm scene.
Interrupt other input and display input screen.
When you wish to allow input to multiple lines, use enchant.widget.InputScene.
var confirm = new PromptScene('Input name', 'OK', 'cancel'); confirm.placeholder = 'Name'; confirm.callback = function(text) { // Input array will be returned for accept, whereas null will be returned for cancel. }; // Processing for cancel and accept can be set separately. confirm.oncancel = function() { }; confirm.onaccept = function(text) { };
- Parameters:
- {*} content
- Content to display.
- {String} acceptName
- Label for agreement button.
- {String} cancelName
- Label for cancel button.
- {String} placeholder
- Placeholder.
Field Detail
<static>
enchant.widget.PromptScene.onaccept
<static>
enchant.widget.PromptScene.oncancel
<static>
enchant.widget.PromptScene.value
content of prompt