Anyone know if its possible to use setFillColor, or setDefault and pass a predefined array for RGB values. It doesn’t seem to work for me. I basically want to specify my app colours once and at the beginning of main.lua so theyre easy to change, but getting stuck on this. Seems like it might be a bug?
[code]
– assign RGB values for colour purple
appColor1 = {92,10,168}
appColor1Alpha = {92,10,168,255}
– applying to a rectangle using setFillColor does not work
backGround = display.newRect( 0, 0, 320, 450)
backGround:setFillColor( appColor1)
– applying to a line using setDefault does not work
display.setDefault( “lineColor”, appColor1Alpha )
local tabLine = display.newLine( 0,20, display.contentWidth,20 )
– applying to a TabBar widget DOES work!
local tabBar = widget.newTabBar{
top = vwFullHeightAbsolute- 50,
buttons = tabButtons,
topGradient = graphics.newGradient(appColor1Alpha,{255,255},“down”),
bottomFill = appColor1
}
[/code] [import]uid: 194387 topic_id: 35644 reply_id: 335644[/import]