partey_workadventure/maps/tests/Metadata/customMenu.js
GRL ebcf4a6ae3 Add documentation
delete unused test map
2021-08-27 14:49:57 +02:00

15 lines
463 B
JavaScript

let menuIframeApi = undefined;
WA.ui.registerMenuCommand('custom callback menu', () => {
WA.nav.openTab("https://workadventu.re/");
})
WA.ui.registerMenuCommand('custom iframe menu', {iframe: 'customIframeMenu.html'});
WA.room.onEnterZone('iframeMenu', () => {
menuIframeApi = WA.ui.registerMenuCommand('IFRAME USE API', {iframe: 'customIframeMenuApi.html', allowApi: true});
})
WA.room.onLeaveZone('iframeMenu', () => {
menuIframeApi.remove();
})