Visual effect on tabbar press button

Hello everybody,

I am trying to create a visual effect when a button is pressed in a widget.newTabBar.

In the button listener I have this piece of code :

local function tabbarListener( event ) -- reset scale of previous selected button ... -- set scale of current selected button event.target.xScale = 1.5 event.target.yScale = 1.5 end

But the button does not scale when it is selected.

Any hint on how to achieve this ?

You can’t really reach into the guts of the widget.* library like that.  The code may change in future releases and (more likely) the library itself is doing all kinds of things with the display objects and overriding your changes.

Fortunately, you can get the source code and add your own effects and updates:

https://github.com/coronalabs/framework-widget

You can’t really reach into the guts of the widget.* library like that.  The code may change in future releases and (more likely) the library itself is doing all kinds of things with the display objects and overriding your changes.

Fortunately, you can get the source code and add your own effects and updates:

https://github.com/coronalabs/framework-widget