Comment #5 on issue 237 by julien.b...@gmail.com: PSwing added to PCamera
not working since PSwing r863
http://code.google.com/p/piccolo2d/issues/detail?id=237
Hi,
i checked and the part is missing in trunk latest version and in 1.3.1
branch (the java part).
You can find the code i am talking about (r819 line 610-615) in the trunk
revision.
I copy the code here if you can't find it.
this is the part in the if(parent instanceof PCamera).
private void listenForCanvas(final PNode node) {
// need to get the full tree for this node
PNode p = node;
while (p != null) {
listenToNode(p);
final PNode parent = p;
if (parent instanceof PCamera) {
final PCamera cam = (PCamera) parent;
if (cam.getComponent() instanceof PSwingCanvas) {
updateCanvas((PSwingCanvas) cam.getComponent());
}
}
else if (parent instanceof PLayer) {
final PLayer player = (PLayer) parent;
for (int i = 0; i < player.getCameraCount(); i++) {
final PCamera cam = player.getCamera(i);
if (cam.getComponent() instanceof PSwingCanvas) {
updateCanvas((PSwingCanvas) cam.getComponent());
break;
}
}
}
p = p.getParent();
}
}
--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en