colour "offstage" area (negative coordinates) black instead of gray

This commit is contained in:
Jeremy Penner 2011-02-02 17:36:22 -08:00
parent 991936c66e
commit 2a867c6998
3 changed files with 39 additions and 3 deletions

32
src/Offstage.as Normal file
View file

@ -0,0 +1,32 @@
package
{
import flash.geom.Point;
import net.flashpunk.Entity;
import net.flashpunk.FP;
import net.flashpunk.Graphic;
import net.flashpunk.Mask;
import net.flashpunk.utils.Draw;
/**
* ...
* @author jjp
*/
public class Offstage extends Entity
{
public function Offstage(layer:int)
{
super();
this.layer = layer;
}
override public function render():void
{
var stage:WorldStage = WorldStage(world);
var pointScreen00:Point = stage.PointScreenFromReal(new Point(0, 0));
if (pointScreen00.x > 0)
Draw.rect(0, 0, pointScreen00.x, FP.height, 0);
if (pointScreen00.y > 0)
Draw.rect(0, 0, FP.width, pointScreen00.y, 0);
}
}
}

View file

@ -57,7 +57,8 @@ package
public static const LAYER_SIDEBAR: int = 50;
public static const LAYER_SAVE: int = 60;
public static const LAYER_MSG: int = 70;
public static const LAYER_OFFSTAGE: int = 1000;
private var imgdir: Imgdir;
private var dragView: Drag;
private var urff: String;
@ -90,6 +91,8 @@ package
sidebarMsg = null;
alarmMsg = null;
rgmsg = new Vector.<String>()
add(new Offstage(LAYER_OFFSTAGE));
zoom = 1;
pointView = new Point(0, 0);

View file

@ -1,6 +1,6 @@
- fix scrollwheel sensitivity
- show 0,0, maybe some other griddy options
- decide on a license
- finalize "library" notion
- text objects
@ -10,4 +10,5 @@
DONE:
- auto image reloading
- panning
- zoom to 100% (magnifying glass icon?)
- zoom to 100% (magnifying glass icon?)
- show 0,0, maybe some other griddy options