colour "offstage" area (negative coordinates) black instead of gray
This commit is contained in:
parent
991936c66e
commit
2a867c6998
32
src/Offstage.as
Normal file
32
src/Offstage.as
Normal 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -57,6 +57,7 @@ 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;
|
||||
|
@ -91,6 +92,8 @@ package
|
|||
alarmMsg = null;
|
||||
rgmsg = new Vector.<String>()
|
||||
|
||||
add(new Offstage(LAYER_OFFSTAGE));
|
||||
|
||||
zoom = 1;
|
||||
pointView = new Point(0, 0);
|
||||
dragView = null;
|
||||
|
|
3
todo.txt
3
todo.txt
|
@ -1,6 +1,6 @@
|
|||
- fix scrollwheel sensitivity
|
||||
- show 0,0, maybe some other griddy options
|
||||
|
||||
- decide on a license
|
||||
- finalize "library" notion
|
||||
- text objects
|
||||
|
||||
|
@ -11,3 +11,4 @@ DONE:
|
|||
- auto image reloading
|
||||
- panning
|
||||
- zoom to 100% (magnifying glass icon?)
|
||||
- show 0,0, maybe some other griddy options
|
||||
|
|
Loading…
Reference in a new issue