Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

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

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

Lourenco

[GLOBAL: userInfoPane.html]
Lourenco
  • Contributor

  • 174 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
	
end

But the button does not scale when it is selected.

Any hint on how to achieve this ?

 

 



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,587 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:

 

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




[topic_controls]
[/topic_controls]