Implementation of openPopup script method (WIP)

This commit is contained in:
David Négrier 2021-03-09 16:21:14 +01:00
parent ed2ce68f37
commit 1e002f93ed
7 changed files with 184 additions and 36 deletions

View file

@ -18,3 +18,26 @@ WA.onLeaveZone('myTrigger', () => {
WA.onEnterZone('notExist', () => {
WA.sendChatMessage("YOU SHOULD NEVER SEE THIS", 'Poly Parrot');
})
let popupId;
WA.onEnterZone('popupZone', () => {
popupId = WA.openPopup('foobar', 'This is a test message. Hi!', [
{
label: "Close",
className: "normal",
closeOnClick: true
},
{
label: "Next",
className: "success",
callback: () => {
console.log('BUTTON CLICKED')
}
}
])
})
/*WA.onLeaveZone('popupZone', () => {
WA.sendChatMessage("Thanks!", 'Poly Parrot');
})*/