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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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,
}
        

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...

just put "return true" at the end of the touch function and you should be fine

You little beauty that seems to of done the trick!

Thank you

views:1398 update:2011/11/2 21:34:51
corona forums © 2003-2011