Skip to content

Commit

Permalink
popup.show 상세 예시 추가.
Browse files Browse the repository at this point in the history
  • Loading branch information
lee committed Jul 16, 2024
1 parent c408fa8 commit d2417db
Showing 1 changed file with 49 additions and 7 deletions.
56 changes: 49 additions & 7 deletions source/entryjs/api/2024-02-29-popup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1416,44 +1458,44 @@ 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
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);
});
````
Expand Down

0 comments on commit d2417db

Please sign in to comment.