Dear all,
I’ve read a previous topic on the forum about this topic, but it seems that I can’t make it work.
All I have is a menubar that overlaps with a grid of items. When I tap an item in the bar, it seems that the tapping actually happens in the underlying items, not what I intended.
To clarify the code, the last button is the one that should work, sliding the bar open and closing it. On the iPad it works, since there is enough space and I have no overlapping objects. On my GalaxyTab 10 it doesn’t: the menu bar does not slide back.
Can anyone help me? I already added a “return true” to the event handler, as suggested in the forum.
Thanks & Cheers!
-- Add event listener for each menu
menuImage:addEventListener("tap",
function(event)
-- The last button is only scroll
if (i == #items) then
if (grp.x == 0) then
transition.to(grp, { time = 200, x = w - grp.width })
else
transition.to(grp, { time = 200, x = 0 })
end
else
-- Remove everything from group before moving to the scene
while (grp.numChildren \>= 1) do
grp:remove(1)
end
director:changeScene(items[i].scene, "crossfade")
return true
end
end
)
[import]uid: 94362 topic_id: 34786 reply_id: 334786[/import]