The buttons on my tabBar are from individual image files and work fine (part 1) but I would prefer to work off an image sheet (part 2)
*****PART 1*****
width = 90,
height = 90,
defaultFile = “images/buttonUp.png”,
overFile = “images/buttonDown.png”,
onPress = function()…etc
*****PART 2*****
local tabSpriteSheet = graphics.newImageSheet( “images/tabIconsSS.png”, { width = 32, height = 32, numFrames = 10, sheetContentWidth = 160, sheetContentHeight = 64} );
and then later within the button table I have…
sheet = tabSpriteSheet,
defaultFrame = 1,
overFrame = 2,
onPress = function()…etc
But it’s not working and possibly to do with where I should put “sheet = tabSpriteSheet” as I’m not sure as the API only mentions default frame and overFrame as requirements.
But when I use the same spritesheet to display images outside tabBar it works fine.
My tabBar height is 100 and width is _W-50 (i.e. 768-50)
J.