Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Visual effect on tabbar press button
Started by Lourenco Jun 24 2018 10:00 AM

1 reply to this topic
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Contributor

  • 188 posts
  • Corona SDK

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

But the button does not scale when it is selected.

Any hint on how to achieve this ?



[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Corona Geek

  • 7,666 posts
  • Corona SDK

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: