Browse Source

Proper size computation for video.

clenhof 3 years ago
parent
commit
b15ffe546e
1 changed files with 5 additions and 0 deletions
  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);
+    }
 }