[editor] update

This commit is contained in:
2018-02-05 20:46:11 +03:00
parent b36fd77d74
commit feb5bafe72
9 changed files with 100 additions and 37 deletions

View File

@@ -78,6 +78,7 @@ class BitmapItem<T:TRectangle> extends RenderItem<T, Bitmap> {
class BrickItem extends RenderItem<Brick, Shape> {
private var broken:Int;
private var type:Int;
public function new(value:Brick) {
super(value);
@@ -104,8 +105,10 @@ class BrickItem extends RenderItem<Brick, Shape> {
override public function update():Void {
super.update();
var b = value.broken;
if (b != this.broken) {
this.broken = b;
var t = value.config.type;
if (b != broken || t != type) {
broken = b;
type = t;
redraw();
}
}

View File

@@ -15,7 +15,7 @@ interface LevelFrameLayout {
@:template("layout/frames/level.json", "layout/styles.json")
class LevelFrame extends VGroupView implements ViewBuilder implements LevelFrameLayout implements ListViewListener<Int> {
class LevelFrame extends VGroupView implements ViewBuilder implements LevelFrameLayout {
public static inline var ID = "level";
public function init():Void {