Hi,
I’ve got exactly the same problem with isModal not working (build 2014.2381). The problem can easily enough be demonstrated with a skeleton project:
main.lua
[lua]local composer = require( “composer” )
display.setDefault( “anchorX”, 0 )
display.setDefault( “anchorY”, 0 )
composer.gotoScene( “parent” )
[/lua]
parent.lua
[lua]local composer = require( “composer” )
local scene = composer.newScene()
local function openOverlay( event )
local options = {
effect = “fade”,
time = 250,
isModal = true
}
print( “Overlay button tapped” )
composer.showOverlay( “overlay”, options )
end
function scene:create( event )
local sceneGroup = self.view
local rect = display.newRect( sceneGroup, 0, 100, 400, 100 );
rect.strokeWidth = 0;
rect:setFillColor( 1, 1, 1 );
rect:addEventListener( “tap”, openOverlay );
local text = display.newText( sceneGroup, ‘Overlay’, 0, 100, 400, 100, native.systemFont, 48, “center”);
text:setFillColor( 0, 0, 0 );
end
scene:addEventListener( “create”, scene )
return scene[/lua]
overlay.lua
[lua]local composer = require( “composer” )
local scene = composer.newScene()
local function tapOverlay ( event )
print ( “Overlay Background Tapped” )
end
function scene:create( event )
local sceneGroup = self.view
local rect = display.newRect( sceneGroup, 0, 0, display.pixelWidth, display.pixelHeight )
rect.strokeWidth = 0;
rect:setFillColor( 0, 0, 0, 0.25 );
rect:addEventListener( “tap”, tapOverlay );
end
scene:addEventListener( “create”, scene )
return scene[/lua]
When you tap the white rectangle with the caption Overlay, the console prints “Overlay button tapped” and it invokes the overlay (which draws a semi transparent rectangle on top of the parent, obscuring it correctly and demonstrating it effectively sits on top)
If you tap the overlay background rectangle, the console first prints “Overlay Background tapped”, followed again by “Overlay button tapped” (and you can see the screen flashing as the overlay scene is loaded again).
isModal is not working.