which kModalLayerPriority is 128 same as the implementation before 3.0.
But now my problem is, I have to implement a dialog box above the modal layer. In previous version you can setTouchPriority for CCLayer so that it can come on top of the modal layer.
But now for example, I cannot find out how to do this in UIWidget
For example, when I work with UIButton, I can just have this code to work with the TouchListener
<pre>
pButton>addTouchEventListener(this, toucheventselector(AlertDialog::OnButton));
Please let me know if I have missed something.
Thanks
It is not necessary to preserve the old mindset of setting a very low touch priority as modal layer
Actually if you preserve sceneGraphPriority and swallow touches on the point that will not allow the image on the layer above to be transparent
The actual problem is that previously I have implemented the dialog close mechanism as this->removeFromParent(), but now it will be crashed if I call it from the button.
I am now seeking alternative or better sequence to close the dialog without crash. Please help if everyone know how to kill the layer itself.
My bad to learn the new idea. For the new Button touch mechanism will return several times to the buttons in different stage (START, END, MOVE). And for sure this will make this->removeFromParent not working.