Przeglądaj źródła

Proper size computation for video.

clenhof 3 lat temu
rodzic
commit
b15ffe546e
1 zmienionych plików z 5 dodań i 0 usunięć
  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);
+    }
 }