Merge branch 'iframe_api' of https://github.com/thecodingmachine/workadventure into FTUEPopup

* 'iframe_api' of https://github.com/thecodingmachine/workadventure:
  Removing closeOnClick as it is not implemented
  Adding a Popup object with a close() method on it.
This commit is contained in:
DESKTOP-FMM8UI0\CLV 2021-03-10 09:00:47 +01:00
commit 5e4940dba6
6 changed files with 87 additions and 44 deletions

View file

@ -19,20 +19,20 @@ 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!', [
WA.openPopup('foobar', 'This is a test message. Hi!', [
{
label: "Close",
className: "normal",
closeOnClick: true
callback: (popup) => {
popup.close();
}
},
{
label: "Next",
className: "success",
callback: () => {
console.log('BUTTON CLICKED')
callback: (popup) => {
popup.close();
}
}
])