Skip to content

Commit

Permalink
merge #34 from nonoesimposible/outlined-healthbar
Browse files Browse the repository at this point in the history
reduces pixel alignment issues in the health bar
  • Loading branch information
no-lex authored Jun 27, 2021
2 parents f74d3bd + 10732f0 commit 99ff9a8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions config/ui/hud.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,16 @@ newui "hud" [
uialign- -1 0
//how this works: players have 10 hp so 10 individual uifills are created either
//white (for hitpoints the player still has) or gray (for hitpoints lost)
uihlist 0.004 [
uihlist 0.005 [
loop i 10 [
if (>= (getclienthealth (getclientnum)) (+ $i 1)) [
uicolor 0xFFFFFF 0.03 0.005
if (> (getclienthealth (getclientnum)) $i) [
uicolor 0xFFFFFF 0.029 0.004 [
uioutline 0xFFFFFF ; uiclamp- 1 1 1 1
]
] [
uicolor 0xAA505050 0.03 0.005
uicolor 0xAA505050 0.029 0.004 [
uioutline 0xAA505050 ; uiclamp- 1 1 1 1
]
]
]
]
Expand Down

0 comments on commit 99ff9a8

Please sign in to comment.