Merge branch 'develop' of github.com:thecodingmachine/workadventure into main
@ -727,9 +727,9 @@ export class GameScene extends ResizableScene implements CenterListener {
|
||||
return;
|
||||
}
|
||||
const escapedMessage = HtmlUtils.escapeHtml(openPopupEvent.message);
|
||||
let html = `<div id="container"><div class="nes-container with-title is-centered">
|
||||
let html = `<div id="container" hidden><div class="nes-container with-title is-centered">
|
||||
${escapedMessage}
|
||||
</div> </div>`;
|
||||
</div> `;
|
||||
const buttonContainer = `<div class="buttonContainer"</div>`;
|
||||
html += buttonContainer;
|
||||
let id = 0;
|
||||
@ -737,15 +737,18 @@ ${escapedMessage}
|
||||
html += `<button type="button" class="nes-btn is-${HtmlUtils.escapeHtml(button.className ?? '')}" id="popup-${openPopupEvent.popupId}-${id}">${HtmlUtils.escapeHtml(button.label)}</button>`;
|
||||
id++;
|
||||
}
|
||||
const domElement = this.add.dom(objectLayerSquare.x + objectLayerSquare.width/2 ,
|
||||
objectLayerSquare.y + objectLayerSquare.height/2).createFromHTML(html);
|
||||
html += '</div>';
|
||||
const domElement = this.add.dom(objectLayerSquare.x ,
|
||||
objectLayerSquare.y).createFromHTML(html);
|
||||
|
||||
const container : HTMLDivElement = domElement.getChildByID("container") as HTMLDivElement;
|
||||
container.style.width = objectLayerSquare.width + "px";
|
||||
domElement.scale = 0;
|
||||
domElement.setClassName('popUpElement');
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
(container).hidden = false;
|
||||
}, 100);
|
||||
|
||||
id = 0;
|
||||
for (const button of openPopupEvent.buttons) {
|
||||
@ -753,6 +756,7 @@ ${escapedMessage}
|
||||
const btnId = id;
|
||||
button.onclick = () => {
|
||||
iframeListener.sendButtonClickedEvent(openPopupEvent.popupId, btnId);
|
||||
button.disabled = true;
|
||||
}
|
||||
id++;
|
||||
}
|
||||
|
@ -2,19 +2,14 @@ import {DivImportance, layoutManager} from "./LayoutManager";
|
||||
import {HtmlUtils} from "./HtmlUtils";
|
||||
import {discussionManager, SendMessageCallback} from "./DiscussionManager";
|
||||
import {UserInputManager} from "../Phaser/UserInput/UserInputManager";
|
||||
import {VIDEO_QUALITY_SELECT} from "../Administration/ConsoleGlobalMessageManager";
|
||||
import {localUserStore} from "../Connexion/LocalUserStore";
|
||||
import {UserSimplePeerInterface} from "./SimplePeer";
|
||||
declare const navigator:any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
|
||||
const localValueVideo = localStorage.getItem(VIDEO_QUALITY_SELECT);
|
||||
let valueVideo = 20;
|
||||
if(localValueVideo){
|
||||
valueVideo = parseInt(localValueVideo);
|
||||
}
|
||||
let videoConstraint: boolean|MediaTrackConstraints = {
|
||||
width: { min: 640, ideal: 1280, max: 1920 },
|
||||
height: { min: 400, ideal: 720 },
|
||||
frameRate: { ideal: valueVideo },
|
||||
frameRate: { ideal: localUserStore.getVideoQualityValue() },
|
||||
facingMode: "user",
|
||||
resizeMode: 'crop-and-scale',
|
||||
aspectRatio: 1.777777778
|
||||
|
BIN
maps/Tuto/down-arrow.png
Normal file
After Width: | Height: | Size: 451 B |
@ -20,7 +20,7 @@ function launchTuto (){
|
||||
callback: (popup1) => {
|
||||
WA.sendChatMessage("Hey you can talk here too!", 'WA Guide');
|
||||
popup1.close();
|
||||
WA.openPopup("TutoFinal","You are good to go! You can meet the dev team and discover the features in the next room!",[
|
||||
WA.openPopup("TutoFinal","You are good to go! Go through the gate to meet the dev team and discover the features !",[
|
||||
{
|
||||
label: "Got it!",
|
||||
className : "success",callback:(popup2 => {
|
||||
|
BIN
maps/Village/ALL.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
maps/Village/Female 02-2.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
maps/Village/Female 18-1.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
maps/Village/Headmaster fmale.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
maps/Village/LPC-submissions-outside.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
maps/Village/LPC-terrains-subimissions-outside.png
Normal file
After Width: | Height: | Size: 327 KiB |
BIN
maps/Village/Male 03-3.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
maps/Village/Teacher fmale 02.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
maps/Village/Teacher male 03.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
672
maps/Village/Village.json
Normal file
BIN
maps/Village/demo-tileset-v2.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
maps/Village/fantasy.png
Normal file
After Width: | Height: | Size: 395 KiB |
BIN
maps/Village/logotcm.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
maps/Village/panels.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
62
maps/Village/scriptMapVillage.js
Normal file
@ -0,0 +1,62 @@
|
||||
var zoneOfficeName = "popupOfficeZone";
|
||||
var zoneEventName = "popupEventZone";
|
||||
var zoneSchoolName = "popupSchoolZone";
|
||||
var zoneTCMName = "popupTCMZone";
|
||||
|
||||
var urlPricing = "https://workadventu.re/pricing";
|
||||
var urlSchoolOffer = "https://workadventu.re/school-offer";
|
||||
var urlEvent = "https://workadventu.re/events";
|
||||
var currentPopup = undefined;
|
||||
|
||||
WA.onEnterZone(zoneOfficeName, () => {
|
||||
currentPopup = WA.openPopup("popUpOffice","You can purchase virtual office in WorkAdventure",[
|
||||
{
|
||||
label: "See the pricing",
|
||||
className: "popUpElement",
|
||||
callback: (popup => {
|
||||
WA.openTab(urlPricing);
|
||||
})
|
||||
}]);
|
||||
})
|
||||
|
||||
WA.onEnterZone(zoneEventName, () => {
|
||||
currentPopup = WA.openPopup("popUpEvent","You can create your own Event in WorkAdventure",[
|
||||
{
|
||||
label: "See the event page",
|
||||
className: "popUpElement",
|
||||
callback: (popup => {
|
||||
WA.openTab(urlEvent);
|
||||
})
|
||||
}]);
|
||||
})
|
||||
|
||||
WA.onEnterZone(zoneTCMName, () => {
|
||||
currentPopup = WA.openPopup("popUpTCM","Come meet the WorkAdventure team in our office ! ",[]);
|
||||
})
|
||||
|
||||
|
||||
WA.onEnterZone(zoneSchoolName, () => {
|
||||
currentPopup = WA.openPopup("popUpSchool","WorkAdventure is free for teachers a the moment ! Take advantage of our offer ",[
|
||||
{
|
||||
label: "See the offer",
|
||||
className: "popUpElement",
|
||||
callback: (popup => {
|
||||
WA.openTab(urlSchoolOffer);
|
||||
})
|
||||
}]);
|
||||
})
|
||||
|
||||
WA.onLeaveZone(zoneSchoolName, closePopUp)
|
||||
|
||||
WA.onLeaveZone(zoneTCMName, closePopUp)
|
||||
|
||||
WA.onLeaveZone(zoneEventName, closePopUp)
|
||||
|
||||
WA.onLeaveZone(zoneOfficeName, closePopUp)
|
||||
|
||||
function closePopUp(){
|
||||
if (currentPopup !== undefined) {
|
||||
currentPopup.close();
|
||||
currentPopup = undefined;
|
||||
}
|
||||
}
|
BIN
maps/Village/sol_intérieur.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
maps/Village/su1 Student fmale 03.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
maps/Village/su1 Student fmale 12.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
maps/Village/su1 Student fmale 14.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
maps/Village/su1 Student fmale 15.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
maps/Village/su1 Student male 12.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
maps/Village/su2 Student fmale 09.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
maps/Village/su3 Student fmale 02.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
maps/Village/su3 Student fmale 06.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
maps/Village/su3 Student fmale 07.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
maps/Village/su3 Student fmale 09.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
maps/Village/su3 Student fmale 11.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
maps/Village/su3 Student fmale 12.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
maps/Village/su3 Student fmale 14.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
maps/Village/su3 Student fmale 18.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
maps/Village/su3 Student male 02.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
maps/Village/su3 Student male 04.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
maps/Village/su3 Student male 08.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
maps/Village/su3 Student male 09.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
maps/Village/su3 Student male 11.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
maps/Village/su3 Student male 13.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
maps/Village/su4 Student fmale 01.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
maps/Village/su4 Student fmale 05.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
maps/Village/su4 Student fmale 06.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
maps/Village/su4 Student fmale 07.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
maps/Village/su4 Student fmale 09.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
maps/Village/su4 Student fmale 11.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
maps/Village/su4 Student fmale 13.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
maps/Village/su4 Student fmale 14.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
maps/Village/su4 Student fmale 16.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
maps/Village/su4 Student fmale 17.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
maps/Village/su4 Student male 07.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
maps/Village/su4 Student male 09.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
maps/Village/su4 Student male 10.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
maps/Village/su4 Student male 11.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
maps/Village/su4 Student male 12.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
maps/Village/su4 Student male 13.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
maps/Village/tileset4_export.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
maps/Village/tileset5_export.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
maps/Village/tileset5bis_export.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
maps/Village/tileset6_export.png
Normal file
After Width: | Height: | Size: 23 KiB |