Fixing center computation of popup
This commit is contained in:
parent
7d2cc66f11
commit
10bd073b7d
@ -192,11 +192,11 @@ export class MenuScene extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let middleY = (window.innerHeight / 3) - (257);
|
let middleY = this.scale.height / 2 - 392/2;
|
||||||
if(middleY < 0){
|
if(middleY < 0){
|
||||||
middleY = 0;
|
middleY = 0;
|
||||||
}
|
}
|
||||||
let middleX = (window.innerWidth / 3) - 298;
|
let middleX = this.scale.width / 2 - 457/2;
|
||||||
if(middleX < 0){
|
if(middleX < 0){
|
||||||
middleX = 0;
|
middleX = 0;
|
||||||
}
|
}
|
||||||
@ -236,11 +236,11 @@ export class MenuScene extends Phaser.Scene {
|
|||||||
|
|
||||||
this.gameShareOpened = true;
|
this.gameShareOpened = true;
|
||||||
|
|
||||||
let middleY = (window.innerHeight / 3) - (257);
|
let middleY = this.scale.height / 2 - 85;
|
||||||
if(middleY < 0){
|
if(middleY < 0){
|
||||||
middleY = 0;
|
middleY = 0;
|
||||||
}
|
}
|
||||||
let middleX = (window.innerWidth / 3) - 298;
|
let middleX = this.scale.width / 2 - 200;
|
||||||
if(middleX < 0){
|
if(middleX < 0){
|
||||||
middleX = 0;
|
middleX = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user