Guest User

hud

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