diff --git a/src/pages/drag/index.astro b/src/pages/drag/index.astro index c7562a6..8fb0ea9 100644 --- a/src/pages/drag/index.astro +++ b/src/pages/drag/index.astro @@ -262,7 +262,7 @@ class MyGame extends Phaser.Scene { // Calculate responsive font size based on screen width const responsiveFontSize = (window.innerWidth / 950) * baseFontSize; // Adjust 800 to your desired reference width const descrptText = this.add.text(screenCenterX, 70, data.description, { - font: `${responsiveFontSize}px quicksand`, + font: `600 ${responsiveFontSize}px Quicksand`, fill: '#7c4c23', }).setOrigin(0.5); diff --git a/src/pages/drawing/index.astro b/src/pages/drawing/index.astro index 91e24d5..fab6f54 100644 --- a/src/pages/drawing/index.astro +++ b/src/pages/drawing/index.astro @@ -56,6 +56,7 @@ import Layout from '../../layouts/Layout.astro'; let customCursor; const cursorSizeMultiplier = 1; let isErasing = false; + let snapNotice; function preload() { this.load.image('outline', assetsList.image); @@ -356,8 +357,11 @@ import Layout from '../../layouts/Layout.astro'; snapshotButton.on('pointerdown', () => { captureSnapshot(this); }); + snapNotice = this.add.text(customWidth / 2, customHeight / 2, 'Succecfully Downloded', {font :'700 30px Quicksand', fill: '#05b3a4'}); + snapNotice.setVisible(false); } function captureSnapshot(drawingZone) { + snapNotice.setVisible(true); snapshotButton.setVisible(false); customCursor.setVisible(false); drawingZone.renderer.snapshot((image) => { @@ -367,14 +371,13 @@ import Layout from '../../layouts/Layout.astro'; image.style.height = '120px'; image.style.paddingLeft = '2px'; document.body.appendChild(image); - // Download the snapshot as an image const link = document.createElement('a'); link.href = image.src; link.download = 'my_drawing.png'; link.click(); document.body.removeChild(image); - + // Clear the drawing // graphics.clear(); }); diff --git a/src/pages/guided-tracing/A.astro b/src/pages/guided-tracing/A.astro index 76e22f1..6791497 100644 --- a/src/pages/guided-tracing/A.astro +++ b/src/pages/guided-tracing/A.astro @@ -284,10 +284,6 @@ import Layout from "../../layouts/Layout.astro"; firstLayer.setAlpha(0.5); } }); - - // Repeat the above code for secondLayer and thirdLayer - - // Add this code for secondLayer secondLayer.on('dragstart', (pointer) => { secondDragStartPoint.x = pointer.x; secondDragStartPoint.y = pointer.y;