Documentation / @debuffjp/ui / bar
Function: bar()
bar(
draw,x,y,w,h,value,style?):number
Defined in: panel.ts:145
A segmented meter (health, cooldowns, charge): value from 0 to 1 lights whole cells only, rounded, so it never shows a sliver. Cells are all the same whole-pixel width, so the bar can end up to a few pixels short of w; returns the width it used. bar(draw, 8, 8, 60, 4, hp / maxHp, { segments: 10 })
Parameters
draw
x
number
y
number
w
number
h
number
value
number
style?
BarStyle = {}
Returns
number