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:
commit
5e4940dba6
6 changed files with 87 additions and 44 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue