Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- EmSixTeen's Custom HUD - 14th August 2009
- Completely re-written to be easier to read, understand and edit.
- Newest version always @ http://sites.google.com/site/emsixteen/
- http://qlhud.core.ws/user/EmSixTeen/
- rect horpos vertpos horsize vertsize
- others r g b transparency
- addColorRange lowvalue highvalue r g b transparency
- textstyle 1 = blinking, 2 = without shadow, 3 = with shadow, 6 = double shadow
- Proper guides:
- http://rfactory.org/hud.html
- http://quakelivehud.blogspot.com
- Props to Borgondio, injx, Rroff, RAZ3R, focus team, anyone else I've noseyed at/talked to, and whoever uses this..
- Please credit me in the file if you edit the shit out of this :)
- */
- #include "ui/menudef.h"
- /*
- Contents: #SHORTCUT
- Vitals section #P1
- Health #H1
- Armour #A1
- Ammo #A2
- Speedometer #UPS
- Flag #FLA
- Timer #TIM
- Obituaries #DIE
- Scores section #SCO
- Red Team scores #RED
- Blue Team scores #BLU
- CA players (R) #CAR
- CA players (B) #CAB
- Awards #AWA
- Powerups #POW
- Chat #CHA
- */
- // Using #define is like using a shortcut, and if you edit it here, it'll change wherever you use it
- #define DEFAULTS_ITEM decoration visible 1
- #define DEFAULTS_MENU visible 1
- #define vitalsBIG 1
- #define vitalsSMALL 0.4
- #define COLOUR_RED 1 0 0
- #define COLOUR_BLUE 0 0 1
- #define COLOUR_TEAM 0.4 0.4 0.4
- #define COLOUR_ENEMY 0 1 0
- #define COLOUR_CRITICAL 1 0 0 // Red
- #define COLOUR_LOW 0.8 0.5 0 // Gold
- #define COLOUR_HEALTHY 1 1 1 // White
- #define COLOUR_STACKED 0.37 0.8 1 // Light blue
- #define LEFTALIGN textalign ITEM_ALIGN_LEFT
- #define CENTERALIGN textalign ITEM_ALIGN_CENTER
- #define RIGHTALIGN textalign ITEM_ALIGN_RIGHT
- #define NORMALTEXT textstyle 0
- #define DROPSHADOWTEXT textstyle 3
- #define HEAVYSHADOWTEXT textstyle 6
- // ********** PLAYER VITALS: #P1 //
- menuDef {
- DEFAULTS_MENU
- rect 0 0 640 480
- // ********** HEALTH: #H1 //
- // Health icon
- itemDef {
- DEFAULTS_ITEM
- rect 296 444 22 22
- backcolor 0 0 0 0.8
- style 1
- background "ui/assets/hud/health.tga"
- }
- itemDef {
- DEFAULTS_ITEM
- rect 295 443 22 22
- ownerdraw CG_TEAM_COLORIZED
- style 1
- background "ui/assets/hud/health.tga"
- }
- // Health value
- // Should be right aligned, but game code needs fixed
- itemDef {
- DEFAULTS_ITEM
- rect 210 450 63 22
- ownerdraw CG_PLAYER_HEALTH
- HEAVYSHADOWTEXT
- RIGHTALIGN
- textscale vitalsBIG
- forecolor COLOUR_STACKED 1 // COLOUR_STACKED when >150
- addColorRange -999 30 COLOUR_CRITICAL 1 // COLOUR_CRITICAL from -999 to 30 (30 = max quad PJ dmg)
- addColorRange 31 80 COLOUR_LOW 1 // COLOUR_LOW from 31 to 80 (80 = rg dmg)
- addColorRange 81 150 COLOUR_HEALTHY 1 // COLOUR_HEALTHY from 81 to 150
- }
- // ********** ARMOUR: #A1 //
- // Armour icon
- itemDef {
- DEFAULTS_ITEM
- rect 324 444 24 22
- backcolor 0 0 0 0.8
- style 1
- background "ui/assets/hud/armor.tga"
- }
- itemDef {
- DEFAULTS_ITEM
- rect 323 443 24 22
- ownerdraw CG_TEAM_COLORIZED
- style 1
- background "ui/assets/hud/armor.tga"
- }
- // Armour value
- // Should be left aligned, but game code needs fixed
- itemDef {
- DEFAULTS_ITEM
- rect 370 450 63 22
- ownerdraw CG_PLAYER_ARMOR_VALUE
- HEAVYSHADOWTEXT
- LEFTALIGN
- textscale 1
- forecolor COLOUR_STACKED 1 // COLOUR_STACKED when >150
- addColorRange -999 0 1 1 1 0 // Hidden when 0 or less
- addColorRange 1 30 COLOUR_CRITICAL 1 // COLOUR_CRITICAL from 1 to 30
- addColorRange 31 80 COLOUR_LOW 1 // COLOUR_LOW from 31 to 80
- addColorRange 81 150 COLOUR_HEALTHY 1 // COLOUR_HEALTHY from 81 to 150
- }
- // ********** AMMO: #A2 //
- itemDef {
- name "Ammo icon"
- DEFAULTS_ITEM
- rect 314 380 12 12
- ownerdraw CG_PLAYER_AMMO_ICON2D // CG_PLAYER_AMMO_ICON for 3D icon
- }
- itemDef {
- name "Ammo value"
- DEFAULTS_ITEM
- rect 290 400 62 12
- DROPSHADOWTEXT
- CENTERALIGN
- textscale vitalsSMALL
- forecolor COLOUR_HEALTHY 1
- ownerdraw CG_PLAYER_AMMO_VALUE
- addColorRange -999 5 COLOUR_CRITICAL 1 // COLOUR_CRITICAL when 5 ammo or lower
- }
- // ********** UPS METER: #UPS //
- itemDef {
- name "UPS meter"
- DEFAULTS_ITEM
- DROPSHADOWTEXT
- textalign ITEM_ALIGN_RIGHT
- rect 605 473 20 10
- forecolor 1 1 1 0.4
- textscale 0.25
- ownerdraw CG_SPEEDOMETER
- }
- }
- // ********** FLAG: #FLA //
- menuDef {
- DEFAULTS_MENU
- rect 0 0 640 480
- itemDef {
- name "Pulsating flag carrier icon"
- DEFAULTS_ITEM
- rect 295 348 50 71
- style 3
- background "ui/assets/hud/flag"
- ownerdrawflag CG_SHOW_IF_PLAYER_HAS_FLAG
- }
- itemDef {
- name "Flag carrier flag model"
- DEFAULTS_ITEM
- rect 309 354 22 22
- style 1
- ownerdraw CG_PLAYER_HASFLAG2D
- }
- }
- // ********** TIMER: #TIM //
- menuDef {
- DEFAULTS_MENU
- itemDef {
- name "Team game clock"
- DEFAULTS_ITEM
- RIGHTALIGN
- style 0
- rect 560 135 80 50
- DROPSHADOWTEXT
- forecolor 1 1 1 1
- textscale .65
- ownerdraw CG_LEVELTIMER
- ownerdrawflag CG_SHOW_ANYTEAMGAME
- }
- itemDef {
- name "Solo game clock"
- DEFAULTS_ITEM
- RIGHTALIGN
- style 0
- rect 295 25 50 15
- DROPSHADOWTEXT
- forecolor 1 1 1 1
- textscale .65
- ownerdraw CG_LEVELTIMER
- ownerdrawflag CG_SHOW_ANYNONTEAMGAME
- }
- }
- // ********** OBITUARIES: #DIE //
- menuDef {
- DEFAULTS_MENU
- rect 6 15 160 32
- itemDef {
- DEFAULTS_ITEM
- ownerdraw CG_PLAYER_OBIT
- ownerdrawflag CG_SHOW_ANYNONTEAMGAME
- rect 35 0 160 32
- textscale .3
- DROPSHADOWTEXT
- }
- itemDef {
- DEFAULTS_ITEM
- ownerdraw CG_PLAYER_OBIT
- ownerdrawflag CG_SHOW_CLAN_ARENA
- rect 45 0 160 32
- textscale .3
- DROPSHADOWTEXT
- }
- itemDef {
- DEFAULTS_ITEM
- ownerdraw CG_PLAYER_OBIT
- ownerdrawFlag CG_SHOW_CTF
- rect 71 0 160 32
- textscale 0.3
- DROPSHADOWTEXT
- }
- itemDef {
- DEFAULTS_ITEM
- ownerdraw CG_PLAYER_OBIT
- cvarTest "g_gametype"
- showCvar { "3" }
- rect 45 0 160 32
- textscale 0.3
- DROPSHADOWTEXT
- }
- }
- // ********** SCORES: #SCO //
- // Duel and FFA scores: #DUE
- menuDef {
- DEFAULTS_MENU
- rect 0 0 60 60
- ownerdrawflag CG_SHOW_ANYNONTEAMGAME
- itemDef {
- name "Your score"
- DEFAULTS_ITEM
- ownerdraw CG_PLAYER_SCORE
- ownerdrawFlag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
- rect 4 -4 32 20
- textscale .3
- DROPSHADOWTEXT
- }
- itemDef {
- name "2nd place score"
- DEFAULTS_ITEM
- ownerdraw CG_BLUE_SCORE
- ownerdrawFlag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
- rect -6 16 32 20
- textscale .3
- DROPSHADOWTEXT
- }
- itemDef {
- name "Your score box colour"
- DEFAULTS_ITEM
- rect 0 0 32 20
- backcolor COLOUR_TEAM 0.2
- style WINDOW_STYLE_FILLED
- ownerdrawFlag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
- }
- itemDef {
- name "2nd place score box colour"
- DEFAULTS_ITEM
- rect 0 20 32 20
- backcolor COLOUR_ENEMY 0.2
- style WINDOW_STYLE_FILLED
- ownerdrawFlag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
- }
- itemDef {
- name "1st place score"
- DEFAULTS_ITEM
- ownerdraw CG_RED_SCORE //higher
- ownerdrawFlag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
- rect -6 -4 32 20
- textscale .3
- DROPSHADOWTEXT
- }
- itemDef {
- name "Your score"
- DEFAULTS_ITEM
- ownerdraw CG_PLAYER_SCORE
- ownerdrawFlag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
- rect 4 16 32 20
- textscale .3
- DROPSHADOWTEXT
- }
- itemDef {
- name "1st place score box colour"
- DEFAULTS_ITEM
- rect 0 0 32 20
- backcolor COLOUR_ENEMY 0.2
- style WINDOW_STYLE_FILLED
- ownerdrawFlag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
- }
- itemDef {
- name "Your score box colour"
- DEFAULTS_ITEM
- rect 0 20 32 20
- backcolor COLOUR_TEAM 0.2
- style WINDOW_STYLE_FILLED
- ownerdrawFlag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
- }
- }
- // Team scores (Red Team): #RED
- menuDef {
- DEFAULTS_MENU
- rect 0 0 60 60
- ownerdrawFlag CG_SHOW_IF_PLYR_IS_ON_RED
- itemDef {
- DEFAULTS_ITEM
- rect 0 0 44 20
- ownerdrawFlag CG_SHOW_ANYTEAMGAME
- backcolor COLOUR_RED 0.2
- style WINDOW_STYLE_FILLED
- }
- itemDef {
- DEFAULTS_ITEM
- rect 0 20 44 20
- ownerdrawFlag CG_SHOW_ANYTEAMGAME
- backcolor COLOUR_ENEMY 0.2
- style WINDOW_STYLE_FILLED
- }
- itemDef {
- DEFAULTS_ITEM
- rect 45 0 24 20
- ownerdrawFlag CG_SHOW_CTF
- ownerdraw CG_RED_FLAGSTATUS
- }
- itemDef {
- DEFAULTS_ITEM
- rect 45 20 24 20
- ownerdrawFlag CG_SHOW_CTF
- ownerdraw CG_BLUE_FLAGSTATUS
- }
- itemDef {
- DEFAULTS_ITEM
- ownerdraw CG_RED_SCORE
- ownerdrawFlag CG_SHOW_ANYTEAMGAME
- rect 10 -4 32 20
- textscale 0.3
- RIGHTALIGN
- DROPSHADOWTEXT
- }
- itemDef {
- DEFAULTS_ITEM
- ownerdraw CG_BLUE_SCORE
- ownerdrawFlag CG_SHOW_ANYTEAMGAME
- rect 10 16 32 20
- textscale 0.3
- RIGHTALIGN
- DROPSHADOWTEXT
- }
- }
- // Team scores (Blue Team): #BLUE
- menuDef {
- DEFAULTS_MENU
- rect 0 0 60 60
- ownerdrawFlag CG_SHOW_IF_PLYR_IS_ON_BLUE
- itemDef {
- DEFAULTS_ITEM
- rect 0 0 44 20
- ownerdrawFlag CG_SHOW_ANYTEAMGAME
- backcolor COLOUR_BLUE 0.2
- style WINDOW_STYLE_FILLED
- }
- itemDef {
- DEFAULTS_ITEM
- rect 0 20 44 20
- ownerdrawFlag CG_SHOW_ANYTEAMGAME
- backcolor COLOUR_ENEMY 0.2
- style WINDOW_STYLE_FILLED
- }
- itemDef {
- DEFAULTS_ITEM
- rect 45 0 24 20
- ownerdrawFlag CG_SHOW_CTF
- ownerdraw CG_BLUE_FLAGSTATUS
- }
- itemDef {
- DEFAULTS_ITEM
- rect 45 20 24 20
- ownerdrawFlag CG_SHOW_CTF
- ownerdraw CG_RED_FLAGSTATUS
- }
- itemDef {
- DEFAULTS_ITEM
- ownerdraw CG_BLUE_SCORE
- ownerdrawFlag CG_SHOW_ANYTEAMGAME
- rect 10 -4 32 20
- textscale 0.3
- RIGHTALIGN
- DROPSHADOWTEXT
- }
- itemDef {
- DEFAULTS_ITEM
- ownerdraw CG_RED_SCORE
- ownerdrawFlag CG_SHOW_ANYTEAMGAME
- rect 10 16 32 20
- textscale 0.3
- RIGHTALIGN
- DROPSHADOWTEXT
- }
- }
- // CA Players left (Red Team): #CAR
- menuDef {
- DEFAULTS_MENU
- rect 0 40 60 60
- ownerdrawFlag CG_SHOW_IF_PLYR_IS_ON_RED
- itemDef {
- DEFAULTS_ITEM
- rect 8 0 36 16
- backcolor COLOUR_RED 0.15
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- style WINDOW_STYLE_FILLED
- }
- itemDef {
- DEFAULTS_ITEM
- rect 8 16 36 16
- backcolor COLOUR_ENEMY 0.15
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- style WINDOW_STYLE_FILLED
- }
- itemDef {
- DEFAULTS_ITEM
- rect 0 0 16 16
- style WINDOW_STYLE_SHADER
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- background "models/players/xaero/icon_red.png"
- }
- itemDef {
- DEFAULTS_ITEM
- rect 0 16 16 16
- style WINDOW_STYLE_SHADER
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- background "models/players/keel/icon_sport.png"
- }
- itemDef {
- DEFAULTS_ITEM
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- ownerdraw CG_RED_CLAN_PLYRS
- rect 31 13 32 16
- RIGHTALIGN
- textscale .24
- DROPSHADOWTEXT
- }
- itemDef {
- DEFAULTS_ITEM
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- ownerdraw CG_BLUE_CLAN_PLYRS
- rect 31 29 136 40
- RIGHTALIGN
- textscale .24
- DROPSHADOWTEXT
- }
- }
- // CA Players left (Blue Team): #CAB
- menuDef {
- DEFAULTS_MENU
- rect 0 40 60 60
- ownerdrawFlag CG_SHOW_IF_PLYR_IS_ON_BLUE
- itemDef {
- DEFAULTS_ITEM
- rect 8 0 36 16
- backcolor COLOUR_BLUE 0.15
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- style WINDOW_STYLE_FILLED
- }
- itemDef {
- DEFAULTS_ITEM
- rect 8 16 36 16
- backcolor COLOUR_ENEMY 0.15
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- style WINDOW_STYLE_FILLED
- }
- itemDef {
- DEFAULTS_ITEM
- rect 0 0 16 16
- style WINDOW_STYLE_SHADER
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- background "models/players/xaero/icon_blue.png"
- }
- itemDef {
- DEFAULTS_ITEM
- rect 0 16 16 16
- style WINDOW_STYLE_SHADER
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- background "models/players/keel/icon_sport.png"
- }
- itemDef {
- DEFAULTS_ITEM
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- ownerdraw CG_BLUE_CLAN_PLYRS
- rect 22 13 32 16
- RIGHTALIGN
- textscale .26
- DROPSHADOWTEXT
- }
- itemDef {
- DEFAULTS_ITEM
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- ownerdraw CG_RED_CLAN_PLYRS
- rect 22 29 136 40
- RIGHTALIGN
- textscale .26
- DROPSHADOWTEXT
- }
- }
- // ********** AWARDS: #AWA //
- menuDef {
- DEFAULTS_MENU
- rect 3 440 200 30
- itemDef {
- DEFAULTS_ITEM
- ownerdraw CG_ACCURACY
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- rect 5 0 20 20
- background "ui/assets/medal_accuracy.tga"
- forecolor 1 1 1 1
- visible MENU_TRUE
- textscale 0
- }
- itemDef {
- DEFAULTS_ITEM
- name "medal_accuracy"
- ownerdraw CG_ACCURACY
- ownerdrawFlag CG_SHOW_CLAN_ARENA
- rect 0 40 0 0
- forecolor 1 1 1 1
- visible MENU_TRUE
- textscale 0.22
- }
- itemDef {
- DEFAULTS_ITEM
- name "medal_accuracy"
- ownerdraw CG_ACCURACY
- cvarTest "g_gametype"
- showCvar { "0" }
- rect 5 0 20 20
- background "ui/assets/medal_accuracy.tga"
- forecolor 1 1 1 1
- visible MENU_TRUE
- textscale 0
- }
- itemDef {
- DEFAULTS_ITEM
- name "medal_accuracy"
- ownerdraw CG_ACCURACY
- cvarTest "g_gametype"
- showCvar { "0" }
- rect 0 40 0 0
- forecolor 1 1 1 1
- visible MENU_TRUE
- textscale 0.22
- }
- itemDef {
- DEFAULTS_ITEM
- name "medal_captures"
- ownerdraw CG_CAPTURES
- ownerdrawflag CG_SHOW_CTF
- rect 5 0 20 20
- background "ui/assets/medal_capture.tga"
- forecolor 1 1 1 1
- textscale 0
- }
- itemDef {
- DEFAULTS_ITEM
- name "medal_captures"
- ownerdraw CG_CAPTURES
- ownerdrawflag CG_SHOW_CTF
- rect 7 40 0 0
- forecolor 1 1 1 1
- visible MENU_TRUE
- textscale 0.22
- }
- itemDef {
- DEFAULTS_ITEM
- name "medal_assists"
- ownerdraw CG_ASSISTS
- ownerdrawflag CG_SHOW_CTF
- rect 30 0 20 20
- background "ui/assets/medal_assist.tga"
- forecolor 1 1 1 1
- textscale 0
- }
- itemDef {
- DEFAULTS_ITEM
- name "medal_assists"
- ownerdraw CG_ASSISTS
- ownerdrawflag CG_SHOW_CTF
- rect 35 40 0 0
- forecolor 1 1 1 1
- textscale 0.22
- }
- itemDef {
- DEFAULTS_ITEM
- name "medal_captures"
- ownerdraw CG_DEFEND
- ownerdrawflag CG_SHOW_CTF
- rect 58 40 0 0
- forecolor 1 1 1 1
- visible MENU_TRUE
- textscale 0.22
- }
- itemDef {
- DEFAULTS_ITEM
- name "medal_captures"
- ownerdraw CG_DEFEND
- ownerdrawflag CG_SHOW_CTF
- rect 55 0 20 20
- background "ui/assets/medal_defend.tga"
- forecolor 1 1 1 1
- textscale 0
- }
- }
- // ********** POWERUPS: #POW //
- // PowerUps (default)
- menuDef {
- DEFAULTS_MENU
- rect 556 178 74 156
- itemDef {
- DEFAULTS_ITEM
- rect 0 0 39 26
- textscale 0.73
- textstyle ITEM_TEXTSTYLE_SHADOWEDMORE
- //textalign ITEM_ALIGN_RIGHT
- ownerdraw CG_AREA_POWERUP
- special 0 // spacing
- align HUD_VERTICAL
- }
- }
- // Pickups and holdables
- menuDef {
- DEFAULTS_MENU
- rect 0 40 80 25
- itemDef {
- DEFAULTS_ITEM
- rect 23 0 22 22
- ownerdraw CG_PLAYER_ITEM
- }
- itemDef {
- DEFAULTS_ITEM
- rect 0 0 22 22
- ownerdraw CG_CTF_POWERUP
- }
- }
- // ********** CHAT: #CHA //
- menuDef {
- DEFAULTS_MENU
- rect 0 0 32 256
- itemdef {
- DEFAULTS_ITEM
- ownerdraw CG_AREA_NEW_CHAT
- rect 5 287 634 120
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement