ooh I knew I forgot something important… Here it is:
local SS = require ( "sliderSprites" ) local sliderSheet = graphics.newImageSheet("sliderSprites.png", SS.sheetData) local sliderWidth = display.contentWidth - 0.3 \* display.contentWidth local slider = widget.newSlider { left = display.contentCenterX - 0.5 \* sliderWidth, top = headerBarGroup.height \* 1.5, width = sliderWidth, value = volume \* 100, sheet = sliderSheet, leftFrame = 3, middleFrame = 4, rightFrame = 5, fillFrame = 1, handleFrame = 2, handleFrameWidth = 95, handleFrameHeight = 95, listener = sliderFunction, } group:insert( slider )
--sliderSprites.lua local M = {} M.sheetData = { frames = { { x = 99, y = 0, width = 95, height = 95, sourceX=0, sourceY=0, sourceWidth=95 , sourceHeight=95 }, { x = 0, y = 68, width = 95, height = 95, sourceX=0, sourceY=0, sourceWidth=95 , sourceHeight=95 }, { x = 135, y = 99, width = 32, height = 64, sourceX=3, sourceY=16, sourceWidth=35 , sourceHeight=95 }, { x = 0, y = 0, width = 95, height = 64, sourceX=0, sourceY=16, sourceWidth=95 , sourceHeight=95 }, { x = 99, y = 99, width = 32, height = 64, sourceX=0, sourceY=16, sourceWidth=35 , sourceHeight=95 }, }, sheetContentWidth = 198, sheetContentHeight = 167 } return M