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]