From 1d18dd7ecdb2d5c8e046eff3992e16abab973626 Mon Sep 17 00:00:00 2001 From: Suvodip Ghosh Date: Fri, 20 Jun 2025 12:14:55 +0530 Subject: [PATCH] s1 --- src/pages/drawing/game_drawing_jpg.astro | 26 ++++++++++++++++++------ src/pages/test-game.astro | 4 +++- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/pages/drawing/game_drawing_jpg.astro b/src/pages/drawing/game_drawing_jpg.astro index a4a69ce..a2a4034 100644 --- a/src/pages/drawing/game_drawing_jpg.astro +++ b/src/pages/drawing/game_drawing_jpg.astro @@ -317,7 +317,7 @@ import Layout from '../../layouts/Layout.astro'; wrapWidth = 200; } - const descrptText = this.add.text(screenCenterX, isSmallMobile ? 100 : isMobile ? 130 : 90, data.description, { font: `${responsiveFontSize}px quicksand`, fill: '#60C6CB', align: "center", wordWrap: { width: window.innerWidth - wrapWidth }}).setOrigin(0.5); + const descrptText = this.add.text(screenCenterX, isSmallMobile ? 70 : isMobile ? 80 : 90, data.description, { font: `${responsiveFontSize}px quicksand`, fill: '#60C6CB', align: "center", wordWrap: { width: window.innerWidth - wrapWidth }}).setOrigin(0.5); // this.add.text(customWidth / 2 - learningWidth, customHeight / 2 - learningHeight, data.LearningArea, {font: `20px`}).setTint(0X7C4C23) // this.add.text(customWidth / 2 - learningWidth, customHeight / 2 - learningHeight + 20, data.LearningSubArea, {font: `20px`}).setTint(0X7C4C23) }) @@ -362,7 +362,21 @@ import Layout from '../../layouts/Layout.astro'; borderBottom.lineTo(x + lineWidth, y); borderBottom.strokePath(); - const outlineImage = this.add.image(customWidth / 2, customHeight / 2 + 20, 'outline'); + let outlineImageHeight = 20; + + if(isSmallMobile){ + outlineImageHeight = 0; + } else if(isMobile){ + outlineImageHeight = 50; + } else if(isTablet){ + outlineImageHeight = 60; + } else if(isSmallLaptop){ + outlineImageHeight = 30; + } else{ + outlineImageHeight = 70; + } + + const outlineImage = this.add.image(customWidth / 2, customHeight / 2 + outlineImageHeight, 'outline'); // this.add.image(customWidth / topLogoWidth, 30, "topLogo"); // this.add.image(customWidth / muteIconWidth, 30, "muteIcon"); // const retryButton = this.add.image(customWidth / resetIconWidth, 30, "resetIcon"); @@ -424,15 +438,15 @@ import Layout from '../../layouts/Layout.astro'; // } if(isSmallMobile){ - outlineImage.setDepth(-1).setScale(0.25); + outlineImage.setDepth(-1).setScale(0.24); }else if(isMobile){ - outlineImage.setDepth(-1).setScale(0.29); + outlineImage.setDepth(-1).setScale(0.28); }else if(isTablet){ outlineImage.setDepth(-1).setScale(0.30); } else if(isSmallLaptop){ - outlineImage.setDepth(-1).setScale(0.24); + outlineImage.setDepth(-1).setScale(0.26); } else{ - outlineImage.setDepth(-1).setScale(0.4); + outlineImage.setDepth(-1).setScale(0.3); } const maskGraphics = this.make.graphics(); diff --git a/src/pages/test-game.astro b/src/pages/test-game.astro index b7d77ef..91b607d 100644 --- a/src/pages/test-game.astro +++ b/src/pages/test-game.astro @@ -5,10 +5,12 @@ import Layout from "../layouts/Layout.astro"
+ + \ No newline at end of file