diff options
| author | iamcheeseman <[email protected]> | 2026-03-03 21:13:32 -0500 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-03-03 21:13:32 -0500 |
| commit | 86f95e0737ba082625c22d40057e66499cbc8ac1 (patch) | |
| tree | c86336bf0a21b7740d8b5416424b30c4bb3eee9e /src/fw/renderer.odin | |
| parent | 11d72700ad9afd1d23bdae730edf5b160e99fde4 (diff) | |
Health and dying
Diffstat (limited to 'src/fw/renderer.odin')
| -rw-r--r-- | src/fw/renderer.odin | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/fw/renderer.odin b/src/fw/renderer.odin index e4a95eb..329c8d3 100644 --- a/src/fw/renderer.odin +++ b/src/fw/renderer.odin @@ -449,3 +449,18 @@ draw_tex_ex :: proc( _add_index(start, 1) _add_index(start, 3) } + +draw_progress_bar :: proc( + pos: Vec2, + size: Vec2, + front_color: Color, + back_color: Color, + progress: f32, + front_tex := renderer.white_1x1, + back_tex := renderer.white_1x1, +) { + draw_rect(pos, size, color = back_color, tex = back_tex) + front_size := size + front_size.x *= progress + draw_rect(pos, front_size, color = front_color, tex = front_tex) +} |
