In my game I have a black background rectangle that covers the entire screen, then various active elements in front of it. I have a certain menu that pops up that should go away if the user taps anywhere outside it. My touch event handler for the menu always returns true. Nevertheless, the event is getting away and is being seen by the background rectangle as well. Or if I use Runtime instead of the background rectangle is my handler of last resort, I still see the event, even though the menu handler has handled it. I can set a breakpoint on the “return true” statement and see that it is executed.
Having inherited some legacy code, I’m using a legacy version rather than change all the color numbers to meet the new graphics standard. I’m using version 2012.971 (2012.11.15) running on Mac OS 10.7.5.
Were there known bugs back then that could cause this kind of problem? Any good workarounds? (I can think of some ugly ones, but I’d rather find a nice one)
Thanks,
Ken
handler code follows:
function miniSelectorTouch(event, menu, isFirst) local d = math.floor((event.y - yLevels) / menuScale) + 1 if isFirst then firstMenuPick = d end if event.phase == "moved" then elseif event.phase == "ended" then local oldTop = menu.sq.top if inMenu(event) and d \<= depth then menu.sq.top = d redrawSquare(menu.sq) miniDepthChange(menu.sq, oldTop) end end return true end