some more tweaks with smooth zooming control
This commit is contained in:
@@ -12,8 +12,6 @@ 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);
|
||||
}
|
||||
@@ -23,14 +21,6 @@ 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();
|
||||
|
||||
@@ -82,6 +72,10 @@ export class WaScaleManager {
|
||||
this._saveZoom = this.hdpiManager.zoomModifier;
|
||||
}
|
||||
|
||||
public getSaveZoom(): number {
|
||||
return this._saveZoom;
|
||||
}
|
||||
|
||||
public restoreZoom(): void {
|
||||
this.hdpiManager.zoomModifier = this._saveZoom;
|
||||
this.applyNewSize();
|
||||
|
||||
Reference in New Issue
Block a user