locking zooming via player input
This commit is contained in:
parent
ef3a7513e2
commit
092daa245f
4 changed files with 26 additions and 7 deletions
|
@ -12,6 +12,8 @@ export class WaScaleManager {
|
|||
private actualZoom: number = 1;
|
||||
private _saveZoom: number = 1;
|
||||
|
||||
private zoomingViaPlayerInputLocked: boolean = false;
|
||||
|
||||
public constructor(private minGamePixelsNumber: number, private absoluteMinPixelNumber: number) {
|
||||
this.hdpiManager = new HdpiManager(minGamePixelsNumber, absoluteMinPixelNumber);
|
||||
}
|
||||
|
@ -21,6 +23,14 @@ export class WaScaleManager {
|
|||
this.game = game;
|
||||
}
|
||||
|
||||
public isZoomingViaPlayerInputLocked(): boolean {
|
||||
return this.zoomingViaPlayerInputLocked;
|
||||
}
|
||||
|
||||
public lockZoomingViaPlayerInput(lock: boolean = true): void {
|
||||
this.zoomingViaPlayerInputLocked = lock;
|
||||
}
|
||||
|
||||
public applyNewSize() {
|
||||
const { width, height } = coWebsiteManager.getGameSize();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue