I'm trying to implement my own scrollbox (yes I know CE has one but it doesn't match my design) and can do so pretty basically with a few panels, two of which used for panning up/down of course, but how can I replicate it more accurately like having a bar in the middle you can mousedown drag and move around to scroll the main box, if it's possible?
Code:
mainBox = UDF1.CEPanel1
scrollUp = UDF1.CEPanel2
scrollDown = UDF1.CEPanel3
scrollUp.OnClick = function()
scrollDown.Enabled = true
mainBox.Top = mainBox.Top + 12
if mainBox.Top > 1 then
scrollUp.Enabled = false
end
end
scrollDown.OnClick = function()
scrollUp.Enabled = true
mainBox.Top = mainBox.Top - 12
if mainBox.Top < -55 then
scrollDown.Enabled = false
end
end