瀏覽代碼

Rever Interactive backgroundColor to use Int, due to fromColor compat.

Yanrishatum 6 年之前
父節點
當前提交
148c9750e4
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      h2d/Interactive.hx

+ 2 - 2
h2d/Interactive.hx

@@ -64,12 +64,12 @@ class Interactive extends Drawable implements hxd.SceneEvents.Interactive {
 	}
 
 	override function draw( ctx : RenderContext ) {
-		if( backgroundColor != null ) emitTile(ctx, h2d.Tile.fromColor(backgroundColor, width, height, (backgroundColor>>>24)/255 ));
+		if( backgroundColor != null ) emitTile(ctx, h2d.Tile.fromColor(backgroundColor, Std.int(width), Std.int(height), (backgroundColor>>>24)/255 ));
 	}
 
 	override function getBoundsRec( relativeTo, out, forSize ) {
 		super.getBoundsRec(relativeTo, out, forSize);
-		if( backgroundColor != null || forSize ) addBounds(relativeTo, out, 0, 0, width, height);
+		if( backgroundColor != null || forSize ) addBounds(relativeTo, out, 0, 0, Std.int(width), Std.int(height));
 	}
 
 	override function onParentChanged() {