-
Notifications
You must be signed in to change notification settings - Fork 136
Open
Description
I'd like to add this to the screen class:
/**
* Zoom full screen.
*/
public function zoom(scale:Number):void
{
this.scale = scale;
var width:int = FP.width / this.scale;
var height:int = FP.height / this.scale;
FP.bounds.width = width;
FP.bounds.height = height;
this.resize(width, height);
}
/**
* Initialise buffers to current screen size.
*/
public function resize(width:int = 0, height:int = 0):void
{
if (width <= 0) {
width = FP.width
}
if (height <= 0) {
height = FP.width
}
I tested the code a little bit, don't know if it causes any trouble in other bits of the code. but my test ran fine.
Metadata
Metadata
Assignees
Labels
No labels