s1
This commit is contained in:
@@ -97,6 +97,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||
let noticeWidth;
|
||||
let noticeHeight;
|
||||
let maxScore;
|
||||
let erase;
|
||||
if(isMobile){
|
||||
topLogoWidth = 4.5;
|
||||
muteIconWidth = 1.8;
|
||||
@@ -297,7 +298,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||
submitButton = this.add.image(customWidth / tickIconWidth, 30, "tickIcon");
|
||||
|
||||
retryButton.setInteractive().on('pointerdown', ()=>{
|
||||
window.location.reload();
|
||||
graphics.clear();
|
||||
})
|
||||
submitNotic = this.add.text(window.innerWidth / 2 - noticeWidth, window.innerHeight / 2 - noticeHeight, 'Submitted Successfully', {font: '600 20px Quicksand', fill: '#FFFFFF', backgroundColor: '#004aad',padding: {left: 20,right: 20,top: 10,bottom: 10}}).setDepth(3).setVisible(false);
|
||||
// submitButton = this.add.text(window.innerWidth - submitWidth, window.innerHeight - submitHeight, "Submit", {
|
||||
@@ -772,12 +773,49 @@ import Layout from '../../layouts/Layout.astro';
|
||||
slider.style.background = `linear-gradient(to right, #000 0%, #000 ${offsetX}px, #fff ${offsetX}px, #fff 100%)`;
|
||||
};
|
||||
const cursorSize = brushSize * cursorSizeMultiplier;
|
||||
customCursor.clear(); // Clear the previous frame
|
||||
customCursor.lineStyle(3, 0x000000); // Set the line style (2 is the line thickness, 0x000000 is black color)
|
||||
customCursor.clear();
|
||||
customCursor.lineStyle(1.5, 0x000000);
|
||||
customCursor.strokeCircle(0, 0, cursorSize);
|
||||
// Position the cursor at the current mouse pointer coordinates
|
||||
customCursor.fillStyle(Phaser.Display.Color.HexStringToColor(selectedColor).color, 1);
|
||||
customCursor.fillCircle(0, 0, cursorSize);
|
||||
customCursor.x = this.input.x;
|
||||
customCursor.y = this.input.y;
|
||||
customCursor.moveTo(0, -cursorSize+3);
|
||||
customCursor.lineTo(0, cursorSize-3);
|
||||
|
||||
customCursor.moveTo(-cursorSize + 3, 0);
|
||||
customCursor.lineTo(cursorSize-3, 0);
|
||||
customCursor.strokePath();
|
||||
|
||||
if (erase === true) {
|
||||
customCursor.clear();
|
||||
customCursor.lineStyle(3, 0x000000);
|
||||
customCursor.strokeCircle(0, 0, cursorSize);
|
||||
customCursor.x = this.input.x;
|
||||
customCursor.y = this.input.y;
|
||||
|
||||
customCursor.moveTo(0, -cursorSize+3);
|
||||
customCursor.lineTo(0, cursorSize-3);
|
||||
|
||||
customCursor.moveTo(-cursorSize + 3, 0);
|
||||
customCursor.lineTo(cursorSize-3, 0);
|
||||
customCursor.strokePath();
|
||||
} else if (erase === false) {
|
||||
customCursor.clear();
|
||||
customCursor.lineStyle(3, 0x000000);
|
||||
customCursor.strokeCircle(0, 0, cursorSize);
|
||||
customCursor.fillStyle(Phaser.Display.Color.HexStringToColor(selectedColor).color, 1);
|
||||
customCursor.fillCircle(0, 0, cursorSize);
|
||||
customCursor.x = this.input.x;
|
||||
customCursor.y = this.input.y;
|
||||
|
||||
customCursor.moveTo(0, -cursorSize+3);
|
||||
customCursor.lineTo(0, cursorSize-3);
|
||||
|
||||
customCursor.moveTo(-cursorSize + 3, 0);
|
||||
customCursor.lineTo(cursorSize-3, 0);
|
||||
customCursor.strokePath();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user