HI,
I need a radio menu which should be able to scroll.
I used the program here to create radio menu
But when i tried to use CCScrollLayer i’m getting lot of compiler errors
So i figured i’ll write my own CCScrollLayer.
Problem comes when i add the CCRadioMenu to CCScrollLayer the CCRadioMenu is swallowing all the touch events.
so I changed ccTouchBegin part in CCRadioMenu to this
@
if ( m_eState != kCCMenuStateWaiting ) return false;
CCMenuItem *curSelection = itemForTouch(touch);
if(!curSelection)return false;
curSelection~~>selected;
_curHighlighted = curSelection;
if {
if {
m_pSelectedItem~~>unselected();
}
else if(m_pSelectedItem curSelection){
return false;
}
m_eState = kCCMenuStateTrackingTouch;
return true;
}
return false;
@
I added
@else if(m_pSelectedItem curSelection){
return false;
}@
so that if i touch the already selected Item then it returns false. so that event wont be swallowed.
But still problem is it is swallowing the event for 1st time.
so i have to tap release for the item to get selected and then tap and drag for it to work.
How can i stop this class from swallowing the touch event?