Open GoogleCodeExporter opened 9 years ago
It is not the leaves' transform() that is not being called, but certain custom
cocosnode objects like MenuItem.
Perhaps I am not initializing something ?
Original comment by ricardoq...@gmail.com
on 21 Apr 2008 at 8:44
the logic right now (stolen from sprites) is that node.transform is only called
before you draw your children. if you dont have any children, you dont need to
call it.
that is, if you have a scaled attribute, you should know how to draw yourself
scaled.
so there is no need to call "transform". this is so because in this way we can
do
pyglet sprites optimizations, if not, everything should be 0-based (anchor),
and in
fixed size. and it requires more gl calls.
let me know if its ok and we can close this, or well have to think a better way.
Original comment by lucio.to...@gmail.com
on 21 Apr 2008 at 9:00
So, how should I fix the MenuItem bug ?
Shall I call manually "transform" in MenuItem.on_draw() ?
Original comment by ricardoq...@gmail.com
on 21 Apr 2008 at 9:21
what i did in color layer is having a layer and inside a cocosnode that draws a
ccolored quad. in this way i inherit the transform.
this is cumbersome when you want to do your own drawing, but it gives you more
options. comments on this are more than welcome.
Original comment by lucio.to...@gmail.com
on 21 Apr 2008 at 9:25
I don't know if this is the "correct" behavior or not, but it was confusing for
me.
MenuItem will call transform() manually. It is not clear when a CocosNode
subclass
shall call transform() manually and when not. lets discuss this on wednesday.
Original comment by ricardoq...@gmail.com
on 21 Apr 2008 at 9:32
Original comment by lucio.to...@gmail.com
on 26 Apr 2008 at 3:03
Original issue reported on code.google.com by
ricardoq...@gmail.com
on 21 Apr 2008 at 8:43