Hi,
Is there a way to get a result back from a call to storyboard.showOverlay()? I know you can pass parameters INTO the overlay with this function, but how do I get a result OUT of it once the overlay is closed?
For example:
The game scene could have a button that opens an overlay that asks the user a question and has the user answer either yes or no with two buttons respectively. How would I get the user’s input from this question without using a horrible global variable or some generic storage variable attached to the storyboard object?
Game scene:
-- the following event is dispatched once the overlay is in place function scene:overlayBegan( event ) print( "Showing overlay: " .. event.sceneName ) end -- the following event is dispatched once overlay is removed function scene:overlayEnded( event ) print( "Overlay removed: " .. event.sceneName ) -- Anyway to access data here passed back from the overlay scene????? end
Overlay scene:
local function yesButton\_onReleaseListener(event) -- Any way to pass data back to the calling scene to be used in scene:overlayEnded???????? storyboard.hideOverlay("slideUp", 250) return true -- indicates successful touch end