Index: sky/examples/game/lib/sprite_widget.dart |
diff --git a/sky/examples/game/lib/sprite_widget.dart b/sky/examples/game/lib/sprite_widget.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b2737bc9d5ed2ef1be35f89c7d77deb6a47ab794 |
--- /dev/null |
+++ b/sky/examples/game/lib/sprite_widget.dart |
@@ -0,0 +1,15 @@ |
+part of sprites; |
+ |
+class SpriteWidget extends OneChildRenderObjectWrapper { |
+ |
+ NodeWithSize _rootNode; |
+ SpriteBoxTransformMode _transformMode; |
+ |
+ SpriteWidget(NodeWithSize this._rootNode, [SpriteBoxTransformMode this._transformMode = SpriteBoxTransformMode.letterbox]); |
abarth-chromium
2015/06/19 00:18:06
You can remove the "NodeWithSize" annotation. The
|
+ |
+ SpriteBox get root { return super.root; } |
abarth-chromium
2015/06/19 00:18:06
SpriteBox get root => super.root;
|
+ |
+ SpriteBox createNode() => new SpriteBox(_rootNode, _transformMode); |
+ |
+ NodeWithSize get rootNode => _rootNode; |
abarth-chromium
2015/06/19 00:18:06
You need to implement syncRenderObject. Take a lo
|
+} |