Since there was no example that I saw for doing a custom scroll bar, is this code correct?
local scrollViewSheetOptions = { frames = { { x=2, y=2, width=16, height=16, }, { x=2, y=20, width=16, height=16, }, { x=2, y=38, width=16, height=16, }, }, sheetContentWidth = 32, sheetContentHeight = 64 } local scrollViewImageSheet = graphics.newImageSheet( "Images/scrollview.png", scrollViewSheetOptions ) myScrollView = widget.newScrollView { left = 80, top = 202, width = 608, height = 680, id = "myScrollView", backgroundColor = { 0, 0, 0 }, maskFile = "Images/myMask.png", horizontalScrollDisabled = true, hideScrollBar = false, scrollBarOptions = { sheet = scrollViewImageSheet, topFrame = 1, middleFrame = 2, bottomFrame = 3 } }
If I change the background color to something light, like 255, 255, 255, the default scroll bar appears. But the default scroll bar doesn’t work on a black background, so I created a simple PNG with the three pieces.
My custom scroll bar doesn’t appear on light backgrounds either. I’ve never used image sheets before, so not sure if I am missing something here.