Hello
I am creating a left hand slide out menu in an app that I want to stick to the left and slide of the screen.
I used the composer.showOverlay(…
local options = { isModal = true, effect = "slideRight", time = 200, params = { sampleVar = "my sample variable" } } composer.showOverlay( "overlay1", options )
The problem is the overlay centres by default. I got around this by removing the transitions effect and time, then in the scene:show I added this code to have the overlay bounce in and stick to the left.
function scene:show( event ) local phase = event.phase if "did" == phase then text1.text = "Overlay" sceneGroup:translate(-display.contentWidth , 0 ) transition.to( sceneGroup, { time=1000, x=(-(display.contentWidth) / 2) + (display.contentWidth) / 4, transition=easing.outBounce } ) end end
The the problem now is when I fade out the scene it jumps to the centre again???
composer.hideOverlay( "fade", 400 )
Is there a way to set the transition transition target position for composer.showOverlay() and composer.hideOverlay()