Previously, prior to Dec 2013, we use gradient in corona sdk as below:
|
btnHomeBg2:setFillColor( graphics.newGradient( { color(38, 38, 38) }, { color(28, 28, 28) }, "down" ) ) |
However, latest update have deprecated the
graphics.newGradient. More info can be found here at: http://docs.coronalabs.com/guide/graphics/migration_g20.html#TOC
Your Corona SDK will give you the following warning when you try to run the old code.
So, use this for now:
|
btnHomeBg2:setFillColor( {type="gradient", color1={color( 38, 38, 38 )}, color2={color( 28, 28, 28 )}, direction="down"} ) |