浏览代码

Proper size computation for video.

clenhof 3 年之前
父节点
当前提交
b15ffe546e
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      h2d/Video.hx

+ 5 - 0
h2d/Video.hx

@@ -448,4 +448,9 @@ class Video extends Drawable {
 		});
 	}
 	#end
+
+    override function getBoundsRec( relativeTo : Object, out : h2d.col.Bounds, forSize : Bool ) {
+        super.getBoundsRec(relativeTo, out, forSize);
+        if( tile != null ) addBounds(relativeTo, out, tile.dx, tile.dy, tile.width, tile.height);
+    }
 }