Function drawBox() in theme.lua references a global opt. opt should be passed as an argument, just as in the rest of the functions
function theme.drawBox(x,y,w,h, colors, cornerRadius)
colors = colors or theme.getColorForState(opt) -- global opt is nil
-- draw box
end