work successfull message
parent
23dec7eef2
commit
2d2939bea4
|
@ -2,6 +2,8 @@ const queryString = window.location.search;
|
||||||
const urlParams = new URLSearchParams(queryString);
|
const urlParams = new URLSearchParams(queryString);
|
||||||
const userId = urlParams.get('userId');
|
const userId = urlParams.get('userId');
|
||||||
let gameId;
|
let gameId;
|
||||||
|
let submitNotic;
|
||||||
|
|
||||||
console.log(userId);
|
console.log(userId);
|
||||||
let startTime = Date.now();
|
let startTime = Date.now();
|
||||||
|
|
||||||
|
@ -50,10 +52,10 @@ function submitUserData(drawingZone) {
|
||||||
image.style.paddingLeft = '2px';
|
image.style.paddingLeft = '2px';
|
||||||
document.body.appendChild(image);
|
document.body.appendChild(image);
|
||||||
// Download the snapshot as an image
|
// Download the snapshot as an image
|
||||||
const link = document.createElement('a');
|
// const link = document.createElement('a');
|
||||||
link.href = image.src;
|
// link.href = image.src;
|
||||||
link.download = 'my_drawing.png';
|
// link.download = 'my_drawing.png';
|
||||||
link.click();
|
// link.click();
|
||||||
document.body.removeChild(image);
|
document.body.removeChild(image);
|
||||||
imageCode = image.src;
|
imageCode = image.src;
|
||||||
}else if( gameType[0] == "guided-tracing"){
|
}else if( gameType[0] == "guided-tracing"){
|
||||||
|
@ -65,10 +67,10 @@ function submitUserData(drawingZone) {
|
||||||
image.style.paddingLeft = '2px';
|
image.style.paddingLeft = '2px';
|
||||||
document.body.appendChild(image);
|
document.body.appendChild(image);
|
||||||
// Download the snapshot as an image
|
// Download the snapshot as an image
|
||||||
const link = document.createElement('a');
|
// const link = document.createElement('a');
|
||||||
link.href = image.src;
|
// link.href = image.src;
|
||||||
link.download = `guided-tracing-${gameId}.png`;
|
// link.download = `guided-tracing-${gameId}.png`;
|
||||||
link.click();
|
// link.click();
|
||||||
document.body.removeChild(image);
|
document.body.removeChild(image);
|
||||||
imageCode = image.src;
|
imageCode = image.src;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +87,7 @@ function submitUserData(drawingZone) {
|
||||||
// 'starts': formattedDateTime,
|
// 'starts': formattedDateTime,
|
||||||
// 'game_start' : gameStartTime,
|
// 'game_start' : gameStartTime,
|
||||||
};
|
};
|
||||||
// console.log(userData);
|
console.log(userData);
|
||||||
|
|
||||||
fetch(`https://phaser-game-api.s38.siliconpin.com/save-data`, {
|
fetch(`https://phaser-game-api.s38.siliconpin.com/save-data`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
@ -96,7 +98,10 @@ function submitUserData(drawingZone) {
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if(response.ok){
|
if(response.ok){
|
||||||
// console.log('Data Saved', response)
|
console.log('Data Saved', response.status)
|
||||||
|
if(response.status == 200){
|
||||||
|
submitNotic.setVisible(true);
|
||||||
|
}
|
||||||
} else{
|
} else{
|
||||||
// console.log('Something Wrong', response)
|
// console.log('Something Wrong', response)
|
||||||
}
|
}
|
||||||
|
|
|
@ -430,11 +430,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
submitButton = this.add.image(displayW / tickIconWidth, 30, "tickIcon").setScale();
|
submitButton = this.add.image(displayW / tickIconWidth, 30, "tickIcon").setScale();
|
||||||
this.add.image(displayW / cancelIconWidth, 30, "cancelIcon").setScale();
|
this.add.image(displayW / cancelIconWidth, 30, "cancelIcon").setScale();
|
||||||
|
|
||||||
const submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', {
|
submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', { font: '600 20px Quicksand', fill: 'blue'}).setDepth(1).setVisible(false);
|
||||||
font: '600 20px Quicksand',
|
|
||||||
fill: 'blue'
|
|
||||||
}).setDepth(1);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// submitButton = this.add.text(window.innerWidth / 2 - buttonWidth, window.innerHeight / 2 - buttonHeight, "Submit", {
|
// submitButton = this.add.text(window.innerWidth / 2 - buttonWidth, window.innerHeight / 2 - buttonHeight, "Submit", {
|
||||||
// font: '600 30px Quicksand',
|
// font: '600 30px Quicksand',
|
||||||
// fill: '#fff',
|
// fill: '#fff',
|
||||||
|
@ -445,7 +441,6 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
submitButton.setInteractive().on('pointerdown', () => {
|
submitButton.setInteractive().on('pointerdown', () => {
|
||||||
// console.log('Clicked');
|
// console.log('Clicked');
|
||||||
// submitButton.setVisible(false);
|
// submitButton.setVisible(false);
|
||||||
submitNotic.setVisible(true);
|
|
||||||
// window.location.reload();
|
// window.location.reload();
|
||||||
// windowLoad();
|
// windowLoad();
|
||||||
submitUserData(this);
|
submitUserData(this);
|
||||||
|
|
|
@ -403,11 +403,8 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
graphics.moveTo(x, y);
|
graphics.moveTo(x, y);
|
||||||
graphics.lineTo(x + lineWidth, y);
|
graphics.lineTo(x + lineWidth, y);
|
||||||
graphics.strokePath();
|
graphics.strokePath();
|
||||||
const submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', {
|
submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', { font: '600 20px Quicksand', fill: 'blue'}).setDepth(1).setVisible(false);
|
||||||
font: '600 20px Quicksand',
|
|
||||||
fill: 'blue'
|
|
||||||
}).setDepth(1);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// submitButton = this.add.text(window.innerWidth / 2 - buttonWidth, window.innerHeight / 2 - buttonHeight, "Submit", {
|
// submitButton = this.add.text(window.innerWidth / 2 - buttonWidth, window.innerHeight / 2 - buttonHeight, "Submit", {
|
||||||
// font: '600 30px Quicksand',
|
// font: '600 30px Quicksand',
|
||||||
// fill: '#fff',
|
// fill: '#fff',
|
||||||
|
@ -458,7 +455,6 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
// submitButton.setVisible(false);
|
// submitButton.setVisible(false);
|
||||||
submitButton.setInteractive().on('pointerdown', () => {
|
submitButton.setInteractive().on('pointerdown', () => {
|
||||||
// submitButton.setVisible(false);
|
// submitButton.setVisible(false);
|
||||||
submitNotic.setVisible(true);
|
|
||||||
// window.location.reload();
|
// window.location.reload();
|
||||||
// windowLoad();
|
// windowLoad();
|
||||||
submitUserData(this);
|
submitUserData(this);
|
||||||
|
@ -567,23 +563,23 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
resultView.setVisible(true);
|
resultView.setVisible(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const footerBorder = this.add.graphics();
|
// const footerBorder = this.add.graphics();
|
||||||
const footerX = 0; const footerY = window.innerHeight / 1.07;
|
// const footerX = 0; const footerY = window.innerHeight / 1.07;
|
||||||
const footerLineWidth = window.innerWidth;
|
// const footerLineWidth = window.innerWidth;
|
||||||
footerBorder.lineStyle(1, 0x0348A8);
|
// footerBorder.lineStyle(1, 0x0348A8);
|
||||||
footerBorder.setAlpha(0.2);
|
// footerBorder.setAlpha(0.2);
|
||||||
footerBorder.beginPath();
|
// footerBorder.beginPath();
|
||||||
footerBorder.moveTo(footerX, footerY);
|
// footerBorder.moveTo(footerX, footerY);
|
||||||
footerBorder.lineTo(footerX + footerLineWidth, footerY);
|
// footerBorder.lineTo(footerX + footerLineWidth, footerY);
|
||||||
footerBorder.strokePath();
|
// footerBorder.strokePath();
|
||||||
let textSize;
|
// let textSize;
|
||||||
if(isMobile){
|
// if(isMobile){
|
||||||
textSize = 10;
|
// textSize = 10;
|
||||||
}else{
|
// }else{
|
||||||
textSize = 20;
|
// textSize = 20;
|
||||||
}
|
// }
|
||||||
this.add.text(displayW / 20, window.innerHeight / 1.05, 'All rights reserved. Copyright@akademy.interakto2024', {font: ` ${textSize}px Quicksand`, fill: '#002C6970',});
|
// this.add.text(displayW / 20, window.innerHeight / 1.05, 'All rights reserved. Copyright@akademy.interakto2024', {font: ` ${textSize}px Quicksand`, fill: '#002C6970',});
|
||||||
this.add.text(displayW / 1.36, window.innerHeight / 1.05, 'Privacy • Terms of use', {font: ` ${textSize}px Quicksand`, fill: '#002C6970',});
|
// this.add.text(displayW / 1.36, window.innerHeight / 1.05, 'Privacy • Terms of use', {font: ` ${textSize}px Quicksand`, fill: '#002C6970',});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// let hideButton = this.add.text(helpButtonWidth, helpButtonHeight, "Let`s Do", {
|
// let hideButton = this.add.text(helpButtonWidth, helpButtonHeight, "Let`s Do", {
|
||||||
|
|
|
@ -409,11 +409,8 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
graphics.moveTo(x, y);
|
graphics.moveTo(x, y);
|
||||||
graphics.lineTo(x + lineWidth, y);
|
graphics.lineTo(x + lineWidth, y);
|
||||||
graphics.strokePath();
|
graphics.strokePath();
|
||||||
const submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', {
|
submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', { font: '600 20px Quicksand', fill: 'blue'}).setDepth(1).setVisible(false);
|
||||||
font: '600 20px Quicksand',
|
|
||||||
fill: 'blue'
|
|
||||||
}).setDepth(1);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// submitButton = this.add.text(window.innerWidth / 2 - buttonWidth, window.innerHeight / 2 - buttonHeight, "Submit", {
|
// submitButton = this.add.text(window.innerWidth / 2 - buttonWidth, window.innerHeight / 2 - buttonHeight, "Submit", {
|
||||||
// font: '600 30px Quicksand',
|
// font: '600 30px Quicksand',
|
||||||
// fill: '#fff',
|
// fill: '#fff',
|
||||||
|
@ -424,7 +421,6 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
submitButton.setInteractive().on('pointerdown', () => {
|
submitButton.setInteractive().on('pointerdown', () => {
|
||||||
// console.log('Clicked');
|
// console.log('Clicked');
|
||||||
// submitButton.setVisible(false);
|
// submitButton.setVisible(false);
|
||||||
submitNotic.setVisible(true);
|
|
||||||
// window.location.reload();
|
// window.location.reload();
|
||||||
// windowLoad();
|
// windowLoad();
|
||||||
submitUserData(this);
|
submitUserData(this);
|
||||||
|
|
|
@ -409,11 +409,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
graphics.moveTo(x, y);
|
graphics.moveTo(x, y);
|
||||||
graphics.lineTo(x + lineWidth, y);
|
graphics.lineTo(x + lineWidth, y);
|
||||||
graphics.strokePath();
|
graphics.strokePath();
|
||||||
const submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', {
|
submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', { font: '600 20px Quicksand', fill: 'blue'}).setDepth(1).setVisible(false);
|
||||||
font: '600 20px Quicksand',
|
|
||||||
fill: 'blue'
|
|
||||||
}).setDepth(1);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// submitButton = this.add.text(window.innerWidth / 2 - buttonWidth, window.innerHeight / 2 - buttonHeight, "Submit", {
|
// submitButton = this.add.text(window.innerWidth / 2 - buttonWidth, window.innerHeight / 2 - buttonHeight, "Submit", {
|
||||||
// font: '600 30px Quicksand',
|
// font: '600 30px Quicksand',
|
||||||
// fill: '#fff',
|
// fill: '#fff',
|
||||||
|
@ -424,7 +420,6 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
submitButton.setInteractive().on('pointerdown', () => {
|
submitButton.setInteractive().on('pointerdown', () => {
|
||||||
// console.log('Clicked');
|
// console.log('Clicked');
|
||||||
// submitButton.setVisible(false);
|
// submitButton.setVisible(false);
|
||||||
submitNotic.setVisible(true);
|
|
||||||
// window.location.reload();
|
// window.location.reload();
|
||||||
// windowLoad();
|
// windowLoad();
|
||||||
submitUserData(this);
|
submitUserData(this);
|
||||||
|
|
|
@ -439,11 +439,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
submitButton = this.add.image(displayW / tickIconWidth, 30, "tickIcon").setScale();
|
submitButton = this.add.image(displayW / tickIconWidth, 30, "tickIcon").setScale();
|
||||||
this.add.image(displayW / cancelIconWidth, 30, "cancelIcon").setScale();
|
this.add.image(displayW / cancelIconWidth, 30, "cancelIcon").setScale();
|
||||||
|
|
||||||
const submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', {
|
submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', { font: '600 20px Quicksand', fill: 'blue'}).setDepth(1).setVisible(false);
|
||||||
font: '600 20px Quicksand',
|
|
||||||
fill: 'blue'
|
|
||||||
}).setDepth(1);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// submitButton = this.add.text(window.innerWidth / 2 - buttonWidth, window.innerHeight / 2 - buttonHeight, "Submit", {
|
// submitButton = this.add.text(window.innerWidth / 2 - buttonWidth, window.innerHeight / 2 - buttonHeight, "Submit", {
|
||||||
// font: '600 30px Quicksand',
|
// font: '600 30px Quicksand',
|
||||||
// fill: '#fff',
|
// fill: '#fff',
|
||||||
|
@ -452,7 +448,6 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
// }).setDepth(1);
|
// }).setDepth(1);
|
||||||
submitButton.setInteractive().on('pointerdown', () => {
|
submitButton.setInteractive().on('pointerdown', () => {
|
||||||
// console.log('Clicked');
|
// console.log('Clicked');
|
||||||
submitNotic.setVisible(true);
|
|
||||||
// window.location.reload();
|
// window.location.reload();
|
||||||
// windowLoad();
|
// windowLoad();
|
||||||
submitUserData(this);
|
submitUserData(this);
|
||||||
|
|
|
@ -424,12 +424,6 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
const retryButton = this.add.image(displayW / resetIconWidth, 30, "resetIcon").setScale();
|
const retryButton = this.add.image(displayW / resetIconWidth, 30, "resetIcon").setScale();
|
||||||
submitButton = this.add.image(displayW / tickIconWidth, 30, "tickIcon").setScale();
|
submitButton = this.add.image(displayW / tickIconWidth, 30, "tickIcon").setScale();
|
||||||
this.add.image(displayW / cancelIconWidth, 30, "cancelIcon").setScale();
|
this.add.image(displayW / cancelIconWidth, 30, "cancelIcon").setScale();
|
||||||
|
|
||||||
const submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', {
|
|
||||||
font: '600 20px Quicksand',
|
|
||||||
fill: 'blue'
|
|
||||||
}).setDepth(1);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// submitButton = this.add.text(window.innerWidth / 2 - buttonWidth, window.innerHeight / 2 - buttonHeight, "Submit", {
|
// submitButton = this.add.text(window.innerWidth / 2 - buttonWidth, window.innerHeight / 2 - buttonHeight, "Submit", {
|
||||||
// font: '600 30px Quicksand',
|
// font: '600 30px Quicksand',
|
||||||
// fill: '#fff',
|
// fill: '#fff',
|
||||||
|
@ -438,7 +432,6 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
// }).setDepth(1);
|
// }).setDepth(1);
|
||||||
submitButton.setInteractive().on('pointerdown', () => {
|
submitButton.setInteractive().on('pointerdown', () => {
|
||||||
// console.log('Clicked');
|
// console.log('Clicked');
|
||||||
submitNotic.setVisible(true);
|
|
||||||
// window.location.reload();
|
// window.location.reload();
|
||||||
// windowLoad();
|
// windowLoad();
|
||||||
submitUserData(this);
|
submitUserData(this);
|
||||||
|
|
|
@ -184,11 +184,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
retryButton.setInteractive().on('pointerdown', () => {
|
retryButton.setInteractive().on('pointerdown', () => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
const submitNotic = this.add.text(window.innerWidth * 0.5 - noticeWidth, window.innerHeight * 0.85 - noticeHeight, 'Submitted Successfully', {
|
submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', { font: '600 20px Quicksand', fill: 'blue'}).setDepth(1).setVisible(false);
|
||||||
font: '600 20px Quicksand',
|
|
||||||
fill: 'blue'
|
|
||||||
}).setDepth(1);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// submitButton = this.add.text(window.innerWidth - submitWidth, window.innerHeight - submitHeight, "Submit", {
|
// submitButton = this.add.text(window.innerWidth - submitWidth, window.innerHeight - submitHeight, "Submit", {
|
||||||
// font: '600 30px Quicksand',
|
// font: '600 30px Quicksand',
|
||||||
// fill: '#fff',
|
// fill: '#fff',
|
||||||
|
@ -197,8 +193,6 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
// });
|
// });
|
||||||
submitButton.setVisible(true);
|
submitButton.setVisible(true);
|
||||||
submitButton.setInteractive().on('pointerdown', () => {
|
submitButton.setInteractive().on('pointerdown', () => {
|
||||||
submitNotic.setVisible(true);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// windowLoad();
|
// windowLoad();
|
||||||
submitUserData(this);
|
submitUserData(this);
|
||||||
});
|
});
|
||||||
|
|
|
@ -184,11 +184,8 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
retryButton.setInteractive().on('pointerdown', () => {
|
retryButton.setInteractive().on('pointerdown', () => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
const submitNotic = this.add.text(window.innerWidth * 0.5 - noticeWidth, window.innerHeight * 0.85 - noticeHeight, 'Submitted Successfully', {
|
submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', { font: '600 20px Quicksand', fill: 'blue'}).setDepth(1).setVisible(false);
|
||||||
font: '600 20px Quicksand',
|
|
||||||
fill: 'blue'
|
|
||||||
}).setDepth(1);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// submitButton = this.add.text(window.innerWidth - submitWidth, window.innerHeight - submitHeight, "Submit", {
|
// submitButton = this.add.text(window.innerWidth - submitWidth, window.innerHeight - submitHeight, "Submit", {
|
||||||
// font: '600 30px Quicksand',
|
// font: '600 30px Quicksand',
|
||||||
// fill: '#fff',
|
// fill: '#fff',
|
||||||
|
@ -197,8 +194,6 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
// });
|
// });
|
||||||
submitButton.setVisible(true);
|
submitButton.setVisible(true);
|
||||||
submitButton.setInteractive().on('pointerdown', () => {
|
submitButton.setInteractive().on('pointerdown', () => {
|
||||||
submitNotic.setVisible(true);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// windowLoad();
|
// windowLoad();
|
||||||
submitUserData(this);
|
submitUserData(this);
|
||||||
});
|
});
|
||||||
|
|
|
@ -33,6 +33,8 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
let scoreTotal = 0;
|
let scoreTotal = 0;
|
||||||
let noticeWidth;
|
let noticeWidth;
|
||||||
let noticeHeight;
|
let noticeHeight;
|
||||||
|
let muteIcon;
|
||||||
|
let retryButton;
|
||||||
if(isMobile){
|
if(isMobile){
|
||||||
topLogoWidth = 4.5;
|
topLogoWidth = 4.5;
|
||||||
muteIconWidth = 1.8;
|
muteIconWidth = 1.8;
|
||||||
|
@ -119,6 +121,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
};
|
};
|
||||||
const game = new Phaser.Game(config);
|
const game = new Phaser.Game(config);
|
||||||
})
|
})
|
||||||
|
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Error fetching initial data:', error);
|
console.error('Error fetching initial data:', error);
|
||||||
});
|
});
|
||||||
|
@ -178,19 +181,15 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
borderBottom.strokePath();
|
borderBottom.strokePath();
|
||||||
|
|
||||||
this.add.image(customWidth / topLogoWidth, 30, "topLogo");
|
this.add.image(customWidth / topLogoWidth, 30, "topLogo");
|
||||||
this.add.image(customWidth / muteIconWidth, 30, "muteIcon");
|
muteIcon = this.add.image(customWidth / muteIconWidth, 30, "muteIcon");
|
||||||
const retryButton = this.add.image(customWidth / resetIconWidth, 30, "resetIcon");
|
retryButton = this.add.image(customWidth / resetIconWidth, 30, "resetIcon");
|
||||||
submitButton = this.add.image(customWidth / tickIconWidth, 30, "tickIcon");
|
submitButton = this.add.image(customWidth / tickIconWidth, 30, "tickIcon");
|
||||||
|
|
||||||
|
|
||||||
retryButton.setInteractive().on('pointerdown', () => {
|
retryButton.setInteractive().on('pointerdown', () => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
const submitNotic = this.add.text(window.innerWidth * 0.5 - noticeWidth, window.innerHeight * 0.85 - noticeHeight, 'Submitted Successfully', {
|
submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', { font: '600 20px Quicksand', fill: 'blue'}).setDepth(1).setVisible(false);
|
||||||
font: '600 20px Quicksand',
|
|
||||||
fill: 'blue'
|
|
||||||
}).setDepth(1);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// submitButton = this.add.text(window.innerWidth - submitWidth, window.innerHeight - submitHeight, "Submit", {
|
// submitButton = this.add.text(window.innerWidth - submitWidth, window.innerHeight - submitHeight, "Submit", {
|
||||||
// font: '600 30px Quicksand',
|
// font: '600 30px Quicksand',
|
||||||
// fill: '#fff',
|
// fill: '#fff',
|
||||||
|
@ -199,8 +198,6 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
// });
|
// });
|
||||||
submitButton.setVisible(true);
|
submitButton.setVisible(true);
|
||||||
submitButton.setInteractive().on('pointerdown', () => {
|
submitButton.setInteractive().on('pointerdown', () => {
|
||||||
submitNotic.setVisible(true);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// windowLoad();
|
// windowLoad();
|
||||||
submitUserData(this);
|
submitUserData(this);
|
||||||
});
|
});
|
||||||
|
@ -660,10 +657,17 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
submitButton.setVisible(false);
|
submitButton.setVisible(false);
|
||||||
snapshotButton.setVisible(false);
|
snapshotButton.setVisible(false);
|
||||||
customCursor.setVisible(false);
|
customCursor.setVisible(false);
|
||||||
|
muteIcon.setVisible(false);
|
||||||
|
retryButton.setVisible(false);
|
||||||
|
|
||||||
|
|
||||||
drawingZone.renderer.snapshot((image) => {
|
drawingZone.renderer.snapshot((image) => {
|
||||||
submitButton.setVisible(true);
|
submitButton.setVisible(true);
|
||||||
snapshotButton.setVisible(true);
|
snapshotButton.setVisible(true);
|
||||||
customCursor.setVisible(true);
|
customCursor.setVisible(true);
|
||||||
|
muteIcon.setVisible(true);
|
||||||
|
retryButton.setVisible(true);
|
||||||
|
|
||||||
image.style.width = '160px';
|
image.style.width = '160px';
|
||||||
image.style.height = '120px';
|
image.style.height = '120px';
|
||||||
image.style.paddingLeft = '2px';
|
image.style.paddingLeft = '2px';
|
||||||
|
|
|
@ -236,11 +236,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
retryButton.setInteractive().on('pointerdown', ()=>{
|
retryButton.setInteractive().on('pointerdown', ()=>{
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
})
|
})
|
||||||
const submitNotic = this.add.text(window.innerWidth * 0.5 - noticeWidth, window.innerHeight * 0.85 - noticeHeight, 'Submitted Successfully', {
|
submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', { font: '600 20px Quicksand', fill: 'blue'}).setDepth(1).setVisible(false);
|
||||||
font: '600 20px Quicksand',
|
|
||||||
fill: 'blue'
|
|
||||||
}).setDepth(1);
|
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// submitButton = this.add.text(window.innerWidth - submitWidth, window.innerHeight - submitHeight, "Submit", {
|
// submitButton = this.add.text(window.innerWidth - submitWidth, window.innerHeight - submitHeight, "Submit", {
|
||||||
// font: '600 30px Quicksand',
|
// font: '600 30px Quicksand',
|
||||||
// fill: '#fff',
|
// fill: '#fff',
|
||||||
|
@ -249,7 +245,6 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
// });
|
// });
|
||||||
submitButton.setInteractive().on('pointerdown', () => {
|
submitButton.setInteractive().on('pointerdown', () => {
|
||||||
// console.log('Clicked');
|
// console.log('Clicked');
|
||||||
submitNotic.setVisible(true);
|
|
||||||
// windowLoad();
|
// windowLoad();
|
||||||
// submitUserData();
|
// submitUserData();
|
||||||
submitUserData(this);
|
submitUserData(this);
|
||||||
|
|
|
@ -214,8 +214,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
retryButton.setInteractive().on('pointerdown', () => {
|
retryButton.setInteractive().on('pointerdown', () => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
})
|
})
|
||||||
const submitNotic = this.add.text(window.innerWidth * 0.5 - noticeWidth, window.innerHeight * 0.85 - noticeHeight, 'Submitted Successfully', {font: '600 20px Quicksand', fill: 'blue'}).setDepth(1);
|
submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', { font: '600 20px Quicksand', fill: 'blue'}).setDepth(1).setVisible(false);
|
||||||
submitNotic.setVisible(false);
|
|
||||||
// submitButton = this.add.text(window.innerWidth - submitWidth, window.innerHeight - submitHeight, "Submit", {
|
// submitButton = this.add.text(window.innerWidth - submitWidth, window.innerHeight - submitHeight, "Submit", {
|
||||||
// font: '600 30px Quicksand',
|
// font: '600 30px Quicksand',
|
||||||
// fill: '#fff',
|
// fill: '#fff',
|
||||||
|
@ -226,7 +225,6 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
submitButton.setInteractive().on('pointerdown', () => {
|
submitButton.setInteractive().on('pointerdown', () => {
|
||||||
// console.log('Clicked');
|
// console.log('Clicked');
|
||||||
// submitButton.setVisible(false);
|
// submitButton.setVisible(false);
|
||||||
submitNotic.setVisible(true);
|
|
||||||
// windowLoad();
|
// windowLoad();
|
||||||
submitUserData(this);
|
submitUserData(this);
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue