drawing game depth change cause of no available tranasparent image

pull/5/head
dev sp 2023-12-17 10:58:07 +00:00
parent 20f8733de1
commit d1e08b721a
2 changed files with 15 additions and 12 deletions

View File

@ -18,15 +18,19 @@ import Layout from '../../layouts/Layout.astro';
height: window.innerHeight / 2,
};
if(isMobile){
submitWidth = 230;
submitHeight = 95;
submitWidth = 250;
submitHeight = 110;
noticeWidth = 100;
noticeHeight = 0;
downloadWidth = 67;
downloadHeight = 200;
} else {
submitWidth = 380;
submitHeight = 95;
noticeWidth = 0;
noticeHeight = 0;
downloadWidth = 180;
downloadHeight = 70;
}
var assetsList = {}
var snapshotButton;
@ -158,17 +162,17 @@ import Layout from '../../layouts/Layout.astro';
})
const textStyle = {font: 'bold 40px quicksand', fill: '#05b3a4',};
if(!isMobile){
this.add.text(customWidth / 10, 20, "Drawing", textStyle);
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
// this.add.text(customWidth / 10, 20, "Drawing", textStyle);
// this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
} else {
this.add.text(customWidth / 30, 0, "Drawing", textStyle);
this.add.image(customWidth / 2 * 1.6 - 0.5, 25, 'topLogo');
// this.add.text(customWidth / 30, 0, "Drawing", textStyle);
// this.add.image(customWidth / 2 * 1.6 - 0.5, 25, 'topLogo');
}
const outlineImage = this.add.image(customWidth / 2, customHeight / 2, 'outline');
if(isMobile){
outlineImage.setDepth(1).setScale(0.5);
outlineImage.setDepth(-1).setScale(0.33);
} else{
outlineImage.setDepth(1).setScale(0.7);
outlineImage.setDepth(-1).setScale(0.75);
}
graphics = this.add.graphics();
@ -429,7 +433,7 @@ import Layout from '../../layouts/Layout.astro';
snapWidth = 200;
snapHeight = 70;
}
snapshotButton = this.add.image(window.innerWidth - snapWidth, window.innerHeight - snapHeight, 'buttonIcons');
snapshotButton = this.add.image(window.innerWidth - downloadWidth, window.innerHeight - downloadHeight, 'buttonIcons');
// snapshotButton = this.add.text(150, 80, 'SAVE', { fill: '#7c4c23', backgroundColor : '#5e17eb', font: '600 30px quicksand', borderRadius: '20px'}).setPadding(10, 10);
snapshotButton.setInteractive();
snapshotButton.on('pointerdown', () => {
@ -460,7 +464,6 @@ import Layout from '../../layouts/Layout.astro';
// graphics.clear();
});
}
function startDrawing(x, y) {
if (!isErasing) {
graphics.lineStyle(brushSize * 2, Phaser.Display.Color.HexStringToColor(selectedColor).color);

View File

@ -290,9 +290,9 @@ import Layout from "../../layouts/Layout.astro";
/* border: 4px solid red;
border-radius: 5%; */
}
.round-checkbox-input {
/* .round-checkbox-input {
display: none;
}
} */
.round-checkbox-label {
display: inline-block;
/* width: 30px; */