Hi,
picture here with all: https://drive.google.com/file/d/0B5q1p8d3Dw_tLXlGUGx6VVlfZkU/view?usp=sharing
project here, if need: https://drive.google.com/file/d/0B5q1p8d3Dw_tX2pGNDB4RHNESVU/view?usp=sharing
How remove margins?
Thanks.
Hi,
picture here with all: https://drive.google.com/file/d/0B5q1p8d3Dw_tLXlGUGx6VVlfZkU/view?usp=sharing
project here, if need: https://drive.google.com/file/d/0B5q1p8d3Dw_tX2pGNDB4RHNESVU/view?usp=sharing
How remove margins?
Thanks.
Can you draw these square in one graphics?
I wrote this test code, and got the right result.
var g = this.getComponent(cc.Graphics);
g.fillColor = cc.color(217,0,255,255);
g.rect(0,0, 100, 100);
g.rect(0,0, 100, 200);
g.fill();
No. I need touch on each rect.
square.on(cc.Node.EventType.TOUCH_START, function(event){
// here code
}, this);
square.on(cc.Node.EventType.TOUCH_END, function(event){
// here code
});
A solution for now is listening touch event on canvas, and check touch position in which rect.
I thought about it.
I aslo need to move and destroy any rect.
In the example above you just covered one rect with another.
I tried it:
var g = this.container.addComponent(cc.Graphics);
g.fillColor = cc.color(217,0,255,255);
g.rect(0,0, 100,100);
g.rect(100,0, 100,100);
g.rect(200, 0, 100,100);
g.fill();
and got the same result, with margins.
Maybe is it a bug?
Maybe it is a bug, need take some time to find out what happened.