csb
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user