Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define COL_GREEN D3DCOLOR_ARGB(255,0,252,124)
- void DrawHealthBar(int x, int y, float health, int w, int h, D3DCOLOR Draw, D3DCOLOR out)
- {
- x -= w / 2;
- y -= h / 2;
- Renderer::GetInstance()->DrawBox(x - 1, y - 1, w + 4, h + 2, COL_BLACK, out);
- Renderer::GetInstance()->DrawBox(x, y, w + 2, h, out, COL_BLACK);
- UINT hw = (UINT)(((w)* health) / 100);
- Renderer::GetInstance()->DrawBox(x + 1, y + 1, hw, h - 2, Draw, Draw);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement