Overlapping button objects issue

I’m having big issues with buttons diactiving when they overlap another object. The button is on a menu panel that slides on top over the objects on the game board, now this works fine sliding in and out on press… the problem is if there is an object in the position (so directly underneither) the button and they share the same space. When you slide back the button will become disabled and will not be able to be hit again

menuPos = 0  
  
 ------------------  
 -- FUNCTIONS  
 ------------------  
  
 menuOpen = function( event )  
 if (menuPos == 0) then  
 transition.to(interfaceGroup, { time = 400, x = -500, transition = easingx.easeOut })  
 transition.to(btn\_menutab, { time = 500, rotation = btn\_menutab.rotation + 180, x = menu\_panel.x + 225})  
  
 menuPos = 1  
 else  
 transition.to(interfaceGroup, { time = 1200, x = 0, transition = easingx.easeOut })  
 transition.to(btn\_menutab, { time = 500, rotation = btn\_menutab.rotation + 180, x = menu\_panel.x + 240 })  
 menuPos = 0  
 end  
  
 end  
btn\_menutab = ui.newButton{  
 default = "menu\_tabpull.png",  
 over = "menu\_tabpull2.png",  
 onPress = menuOpen,  
}  
  

The above code is to create the button and the function sliding menu it is on, the menu is in a seperate group to the game board, but its when the button overlaps objects with a physics body in the group underneith i am getting problems…

  
localGroup:insert( background )  
interfaceGroup:insert( btn\_menutab )  
interfaceGroup:insert( menu\_panel )  
  

[import]uid: 21298 topic_id: 17186 reply_id: 317186[/import]

Also i forgot to mention… the objects on the lower level are drag-able…

so its when these objects and the buttons on the menu that overlay this share the same space things go wrong… the button on the menu will just stop in its OVER state and it will then be inactive…

[import]uid: 21298 topic_id: 17186 reply_id: 64819[/import]

just put “return true” at the end of the touch function and you should be fine [import]uid: 16142 topic_id: 17186 reply_id: 64833[/import]

You little beauty that seems to of done the trick!

Thank you [import]uid: 21298 topic_id: 17186 reply_id: 64848[/import]