Skip to content

Commit

Permalink
added a function to trigger basic full-screen support
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamAtomic committed Oct 16, 2011
1 parent 289486b commit 2c1e5dc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions org/flixel/FlxG.as
Expand Up @@ -322,6 +322,18 @@ package org.flixel
_game._maxAccumulation = _game._step;
}

/**
* Switch to full-screen display.
*/
static public function fullscreen():void
{
FlxG.stage.displayState = "fullScreen";
var fsw:uint = FlxG.width*FlxG.camera.zoom;
var fsh:uint = FlxG.height*FlxG.camera.zoom;
FlxG.camera.x = (FlxG.stage.fullScreenWidth - fsw)/2;
FlxG.camera.y = (FlxG.stage.fullScreenHeight - fsh)/2;
}

/**
* Generates a random number. Deterministic, meaning safe
* to use if you want to record replays in random environments.
Expand Down

0 comments on commit 2c1e5dc

Please sign in to comment.