This is how I handle my single prompt bar. Granted it's not two lines but I think you'll get the picture.
--health bar
bar_offset = 5
health_left_offset = bar_offset
mana_left_offset = bar_offset*3+151
top_offset = 6
bar_width = 150
bar_height = 20
WindowRectOp("promptw", 2, health_left_offset, top_offset, bar_width+1, bar_height+1, ColourNameToRGB("silver"), ColourNameToRGB("silver"))
if health > 0 then
WindowRectOp("promptw", 2, health_left_offset + 1, top_offset + 1, bar_width*(health/max_health), bar_height, ColourNameToRGB(health_font_colour), ColourNameToRGB("silver"))
end
-- Mana bar
WindowRectOp("promptw", 2, mana_left_offset, top_offset, mana_left_offset+bar_width+1, bar_height+1, ColourNameToRGB("silver"), ColourNameToRGB("silver"))
if mana > 0 then
WindowRectOp("promptw", 2, mana_left_offset + 1, top_offset + 1, mana_left_offset+(bar_width*(mana/max_mana)), bar_height, ColourNameToRGB(mana_font_colour), ColourNameToRGB("silver"))
end
--WindowText("promptw", "pwf", health .. ", ", left_offset, top_offset, 0, 0, ColourNameToRGB(health_font_colour), 0) -- health
--left_offset = left_offset + string.len(health .. ", ")*font_width_offset
--WindowText("promptw", "pwf", mana .. ", ", left_offset, top_offset, 0, 0, ColourNameToRGB(mana_font_colour), 0) -- mana
left_offset = mana_left_offset + bar_width + 1 + bar_offset
WindowText("promptw", "pwf", endurance .. ", ", left_offset, top_offset, 0, 0, ColourNameToRGB(endurance_font_colour), 0) -- endurance
left_offset = left_offset + string.len(endurance .. ", ")*font_width_offset
WindowText("promptw", "pwf", willpower .. " ", left_offset, top_offset, 0, 0, ColourNameToRGB(willpower_font_colour), 0) -- willpower
left_offset = left_offset + string.len(willpower .. " ")*font_width_offset
|