egret eui.Group点击事件不触发

用EXML编辑界面,经常会发现有些点击事件不生效,是因为被遮挡了

比如说我要点击这个bus,发现点击事件不生效,被busShelter这个图片遮挡了

设置:

busShelter.touchEnabled = false;

bus.touchEnabled = true;

好了。

那如果遮挡物是个eui.Group呢?那就涉及到了点击穿透

设置:

shelterGroup.touchEnabled = false;

shelterGroup.touchChildren = false;

猜你喜欢

转载自www.cnblogs.com/caoshufang/p/12179178.html