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)
コンファームシーン.
|
| 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)
コンファームシーン.
他の入力を遮り, 入力画面を表示する.
複数行に渡る入力をさせたい時は, enchant.widget.InputSceneを使用する.
var confirm = new PromptScene('名前を入力してください', 'OK', 'cancel');
confirm.placeholder = 'なまえ';
confirm.callback = function(text) {
// acceptなら入力された文字列, cancelならnullが返ってってくる.
};
// cancel, accept個別に処理を設定することも可能.
confirm.oncancel = function() {
};
confirm.onaccept = function(text) {
};
- Parameters:
- {*} content
- 表示するコンテンツ.
- {String} acceptName
- 了承ボタンのラベル.
- {String} cancelName
- キャンセルボタンのラベル.
- {String} placeholder
- プレースホルダ.
Field Detail
<static>
enchant.widget.PromptScene.onaccept
<static>
enchant.widget.PromptScene.oncancel
<static>
enchant.widget.PromptScene.value
content of prompt