Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/data0_21/huds/classic.hud
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ include download
include chat
include strafe
include stunned
include drowning

//adds transparent dark background if scoreboard is shown
if %SCOREBOARD == 1
Expand Down
1 change: 1 addition & 0 deletions assets/data0_21/huds/default.hud
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ endif

if %RACE == 0
include default/health_armor
include default/drowning
include default/weaponlist
include default/ammo

Expand Down
24 changes: 24 additions & 0 deletions assets/data0_21/huds/inc/default/drowning.hud
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
setCursor 0, 0

if %drowning < 120
if %drowning > 0
moveCursor 35 * 1.333 * %VIDHEIGHT / %VIDWIDTH, 520
setSize 218 * 1.333 * %VIDHEIGHT / %VIDWIDTH, 22.5
setColor 0 0 0 0.5
drawPicByName gfx/2d/progressbar

moveCursor -29 * 1.333 * %VIDHEIGHT / %VIDWIDTH, 0

moveCursor 29 * 1.333 * %VIDHEIGHT / %VIDWIDTH, 0
setSize 218 * 1.333 * %VIDHEIGHT / %VIDWIDTH, 22.5
setColor 0 0.4 1 1
if %drowning <= 120
drawPicBar %drowning, 120, gfx/2d/progressbar
endif

moveCursor 5 * 1.333 * %VIDHEIGHT / %VIDWIDTH, 0
setSize 24 * 1.333 * %VIDHEIGHT / %VIDWIDTH, 24
drawNum %drowning / 10
moveCursor -34 * 1.333 * %VIDHEIGHT / %VIDWIDTH, 0
endif
endif
26 changes: 26 additions & 0 deletions assets/data0_21/huds/inc/drowning.hud
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// no ammo warning
setAlign 2 2
setFontFamily con_fontSystem
setFontSize %VIDHEIGHT / 50

// no ammo warning
if %drowning < 120
if %drowning > 0
//shadow
setSize 24 * 1.333 * %VIDHEIGHT / %VIDWIDTH, 24
setCursor -7 + #WIDTH / 2, 70 + #HEIGHT / 2
moveCursor 1, 1
setColor 0 0 0 0.8
drawString "Drowning in..."
moveCursor 35, 0
drawStringNum %drowning / 10
movecursor -35,0

setColor 1 1 1 0.8
moveCursor -1, -1
drawString "Drowning in..."
moveCursor 35, 0
drawStringNum %drowning / 10

endif
endif