This commit is contained in:
2023-09-15 21:39:35 +05:30
parent 2b296cd549
commit 5ac894fc92
2 changed files with 20 additions and 20 deletions

View File

@@ -341,13 +341,13 @@ import Layout from '../../layouts/Layout.astro';
graphics.strokePath();
}
};
// Add a "Save Snapshot" button
snapshotButton = this.add.image(window.innerWidth / 20, window.innerHeight / 2.3, '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', () => {
captureSnapshot(this);
});
// // Add a "Save Snapshot" button
// snapshotButton = this.add.image(window.innerWidth / 20, window.innerHeight / 2.3, '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', () => {
// captureSnapshot(this);
// });
}
function captureSnapshot(game) {
game.renderer.snapshot((image) => {