pixels = (_IconWidth * width)
tiles = ceil(pixels / 32)
modifier = ((width>=7)?(3.5):(2.5))
startloc = round((pixels + tiles*32)/modifier)
for(var/i=1, i<=width, ++i)
_DrawNumber(copytext(number,i,i+1), -startloc+((i-1)*_IconWidth), location, color)
I need to know how to center the numbers. startloc is the position I start from. I can't seem to figure it out.
I used a variable called modifier to divide pixels+tiles*32 and it works perfectly. I don't remember my reason for doing this, though.