Guest User

hud

a guest
Jan 10th, 2013
263
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Gametypes: g_gametype: 0 = FFA, 1 = Duel, 2 = Single Player (not usable), 3 = TDM, 4 = CA, 5 = CTF, 6 = One-Flag CTF = 7
  2. // Overload (not complete), 8 = Harvester, 9 = Freeze Tag, 10 = Domination, 11 = Attack & Defend, 12 = Red Rover
  3. // elementcolor: text=backcolor paint=forecolor
  4. // cvartest: always as last line
  5.  
  6.  
  7. #include "ui/menudef.h"
  8.  
  9.  
  10.  
  11.  
  12. /// HUD INFO
  13. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  14. rect 10 390 0 0
  15. //
  16. itemDef { text "^1diverse:^7 O-Accuracy P-Lagometer Pic up/dn - Brightness M -Mute . - Autoexec.cfg Pause - Pause End - Quit"
  17. rect 0 -30 0 0 visible 1 decoration style 1 cvarTest HUDmultiinfo showCvar { 1 } forecolor 1 1 1 .32 textscale .15 textstyle 2 }
  18.  
  19. itemDef { text "^1F-Keys:^7 F5-Speedometer F6 - Loadhud F7 - Skillrating F8 - ChatBox F9 - Map Brightness F10 - Drop behavior F11 - TeamOverlay "
  20. rect 0 -15 0 0 visible 1 decoration style 1 cvarTest HUDmultiinfo showCvar { 1 } forecolor 1 1 1 .32 textscale .15 textstyle 2 }
  21.  
  22. itemDef { text "^1KEYPAD:^7 0 - HUD switch (5-8) - Callvote Teamsize (+/-) - Volume / - Callvote Shuffle"
  23. visible 1 decoration style 1 cvarTest HUDmultiinfo showCvar { 1 } forecolor 1 1 1 .32 textscale .15 textstyle 2
  24. rect 0 0 0 0 }
  25. //
  26. itemDef { text "<keypad Enter> "
  27. rect 0 15 0 0 visible 1 decoration style 1 cvarTest HUDmultiinfo showCvar { 1 } forecolor 1 1 1 .32 textscale .15 textstyle 2 }
  28. }
  29.  
  30.  
  31.  
  32.  
  33. /// HEALTH + ARMOR
  34. menuDef { fullScreen MENU_FALSE visible MENU_TRUE rect 0 3 0 0
  35.  
  36. /// HEALTH VALUE
  37. itemDef { ownerdraw CG_PLAYER_HEALTH decoration visible 1 textstyle 6 textscale 0.9
  38. cvartest "ybl_health" showcvar { 1 }
  39. addColorRange -999 0 0 0 0 0
  40. addColorRange 1 25 1 0.05 0 1
  41. addColorRange 26 80 1 .66 0 1
  42. addColorRange 81 100 1 .66 0 1
  43. addColorRange 101 150 0.2 0.5 1 1 // 1 .8 0.6 1
  44. addColorRange 151 999 0.1 0.3 1 1
  45. rect 280 471 0 0 }
  46.  
  47. /// HEALTH VALUE -= CA =-
  48. itemDef { ownerdraw CG_PLAYER_HEALTH decoration visible 1 textstyle 6 textscale 0.9
  49. cvartest "ybl_health" showcvar { 2 }
  50. addColorRange -999 0 0 0 0 0
  51. addColorRange 1 40 1 0.02 0 1
  52. addColorRange 41 80 0.9 0.02 0 1
  53. addColorRange 81 180 1 0.8 0 1
  54. addColorRange 181 999 0 0.248 1 1
  55. rect 320 471 0 0 // 311 471 0 0
  56. }
  57.  
  58. /// ARMOR VALUE
  59. itemDef { ownerdraw CG_PLAYER_ARMOR_VALUE decoration visible 1 textstyle 6 textalign 0 textscale 0.9
  60. cvartest "ybl_health" showcvar { 888 }
  61. addColorRange -999 0 0 0 0 0
  62. addColorRange 1 100 1 0.8 0 1
  63. addColorRange 101 150 0.2 0.5 1 1
  64. addColorRange 151 999 0.1 0.3 1 1
  65. rect 415 471 0 0 }
  66. }
  67.  
  68.  
  69.  
  70. // SKILLRATING
  71. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  72. itemDef { visible 1 textstyle 2
  73.  
  74. textscale 0.3 forecolor 0 0 0 .5
  75. ownerdrawflag CG_SHOW_IF_WARMUP
  76. cvar "sv_skillrating" rect 600 472 0 0
  77. cvarTest "sv_skillrating"
  78. cvartest "ybl_skillrating" showcvar { 1 }
  79. }
  80. }
  81.  
  82.  
  83.  
  84. // HARVESTER SKULL COUNTER
  85. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  86. itemDef { visible 1 ownerdraw CG_HARVESTER_SKULLS decoration
  87. rect -70 70 100 40
  88. textscale 0.5 }
  89. }
  90.  
  91.  
  92.  
  93.  
  94. /// TEAMCOLOR
  95. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  96. rect 0 -10 0 0
  97. itemDef {
  98. background "ui/assets/hud/teamonm.tga" backcolor 1 0 0 1
  99. rect 0 0 640 30 visible 1 style WINDOW_STYLE_FILLED ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_RED
  100. cvartest "ybl_teamcolor" showcvar { 1 }
  101. }
  102. itemDef {
  103. background "ui/assets/hud/teamonm.tga" backcolor 0 0.1 1 1
  104. rect 0 0 640 30 visible 1 style WINDOW_STYLE_FILLED ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_BLUE
  105. cvartest "ybl_teamcolor" showcvar { 1 }
  106. }
  107. }
  108.  
  109.  
  110. /// CHAT AREA
  111.  
  112.  
  113.  
  114. menuDef { fullScreen MENU_FALSE visible MENU_TRUE rect 10 400 50 100 // rect here!
  115.  
  116. itemDef { name "chat-boxBackground"
  117. rect -10 -400 640 480 visible 1 style 1
  118. ownerdrawflag CG_SHOW_IF_CHAT_VISIBLE
  119. backcolor 0 0 0 0.75 }
  120.  
  121. itemdef { ownerdraw CG_AREA_NEW_CHAT textscale 1 visible 1 decoration
  122. cvartest "ybl_chat" showcvar { 1 }
  123. }
  124.  
  125. }
  126.  
  127.  
  128.  
  129. /// AMMO + WEAPON // not using this
  130. menuDef {fullScreen MENU_FALSE visible MENU_TRUE // (ammo+health+armor)
  131. rect 0 0 0 0
  132.  
  133. /// WEAPON ICON // not using this
  134. itemDef { ownerdraw CG_PLAYER_AMMO_ICON2D decoration visible 1
  135. rect 126 440 34 34 cvartest "g_gametype" showcvar { 999 }
  136. }
  137.  
  138. /// AMMO VALUE // not using this
  139. itemDef { ownerdraw CG_PLAYER_AMMO_VALUE decoration visible 1 textstyle 6 forecolor 1 1 1 1
  140. textalign 3 textscale .7 cvartest "g_gametype" showcvar { 999 }
  141. addColorRange -999 0 0 0 0 1
  142. addColorRange 1 2 .5 .5 .5 1
  143. addColorRange 3 999 1 1 1 0
  144. rect 45 442 0 0 }
  145. }
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153. /// TIMER CLOCK
  154. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  155. itemDef {
  156. rect 280 20 0 0
  157. visible 1 textstyle 2 decoration forecolor 1 1 1 1
  158. textscale 0.5 ownerdraw CG_LEVELTIMER textalign 0
  159. cvartest "ybl_time" showcvar { 1 }
  160. }
  161. /// ROUND TIMER 30sec
  162. itemDef { rect 290 75 0 0 visible 1 textscale .25 decoration textalign 0
  163. ownerdraw CG_ROUNDTIMER textstyle 3 style 1 }
  164. }
  165.  
  166.  
  167.  
  168.  
  169.  
  170. /// POWERUP QUAD + BATTLESUIT
  171. menuDef { fullScreen MENU_FALSE visible MENU_TRUE rect 550 250 0 0 // 15 425 0 0 //
  172. itemDef { visible 1 ownerdraw CG_AREA_POWERUP decoration
  173. rect -10 0 50 40
  174. textscale .8 }
  175. }
  176.  
  177.  
  178.  
  179.  
  180.  
  181. /// PICKUPS TELEPORT + KAMI
  182. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  183. rect 600 330 385 32
  184. itemDef { name "playeritem" visible 1 decoration ownerdraw CG_PLAYER_ITEM rect 0 0 27 27 }
  185. itemDef { name "CTFPOWERUP" visible 1 decoration ownerdraw CG_CTF_POWERUP rect 0 40 27 27 }
  186. }
  187.  
  188.  
  189.  
  190.  
  191.  
  192. /// OBITS
  193. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  194. itemdef { rect 60 25 0 0 textscale .35 ownerdraw CG_PLAYER_OBIT visible 1 style 1 decoration
  195. cvartest "ybl_obit" showcvar { x2 } } // === CA ===
  196.  
  197. itemdef { rect 50 70 0 0 textscale .3 ownerdraw CG_PLAYER_OBIT visible 1 style 1 decoration
  198. cvartest "ybl_obit" showcvar { x1 } }
  199.  
  200.  
  201. itemdef { rect 300 150 21 400 textscale .4 ownerdraw CG_PLAYER_OBIT visible 1 style 1 decoration
  202. textalign ITEM_ALIGN_CENTER cvartest "ybl_obit" showcvar { 1 }
  203. }
  204. }
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211. /// SPEEDOMETER
  212. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  213. itemDef { style 0 visible 1 textstyle 3 decoration forecolor 1 1 1 .4 ownerdraw CG_SPEEDOMETER
  214. textscale 0.5 rect 300 300 0 0 cvartest "ybl_speed" showcvar { 1 } }
  215. }
  216.  
  217.  
  218.  
  219. /// >> PLAYER COUNTER <<
  220.  
  221.  
  222. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  223. rect 10 470 0 0 // 20 110 0 0
  224. // DOT
  225.  
  226. //itemDef { text "/" cvartest "ybl_playercounter" showcvar { 1 }
  227. //rect 13 0 0 0 visible 1 decoration style 1
  228. //backcolor 0 0 0 1 forecolor 0 0 0 0.5 textscale .3 textstyle 0 }
  229.  
  230. itemDef { text "v" cvartest "ybl_playercounter" showcvar { 1 }
  231. rect 13.3 0 0 0 visible 1 decoration style 1
  232. backcolor 0 0 0 1 forecolor 1 1 1 .1 textscale .23 textstyle 0 }
  233.  
  234.  
  235.  
  236. // HOME
  237. itemdef { cvartest "ybl_playercounter" showcvar { 1 }
  238. textstyle 2 visible 1 forecolor 1 1 1 .1 // 0 0 0 0.5
  239. textscale .245 decoration ownerdraw CG_RED_CLAN_PLYRS ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_RED }
  240.  
  241. itemdef { cvartest "ybl_playercounter" showcvar { 1 }
  242. textstyle 2 visible 1 forecolor 1 1 1 .1
  243. textscale .245 decoration ownerdraw CG_BLUE_CLAN_PLYRS ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_BLUE }
  244. }
  245.  
  246. // GUEST
  247.  
  248. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  249. rect 35 470 0 0 // 45 110 0 0
  250.  
  251. itemdef { cvartest "ybl_playercounter" showcvar { 1 }
  252. visible 1 textstyle 2 forecolor 1 1 1 .1
  253. textscale .245 decoration ownerdraw CG_BLUE_CLAN_PLYRS ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_RED }
  254.  
  255. itemdef { cvartest "ybl_playercounter" showcvar { 1 }
  256. visible 1 textstyle 2 forecolor 1 1 1 .1
  257. textscale .245 decoration ownerdraw CG_RED_CLAN_PLYRS ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_BLUE }
  258. }
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266. /// >> SCOREBOARDS <<
  267.  
  268.  
  269.  
  270. /// SCOREBOARD BACKGROUND FFA + Duel
  271.  
  272. menuDef {
  273. name "SelfFrameHighlights"
  274. fullScreen MENU_FALSE
  275. visible MENU_TRUE
  276. rect 0 0 32 256
  277.  
  278. //self top highlight
  279. itemDef {
  280.  
  281. name "SelfTLeft"
  282. rect 2 2 16 16
  283. visible 1
  284. decoration
  285. ownerdraw CG_TEAM_COLORIZED
  286. ownerdrawflag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
  287. style 1
  288. background "ui/assets/hud/teamonl.tga"
  289. cvartest "ybl_score" showcvar { 1 }
  290. }
  291. itemDef {
  292.  
  293. name "SelfTMid"
  294. rect 18 2 114 16
  295. visible 1
  296. decoration
  297. ownerdraw CG_TEAM_COLORIZED
  298. ownerdrawflag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
  299. style 1
  300. background "ui/assets/hud/teamonm.tga"
  301. cvartest "ybl_score" showcvar { 1 }
  302. }
  303. itemDef {
  304.  
  305. name "SelfTLeft"
  306. rect 132 2 16 16
  307. visible 1
  308. decoration
  309. ownerdraw CG_TEAM_COLORIZED
  310. ownerdrawflag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
  311. style 1
  312. background "ui/assets/hud/teamonr.tga"
  313. cvartest "ybl_score" showcvar { 1 }
  314. }
  315.  
  316. itemDef {
  317.  
  318. name "SelfBLeft"
  319. rect 2 18 16 16
  320. visible 1
  321. decoration
  322. ownerdraw CG_TEAM_COLORIZED
  323. ownerdrawflag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
  324. style 1
  325. background "ui/assets/hud/teamonl.tga"
  326. cvartest "ybl_score" showcvar { 1 }
  327. }
  328. itemDef {
  329.  
  330. name "SelfBMid"
  331. rect 18 18 116 16
  332. visible 1
  333. decoration
  334. ownerdraw CG_TEAM_COLORIZED
  335. ownerdrawflag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
  336. style 1
  337. background "ui/assets/hud/teamonm.tga"
  338. cvartest "ybl_score" showcvar { 1 }
  339. }
  340. itemDef {
  341. name "SelfBLeft"
  342. rect 134 18 16 16
  343. visible 1
  344. decoration
  345. ownerdraw CG_TEAM_COLORIZED
  346. ownerdrawflag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
  347. style 1
  348. background "ui/assets/hud/teamonr.tga"
  349. cvartest "ybl_score" showcvar { 1 }
  350.  
  351. }
  352. }
  353.  
  354.  
  355.  
  356. // SCORE VALUE FFA + Duel
  357. menuDef {
  358. name "scores"
  359. fullScreen MENU_FALSE
  360. visible MENU_TRUE
  361. rect -5 0 0 0
  362. itemDef {
  363. name "1stplace"
  364. ownerdraw CG_1ST_PLACE_SCORE
  365. rect 10 14 135 40
  366. visible 1
  367. textscale .22
  368. decoration
  369. cvartest "ybl_score" showcvar { 1 }
  370. }
  371.  
  372. // this is the item def for the 2nd place text
  373. itemdef {
  374.  
  375. name "2ndplace"
  376. ownerdraw CG_2ND_PLACE_SCORE
  377. rect 10 30 135 40
  378. visible 1
  379. textscale .22
  380. decoration
  381. cvartest "ybl_score" showcvar { 1 }
  382. }
  383. }
  384.  
  385.  
  386.  
  387.  
  388. /// SCOREBOARD TEAMGAMES
  389.  
  390.  
  391. // BACKGROUND:
  392.  
  393.  
  394. menuDef {
  395. name "SelfFrameHighlights"
  396. fullScreen MENU_FALSE
  397. visible MENU_TRUE
  398. rect -100 0 0 0
  399.  
  400. //self top highlight
  401. itemDef {
  402. cvartest "ybl_score" showcvar { 2 }
  403. name "SelfTLeft"
  404. rect 2 2 16 16
  405. visible 1
  406. decoration
  407. ownerdraw CG_TEAM_COLORIZED
  408. ownerdrawflag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
  409. style 1
  410. background "ui/assets/hud/teamonl.tga"
  411. }
  412. itemDef {
  413. cvartest "ybl_score" showcvar { 2 }
  414. name "SelfTMid"
  415. rect 18 2 92 16
  416. visible 1
  417. decoration
  418. ownerdraw CG_TEAM_COLORIZED
  419. ownerdrawflag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
  420. style 1
  421. background "ui/assets/hud/teamonm.tga"
  422. }
  423. itemDef {
  424. cvartest "ybl_score" showcvar { 2 }
  425. name "SelfTLeft"
  426. rect 110 2 16 16
  427. visible 1
  428. decoration
  429. ownerdraw CG_TEAM_COLORIZED
  430. ownerdrawflag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
  431. style 1
  432. background "ui/assets/hud/teamonr.tga"
  433. }
  434.  
  435.  
  436.  
  437.  
  438. //self bottom highlight
  439. itemDef {
  440. cvartest "ybl_score" showcvar { 2 }
  441. name "SelfBLeft"
  442. rect 2 18 16 16
  443. visible 1
  444. decoration
  445. ownerdraw CG_TEAM_COLORIZED
  446. ownerdrawflag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
  447. style 1
  448. background "ui/assets/hud/teamonl.tga"
  449. }
  450. itemDef {
  451. cvartest "ybl_score" showcvar { 2 }
  452. name "SelfBMid"
  453. rect 18 18 92 16
  454. visible 1
  455. decoration
  456. ownerdraw CG_TEAM_COLORIZED
  457. ownerdrawflag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
  458. style 1
  459. background "ui/assets/hud/teamonm.tga"
  460. }
  461. itemDef {
  462. cvartest "ybl_score" showcvar { 2 }
  463. name "SelfBLeft"
  464. rect 110 18 16 16
  465. visible 1
  466. decoration
  467. ownerdraw CG_TEAM_COLORIZED
  468. ownerdrawflag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
  469. style 1
  470. background "ui/assets/hud/teamonr.tga"
  471. }
  472. }
  473.  
  474.  
  475.  
  476.  
  477. /// SCOREBOARD TEAMGAMES VALUE
  478.  
  479.  
  480. menuDef {
  481. name "scores"
  482. fullScreen MENU_FALSE
  483. visible MENU_TRUE
  484. rect -108 0 170 0 //// 0 0 120 40
  485. itemdef {
  486. cvartest "ybl_score" showcvar { 2 }
  487. name "1stplace"
  488. ownerdraw CG_1ST_PLACE_SCORE
  489. rect 10 14 120 0
  490. visible 1
  491. textscale .22
  492. decoration
  493. }
  494.  
  495. // 2nd place TEXT
  496. itemdef {
  497. cvartest "ybl_score" showcvar { 2 }
  498. name "2ndplace"
  499. ownerdraw CG_2ND_PLACE_SCORE
  500. rect 10 30 120 0
  501. visible 1
  502. textscale .22
  503. decoration
  504. }
  505. }
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514. ///*********** CTF ************* does this even work
  515.  
  516.  
  517. ///********* iFLAG
  518. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  519. itemDef { text "FLAG" forecolor 1 0 1 1 textscale .6 textstyle 6
  520. rect 260 70 0 0 visible 1 decoration style 1 ownerdrawflag CG_SHOW_IF_PLAYER_HAS_FLAG }
  521. }
  522.  
  523.  
  524. ///*********** FLAGS
  525. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  526. rect 5 90 0 0 // 620 425 0 0
  527.  
  528. itemDef { name "home"
  529. rect 0 0 20 20 visible 1 decoration
  530. cvartest "g_gametype" hidecvar { 8 6 }
  531. ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_RED ownerdraw CG_RED_FLAGSTATUS }
  532.  
  533. itemDef { name "home"
  534. rect 0 0 20 20 visible 1 decoration
  535. cvartest "g_gametype" hidecvar { 8 6 }
  536. ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_BLUE ownerdraw CG_BLUE_FLAGSTATUS }
  537.  
  538. itemDef { name "nmy"
  539. rect 0 25 20 20 visible 1 decoration
  540. cvartest "g_gametype" hidecvar { 8 6 }
  541. ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_RED ownerdraw CG_BLUE_FLAGSTATUS }
  542.  
  543. itemDef { name "nmy"
  544. rect 0 25 20 20 visible 1 decoration
  545. cvartest "g_gametype" hidecvar { 8 6 }
  546. ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_BLUE ownerdraw CG_RED_FLAGSTATUS }
  547. }
RAW Paste Data