Ok, I’m looking at the code but I’m not quite understanding the code and what it’s doing. I’m trying to customize a horizontal slider and this is what I see:
local function createHorizontalSlider( slider, options )
– Create a local reference to our options table
local opt = options
– Forward references
local imageSheet, view, viewLeft, viewRight, viewMiddle, viewFill, viewHandle
– Create the view
if opt.sheet then
imageSheet = opt.sheet
else
local themeData = require( opt.themeData )
imageSheet = graphics.newImageSheet( opt.themeSheetFile, themeData:getSheet() )
end
– The view is the slider (group)
view = slider
– The slider’s left frame
viewLeft = display.newImageRect( slider, imageSheet, opt.leftFrame, opt.frameWidth, opt.frameHeight )
– The slider’s middle frame
viewMiddle = display.newImageRect( slider, imageSheet, opt.middleFrame, opt.frameWidth, opt.frameHeight )
– The slider’s right frame
viewRight = display.newImageRect( slider, imageSheet, opt.rightFrame, opt.frameWidth, opt.frameHeight )
– The slider’s fill
viewFill = display.newImageRect( slider, imageSheet, opt.fillFrame, opt.frameWidth, opt.frameHeight )
– The slider’s handle
viewHandle = display.newImageRect( slider, imageSheet, opt.handleFrame, opt.handleWidth, opt.handleHeight )
It’s not stating a specific imageSheet that its using.