Different animations for materialUI RoundedRectButtons

Hey guys, 

So I am using materialUI to create some simple interfaces, I have a back button currently that I want to go back to my menu scene.

Right now I am using this code to create the button to go back to the menu:

mui.newRoundedRectButton ({ name = "back\_nav\_button", text = "nothing", width = mui.getScaleVal(80), height = mui.getScaleVal(80), textColor = { 0,0,0,0 }, radius = 10, callBack = mui.actionSwitchScene, callBackData = { sceneDestination = "title", sceneTransitionColor = { .5,.5,.5 }, sceneTransitionAnimation = true }, image = { src = "images/back-icon-sheet.png", sheetIndex = 1, touchIndex = 2, touchFadeAnimation = true, touchFadeAnimationSpeedOut = 500, sheetOptions = { width = 101, height = 101, numFrames = 2 } } })

I was wondering if there was a was to have a different animation than the current one which is a bubble transition, ideally a way to have the scene transition like it does natively with composer.goToScene().

I tried using callBack = composer.goToScene( “menu” ), but that call is placed as soon as this current scene is created, not after the back button is pressed.

Thanks for your help.

For anyone who is looking at this in the future,

I made a real rookie mistake…

When using mui, and callbacks, just dont include the function brackets, and then within a local function you can goToScene to natively transition between scenes. 

--so like mui.someThing ({ callback = myTransitionFunc }) --not mui.someThings ({ callback = myTransitionFunc() })

which as I look at it now, is very obvious

Your code is identical in lua and is not your issue…

local function blah()

is exactly the same as

local blah = function()

Ya my bad, edited it now, thanks for the save

For anyone who is looking at this in the future,

I made a real rookie mistake…

When using mui, and callbacks, just dont include the function brackets, and then within a local function you can goToScene to natively transition between scenes. 

--so like mui.someThing ({ callback = myTransitionFunc }) --not mui.someThings ({ callback = myTransitionFunc() })

which as I look at it now, is very obvious

Your code is identical in lua and is not your issue…

local function blah()

is exactly the same as

local blah = function()

Ya my bad, edited it now, thanks for the save