From d2417dbd6cf47a315458f1d401ca0c4c5b3301ac Mon Sep 17 00:00:00 2001 From: lee Date: Tue, 16 Jul 2024 18:37:01 +0900 Subject: [PATCH] =?UTF-8?q?popup.show=20=EC=83=81=EC=84=B8=20=EC=98=88?= =?UTF-8?q?=EC=8B=9C=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/entryjs/api/2024-02-29-popup.md | 56 ++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 7 deletions(-) diff --git a/source/entryjs/api/2024-02-29-popup.md b/source/entryjs/api/2024-02-29-popup.md index e59fae61..fb94efce 100644 --- a/source/entryjs/api/2024-02-29-popup.md +++ b/source/entryjs/api/2024-02-29-popup.md @@ -563,6 +563,27 @@ popup.on('submit', (spriteItems) => { Entry.container.addObject(object, 0); } } + +popup.show({ type: 'sprite' }, { + sidebar: { + entrybot_friends: { + id: "aa", + name: "엔트리봇", + value: "entrybot_friends", + sub: { + all: {"id":"","name":"전체","value":"all"} + } + } + }, + data: { + data: [ + { + "id": "오브젝트 고유id", + ...샘플데이터 + } + ] + } +}) ``` #### 샘플 데이터 : spriteItem @@ -735,6 +756,27 @@ popup.on('submit', (soundItems) => { // 'play' 이벤트로 재생되던 소리를 중지 Entry.Utils.forceStopSounds(); } + +popup.show({ type: 'sprite' }, { + sidebar: { + people: { + id: "aa", + name: "사람", + value: "people", + sub: { + all: {"id":"","name":"전체","value":"all"} + } + }, + }, + data: { + data: [ + { + "id": "오브젝트 고유id", + ...샘플데이터 + } + ] + } +}) ``` #### 샘플 데이터 : soundItem @@ -1416,36 +1458,36 @@ const removeAllEventListener = Entry.removeAllEventListener.bind(Entry); // '오브젝트 추가하기' 클릭시 dispatch removeAllEventListener('openSpriteManager'); addEventListener('openSpriteManager', () => { - this.popup.show('sprite'); + this.popup.show({ type: 'sprite' }); }); // '모양 추가하기' 클릭시 dispatch removeAllEventListener('openPictureManager'); addEventListener('openPictureManager', () => { - this.popup.show('picture'); + this.popup.show({ type: 'picture' }); }); // '소리 추가하기' 클릭시 dispatch removeAllEventListener('openSoundManager'); addEventListener('openSoundManager', () => { - this.popup.show('sound'); + this.popup.show({ type: 'sound' }); }); // '인공지능 블록 불러오기' 클릭시 dispatch removeAllEventListener('openAIUtilizeBlockManager'); addEventListener('openAIUtilizeBlockManager', () => { // Object.values(Entry.AI_UTILIZE_BLOCK_LIST) const blocks = this.popup.aiUtilizeBlocks; - this.popup.show('aiUtilize', blocks); + this.popup.show({ type: 'aiUtilize' }, blocks); }); // '확장 블록 불러오기' 클릭시 dispatch removeAllEventListener('openExpansionBlockManager'); addEventListener('openExpansionBlockManager', () => { // Object.values(Entry.EXPANSION_BLOCK_LIST) const blocks = this.popup.expansionBlocks; - this.popup.show('expansion', blocks); + this.popup.show({ type: 'expansion' }, blocks); }); // '모양 가져오기' 클릭시 dispatch removeAllEventListener('openPictureImport'); addEventListener('openPictureImport', () => { - this.popup.show('paint'); + this.popup.show({ type: 'paint' }); }); // 하드웨어 '브라우저로 연결하기' 클릭시 dispatch @@ -1453,7 +1495,7 @@ removeAllEventListener('openHardwareLiteBlockManager'); addEventListener('openHardwareLiteBlockManager', () => { // Object.values(Entry.HARDWARE_LITE_LIST) const blocks = this.popup.hardwareLiteBlocks; - this.popup.show('hardwareLite', blocks); + this.popup.show({ type: 'hardwareLite' }, blocks); }); ````