function storyboard.goBack() local prev = storyboard.prevName if prev then storyboard.gotoScene(prev, {effect = 'slideRight', time = 400, params = storyboard.prevParams, back = true}) return true else return false end end storyboard._gotoScene = storyboard.gotoScene function storyboard.gotoScene(name, params) if not params then storyboard.prevName = storyboard.getCurrentSceneName() storyboard.prevParams = storyboard.currentParams storyboard.currentParams = nil storyboard._gotoScene(name) elseif params then storyboard.prevName = storyboard.getCurrentSceneName() storyboard.prevParams = storyboard.currentParams if params.back then storyboard.prevName = nil storyboard.prevParams = nil end storyboard.currentParams = params.params storyboard._gotoScene(name, params) end end function storyboard.getCurrentScene() return storyboard.getScene(storyboard.getCurrentSceneName()) end