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