Small update on this. Add this to gamelib/util.lua
function createTexturedBar(id, min, max, texWidth, texHeight, panel, step, pos)
local clipY
local posY
local height
if step == nil and pos == nil then
clipY = 0
posY = 0
height = texHeight
else
clipY = texHeight / step...