Change color of line at runtime like microsoft paint in cocos2d
I have a scene where I have few colored buttons and upon clicking on that colored button's respective colored line should be drawn in cocos2d. Please help me out with this.
I have tried开发者_如何学编程 passing different colors in -(void)draw
function but that doesn't work. What I want is like MS Paint where user can have different color selction whereas I have put few color buttons.
While I can't think of answer for you directly you should take a look on the Cocos 2D forums for your answer. I tried searching for "draw colored line" in the Cocos2D forums...
http://www.cocos2d-iphone.org/forum/search.php?q=draw+colored+line
Looks like it might be relevant to your situation.
精彩评论