Skip to content

Commit d2417db

Browse files
author
lee
committed
popup.show 상세 예시 추가.
1 parent c408fa8 commit d2417db

File tree

1 file changed

+49
-7
lines changed

1 file changed

+49
-7
lines changed

source/entryjs/api/2024-02-29-popup.md

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,27 @@ popup.on('submit', (spriteItems) => {
563563
Entry.container.addObject(object, 0);
564564
}
565565
}
566+
567+
popup.show({ type: 'sprite' }, {
568+
sidebar: {
569+
entrybot_friends: {
570+
id: "aa",
571+
name: "엔트리봇",
572+
value: "entrybot_friends",
573+
sub: {
574+
all: {"id":"","name":"전체","value":"all"}
575+
}
576+
}
577+
},
578+
data: {
579+
data: [
580+
{
581+
"id": "오브젝트 고유id",
582+
...샘플데이터
583+
}
584+
]
585+
}
586+
})
566587
```
567588
568589
#### 샘플 데이터 : spriteItem
@@ -735,6 +756,27 @@ popup.on('submit', (soundItems) => {
735756
// 'play' 이벤트로 재생되던 소리를 중지
736757
Entry.Utils.forceStopSounds();
737758
}
759+
760+
popup.show({ type: 'sprite' }, {
761+
sidebar: {
762+
people: {
763+
id: "aa",
764+
name: "사람",
765+
value: "people",
766+
sub: {
767+
all: {"id":"","name":"전체","value":"all"}
768+
}
769+
},
770+
},
771+
data: {
772+
data: [
773+
{
774+
"id": "오브젝트 고유id",
775+
...샘플데이터
776+
}
777+
]
778+
}
779+
})
738780
```
739781
740782
#### 샘플 데이터 : soundItem
@@ -1416,44 +1458,44 @@ const removeAllEventListener = Entry.removeAllEventListener.bind(Entry);
14161458
// '오브젝트 추가하기' 클릭시 dispatch
14171459
removeAllEventListener('openSpriteManager');
14181460
addEventListener('openSpriteManager', () => {
1419-
this.popup.show('sprite');
1461+
this.popup.show({ type: 'sprite' });
14201462
});
14211463
// '모양 추가하기' 클릭시 dispatch
14221464
removeAllEventListener('openPictureManager');
14231465
addEventListener('openPictureManager', () => {
1424-
this.popup.show('picture');
1466+
this.popup.show({ type: 'picture' });
14251467
});
14261468
// '소리 추가하기' 클릭시 dispatch
14271469
removeAllEventListener('openSoundManager');
14281470
addEventListener('openSoundManager', () => {
1429-
this.popup.show('sound');
1471+
this.popup.show({ type: 'sound' });
14301472
});
14311473
// '인공지능 블록 불러오기' 클릭시 dispatch
14321474
removeAllEventListener('openAIUtilizeBlockManager');
14331475
addEventListener('openAIUtilizeBlockManager', () => {
14341476
// Object.values(Entry.AI_UTILIZE_BLOCK_LIST)
14351477
const blocks = this.popup.aiUtilizeBlocks;
1436-
this.popup.show('aiUtilize', blocks);
1478+
this.popup.show({ type: 'aiUtilize' }, blocks);
14371479
});
14381480
// '확장 블록 불러오기' 클릭시 dispatch
14391481
removeAllEventListener('openExpansionBlockManager');
14401482
addEventListener('openExpansionBlockManager', () => {
14411483
// Object.values(Entry.EXPANSION_BLOCK_LIST)
14421484
const blocks = this.popup.expansionBlocks;
1443-
this.popup.show('expansion', blocks);
1485+
this.popup.show({ type: 'expansion' }, blocks);
14441486
});
14451487
// '모양 가져오기' 클릭시 dispatch
14461488
removeAllEventListener('openPictureImport');
14471489
addEventListener('openPictureImport', () => {
1448-
this.popup.show('paint');
1490+
this.popup.show({ type: 'paint' });
14491491
});
14501492
14511493
// 하드웨어 '브라우저로 연결하기' 클릭시 dispatch
14521494
removeAllEventListener('openHardwareLiteBlockManager');
14531495
addEventListener('openHardwareLiteBlockManager', () => {
14541496
// Object.values(Entry.HARDWARE_LITE_LIST)
14551497
const blocks = this.popup.hardwareLiteBlocks;
1456-
this.popup.show('hardwareLite', blocks);
1498+
this.popup.show({ type: 'hardwareLite' }, blocks);
14571499
});
14581500
````
14591501

0 commit comments

Comments
 (0)