csb
parent
2b296cd549
commit
5ac894fc92
|
@ -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) => {
|
||||
|
|
|
@ -33,7 +33,7 @@ const data = fetch(`https://management.beanstalkedu.com/items/game_tracing/${enc
|
|||
type: Phaser.AUTO,
|
||||
width: window.innerWidth,
|
||||
height: window.innerHeight,
|
||||
backgroundColor: '#05b3a4',
|
||||
backgroundColor: '#fff',
|
||||
scale: {
|
||||
mode: Phaser.Scale.FIT,
|
||||
autoCenter: Phaser.Scale.CENTER_HORIZONTALLY,
|
||||
|
@ -78,15 +78,15 @@ function create() {
|
|||
if (!isMobile) {
|
||||
image = this.add.image(customWidth / 4, customHeight / 2, 'letter_img');
|
||||
image.setInteractive().setDepth(1).setScale(0.6);
|
||||
letter_img = this.add.image(customWidth / 1.5, customHeight / 2, 'icon_img');
|
||||
letter_img.setDepth().setScale(0.6);
|
||||
this.add.text(customWidth / 1.6, customHeight / 1.25, data.icon_name, textStyle2);
|
||||
// letter_img = this.add.image(customWidth / 1.5, customHeight / 2, 'icon_img');
|
||||
// letter_img.setDepth().setScale(0.6);
|
||||
// this.add.text(customWidth / 1.6, customHeight / 1.25, data.icon_name, textStyle2);
|
||||
} else {
|
||||
image = this.add.image(customWidth / 2.5, customHeight / 2.5, 'letter_img');
|
||||
image.setInteractive().setDepth(1).setScale(0.3);
|
||||
letter_img = this.add.image(customWidth / 1.35, customHeight / 2 + 100, 'icon_img');
|
||||
letter_img.setDepth().setScale(0.3);
|
||||
this.add.text(customWidth / 2, customHeight / 1.3, data.icon_name, textStyle2);
|
||||
// letter_img = this.add.image(customWidth / 1.35, customHeight / 2 + 100, 'icon_img');
|
||||
// letter_img.setDepth().setScale(0.3);
|
||||
// this.add.text(customWidth / 2, customHeight / 1.3, data.icon_name, textStyle2);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
@ -122,12 +122,12 @@ function create() {
|
|||
graphics.closePath();
|
||||
}, this);
|
||||
|
||||
// Add a "Save Snapshot" button
|
||||
snapshotButton = this.add.text(customWidth - 150, customHeight - 80, 'SAVE', { fill: '#fff', 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.text(customWidth - 150, customHeight - 80, 'SAVE', { fill: '#fff', backgroundColor : '#5e17eb', font: '600 30px quicksand', borderRadius: '20px'}).setPadding(10, 10);
|
||||
// snapshotButton.setInteractive();
|
||||
// snapshotButton.on('pointerdown', () => {
|
||||
// captureSnapshot(this);
|
||||
// });
|
||||
}
|
||||
|
||||
function update() {}
|
||||
|
|
Loading…
Reference in New Issue