Search code examples
buttonluastoryboardoverlaycoronasdk

Corona SDK - "ShowOverlay" with LetterBox issue


I have a button, when pressed calls the following function

local function showHudPressed()
    local options =
    {
        effect = "slideLeft",
        time = 400,
        isModal = true,
        params = { global = Global }
    }
    storyboard.showOverlay( "PopOver", options)
end

And the overlay comes on screen with animation etc, no issue! Also the isModal works, i can retap the button and the method is not called ... as I expect.

But the same button, if i move within 30px to the left egde the button is allowed to work. Whats even more weird... if i move it say 35 px, the right hand side acts not, but the left hand side doesn't. Shift back to 40px and no issue!

I have tried 2 buttons on screen, problem only occurs when close to edge of screen.

Is this a bug ---

PS occurs on device and simulator

Thanks for any ideas


Ok, so zoomEven prevents this issue .... but when on iPhone 5 the pos. on screen is messed up. So letterbox keeps pos on screen correct, but then the touches in the letter box zoom area essentially mess up the modal of the popover.... best is no scaling ... but then you cannon use @2x .... so what are you to do ???


Solution

  • In letterbox mode, your things might "bleed" on the letterbox area with modal area blockers blocking only the content area.

    Thus everything in a negative position, or a position bigger than display.contentWidth and display.contentHeight might not be blocked.