demo_saber.menu 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513
  1. //----------------------------------------------------------------------------------------------
  2. //
  3. // SABER CREATION MENU - called from main menu at the the start of a new game,
  4. // and also when player is allowed to upgrade the fighting style and choose a new saber
  5. //
  6. //----------------------------------------------------------------------------------------------
  7. {
  8. menuDef
  9. {
  10. name "saberMenu"
  11. fullScreen 1 // MENU_TRUE
  12. rect 0 0 640 480 // Size and position of the menu
  13. visible 1 // Visible on open
  14. focusColor 1 1 1 1 // Focus color for text and items
  15. descX 320
  16. descY 426
  17. descScale 1
  18. descColor 1 .682 0 .8
  19. descAlignment ITEM_ALIGN_CENTER
  20. onOpen
  21. {
  22. setcvar "playersave" "(NULL)"
  23. setcvar "tiers_complete" "(NULL)"
  24. uiScript "resetsabercvardefaults"
  25. uiScript "getsabercvars"
  26. uiScript "updatefightingstylechoices"
  27. uiScript "saber_hilt"
  28. uiScript "saber_color"
  29. uiScript "saber2_hilt"
  30. uiScript "saber2_color"
  31. setitemcolor typebut_single forecolor .65 .65 1 1
  32. setitemcolor typebut_dual forecolor .65 .65 1 1
  33. setitemcolor typebut_staff forecolor .65 .65 1 1
  34. }
  35. onESC
  36. {
  37. play "sound/interface/esc.wav"
  38. uiScript "updatesabercvars"
  39. uiScript closesabermenu
  40. }
  41. //----------------------------------------------------------------------------------------------
  42. //
  43. // MENU BACKGROUND
  44. //
  45. //----------------------------------------------------------------------------------------------
  46. itemDef
  47. {
  48. name background
  49. group none
  50. style WINDOW_STYLE_SHADER
  51. rect 0 0 640 480
  52. background "gfx/menus/sabermenu_back"
  53. forecolor 1 1 1 1
  54. visible 1
  55. decoration
  56. }
  57. itemDef
  58. {
  59. name box1
  60. group none
  61. style WINDOW_STYLE_SHADER
  62. rect 4 66 219 165
  63. background "gfx/menus/sabermenu_box"
  64. forecolor 1 1 1 1
  65. visible 1
  66. decoration
  67. }
  68. itemDef
  69. {
  70. name box2top
  71. group none
  72. style WINDOW_STYLE_SHADER
  73. rect 212 66 219 60
  74. background "gfx/menus/sabermenu_box_top"
  75. forecolor 1 1 1 1
  76. visible 1
  77. decoration
  78. }
  79. itemDef
  80. {
  81. name box2middle
  82. group none
  83. style WINDOW_STYLE_SHADER
  84. rect 212 126 219 0
  85. background "gfx/menus/sabermenu_box_middle"
  86. forecolor 1 1 1 1
  87. visible 1
  88. decoration
  89. }
  90. itemDef
  91. {
  92. name box2bottom
  93. group none
  94. style WINDOW_STYLE_SHADER
  95. rect 212 126 219 60
  96. background "gfx/menus/sabermenu_box_bottom"
  97. forecolor 1 1 1 1
  98. visible 1
  99. decoration
  100. }
  101. itemDef
  102. {
  103. name box3top
  104. group none
  105. style WINDOW_STYLE_SHADER
  106. rect 418 66 219 60
  107. background "gfx/menus/sabermenu_box_top"
  108. forecolor 1 1 1 1
  109. visible 1
  110. decoration
  111. }
  112. itemDef
  113. {
  114. name box3middle
  115. group none
  116. style WINDOW_STYLE_SHADER
  117. rect 418 126 219 0
  118. background "gfx/menus/sabermenu_box_middle"
  119. forecolor 1 1 1 1
  120. visible 1
  121. decoration
  122. }
  123. itemDef
  124. {
  125. name box3bottom
  126. group none
  127. style WINDOW_STYLE_SHADER
  128. rect 418 126 219 60
  129. background "gfx/menus/sabermenu_box_bottom"
  130. forecolor 1 1 1 1
  131. visible 1
  132. decoration
  133. }
  134. itemDef
  135. {
  136. name styleboxleft
  137. group none
  138. style WINDOW_STYLE_SHADER
  139. rect 227 183 198 40
  140. background "gfx/menus/sabermenu_stylebox_left"
  141. forecolor 1 1 1 1
  142. visible 1
  143. decoration
  144. }
  145. itemDef
  146. {
  147. name styleboxright
  148. group none
  149. style WINDOW_STYLE_SHADER
  150. rect 425 183 198 40
  151. background "gfx/menus/sabermenu_stylebox_right"
  152. forecolor 1 1 1 1
  153. visible 1
  154. decoration
  155. }
  156. //----------------------------------------------------------------------------------------------
  157. // TOP MAIN MENU BUTTONS
  158. //----------------------------------------------------------------------------------------------
  159. itemDef
  160. {
  161. name button_glow
  162. group none
  163. style WINDOW_STYLE_SHADER
  164. rect 0 0 0 0
  165. background "gfx/menus/menu_buttonback"
  166. forecolor 1 1 1 1
  167. visible 0
  168. decoration
  169. }
  170. // Big button "NEW"
  171. itemDef
  172. {
  173. name newgamebutton
  174. group nbut
  175. style WINDOW_STYLE_EMPTY
  176. type ITEM_TYPE_BUTTON
  177. rect 7 16 130 24
  178. text @MENUS_NEW
  179. descText @MENUS_START_A_NEW_GAME
  180. font 3
  181. textscale 1.1
  182. textaligny 0
  183. textalign ITEM_ALIGN_CENTER
  184. textstyle 1
  185. textalignx 65
  186. forecolor 1 1 1 1
  187. visible 1
  188. cvarTest saber_menu
  189. showCvar { "0" }
  190. mouseEnter
  191. {
  192. show button_glow
  193. setitemrect button_glow 0 14 200 30
  194. }
  195. mouseExit
  196. {
  197. hide button_glow
  198. }
  199. }
  200. // Big button "LOAD"
  201. itemDef
  202. {
  203. name loadgamebutton
  204. group lbut
  205. text @MENUS_LOAD
  206. descText @MENUS_LOAD_A_SAVED_GAME
  207. style WINDOW_STYLE_EMPTY
  208. type ITEM_TYPE_BUTTON
  209. rect 170 16 130 24
  210. textaligny 0
  211. font 3
  212. textscale 1.1
  213. textalign ITEM_ALIGN_CENTER
  214. textstyle 1
  215. textalignx 65
  216. forecolor 1 .682 0 1
  217. visible 1
  218. mouseEnter
  219. {
  220. show button_glow
  221. setitemrect button_glow 130 14 200 30
  222. }
  223. mouseExit
  224. {
  225. hide button_glow
  226. }
  227. action
  228. {
  229. play "sound/interface/button1.wav"
  230. uiScript "updatesabercvars"
  231. close all
  232. open loadgameMenu
  233. }
  234. }
  235. // Big button "CONTROLS"
  236. itemDef
  237. {
  238. name controlsbutton_glow
  239. group none
  240. style WINDOW_STYLE_SHADER
  241. rect 340 16 130 24
  242. background "gfx/menus/menu_buttonback"
  243. forecolor 1 1 1 1
  244. visible 0
  245. decoration
  246. }
  247. itemDef
  248. {
  249. name controlsbutton
  250. group cbut
  251. text @MENUS_CONTROLS
  252. descText @MENUS_CONFIGURE_GAME_CONTROLS
  253. type ITEM_TYPE_BUTTON
  254. style WINDOW_STYLE_EMPTY
  255. rect 340 16 130 24
  256. font 3
  257. textscale 1.1
  258. textaligny 0
  259. textalign ITEM_ALIGN_CENTER
  260. textstyle 1
  261. textalignx 65
  262. backcolor 0 0 0 0
  263. forecolor 1 .682 0 1
  264. visible 1
  265. mouseEnter
  266. {
  267. show button_glow
  268. setitemrect button_glow 310 14 200 30
  269. }
  270. mouseExit
  271. {
  272. hide button_glow
  273. }
  274. action
  275. {
  276. play "sound/interface/button1.wav"
  277. uiScript "updatesabercvars"
  278. close all
  279. open controlsMenu
  280. }
  281. }
  282. // Big button "SETUP"
  283. itemDef
  284. {
  285. name setupbutton_glow
  286. group none
  287. style WINDOW_STYLE_SHADER
  288. rect 502 16 130 24
  289. background "gfx/menus/menu_buttonback"
  290. forecolor 1 1 1 1
  291. visible 0
  292. decoration
  293. }
  294. itemDef
  295. {
  296. name setupbutton
  297. group sbut
  298. text @MENUS_SETUP
  299. descText @MENUS_CONFIGURE_GAME_SETTINGS
  300. type ITEM_TYPE_BUTTON
  301. style WINDOW_STYLE_EMPTY
  302. rect 502 16 130 24
  303. font 3
  304. textscale 1.1
  305. textaligny 0
  306. textalign ITEM_ALIGN_CENTER
  307. textstyle 1
  308. textalignx 65
  309. backcolor 0 0 0 0
  310. forecolor 1 .682 0 1
  311. visible 1
  312. mouseEnter
  313. {
  314. show button_glow
  315. setitemrect button_glow 472 14 200 30
  316. }
  317. mouseExit
  318. {
  319. hide button_glow
  320. }
  321. action
  322. {
  323. play "sound/interface/button1.wav"
  324. uiScript "updatesabercvars"
  325. close all
  326. open setupMenu
  327. }
  328. }
  329. itemDef
  330. {
  331. name left_frame
  332. group lf_fr
  333. style WINDOW_STYLE_SHADER
  334. rect 0 -60 320 160
  335. background "gfx/menus/menu_boxes_left"
  336. forecolor 1 1 1 1
  337. visible 1
  338. decoration
  339. }
  340. itemDef
  341. {
  342. name right_frame
  343. group rt_fr
  344. style WINDOW_STYLE_SHADER
  345. rect 320 -60 320 160
  346. background "gfx/menus/menu_boxes_right"
  347. forecolor 1 1 1 1
  348. visible 1
  349. decoration
  350. }
  351. //----------------------------------------------------------------------------------------------
  352. // SABER MENU specific stuff
  353. //----------------------------------------------------------------------------------------------
  354. itemDef
  355. {
  356. name title_glow
  357. group none
  358. style WINDOW_STYLE_SHADER
  359. rect 100 48 440 20
  360. background "gfx/menus/menu_blendbox"
  361. forecolor 1 1 1 1
  362. visible 1
  363. decoration
  364. }
  365. // CREATION title
  366. itemDef
  367. {
  368. name creation_title
  369. group title
  370. style WINDOW_STYLE_EMPTY
  371. text @MENUS_LIGHTSABER_CREATION
  372. rect 100 50 440 16
  373. font 3
  374. textscale 0.7
  375. textalign ITEM_ALIGN_CENTER
  376. textalignx 225
  377. textaligny -1
  378. forecolor .549 .854 1 1
  379. visible 1
  380. decoration
  381. }
  382. //----------------------------------------------------------------------------------------------
  383. // SABER TYPE BUTTONS (standard, dual, two handed)
  384. //----------------------------------------------------------------------------------------------
  385. itemDef
  386. {
  387. name typebut
  388. group none
  389. text @MENUS_SABER_TYPE
  390. descText @MENUS_SABER_TYPE_DESC
  391. style WINDOW_STYLE_EMPTY
  392. rect 32 96 160 24
  393. font 3
  394. textscale 1
  395. textstyle 1
  396. textalignx 0
  397. textaligny 0
  398. textalign ITEM_ALIGN_LEFT
  399. backcolor 0 0 0 0
  400. forecolor .549 .854 1 1
  401. visible 1
  402. decoration
  403. }
  404. itemDef
  405. {
  406. name typebut_glow
  407. group none
  408. style WINDOW_STYLE_SHADER
  409. rect 0 0 0 0
  410. background "gfx/menus/menu_buttonback"
  411. forecolor 1 1 1 1
  412. visible 0
  413. decoration
  414. }
  415. itemDef
  416. {
  417. name typebut_single
  418. group none
  419. text @MENUS_SINGLESABER
  420. descText @MENUS_SINGLESABER_DESC
  421. type ITEM_TYPE_BUTTON
  422. style WINDOW_STYLE_EMPTY
  423. rect 32 132 160 16
  424. font 4
  425. textscale 1
  426. textstyle 1
  427. textalign ITEM_ALIGN_LEFT
  428. textalignx 0
  429. textaligny 0
  430. forecolor 1 1 1 1
  431. visible 1
  432. mouseEnter
  433. {
  434. show typebut_glow
  435. setitemrect typebut_glow 5 130 210 20
  436. }
  437. mouseExit
  438. {
  439. hide typebut_glow
  440. }
  441. action
  442. {
  443. play "sound/interface/choose_saber.wav"
  444. setcvar ui_saber_type "single"
  445. uiScript "saber_type"
  446. setcvar ui_saber "single_1"
  447. setcvar ui_saber2 ""
  448. uiScript "saber_hilt"
  449. uiScript "saber_color"
  450. uiScript "saber2_hilt"
  451. uiScript "saber2_color"
  452. setitemcolor typebut_single forecolor 1 1 1 1
  453. setitemcolor typebut_dual forecolor .65 .65 1 1
  454. setitemcolor typebut_staff forecolor .65 .65 1 1
  455. transition2 box2middle 212 126 219 0 20 5
  456. transition2 box2bottom 212 126 219 60 20 5
  457. transition2 box3middle 418 126 219 0 20 5
  458. transition2 box3bottom 418 126 219 60 20 5
  459. transition2 styleboxleft 227 183 198 40 20 5
  460. transition2 styleboxright 425 183 198 40 20 5
  461. transition2 saber 12 -80 615 615 20 10
  462. uiScript "updatefightingstylechoices"
  463. }
  464. }
  465. itemDef
  466. {
  467. name typebut_dual
  468. group none
  469. text @MENUS_DUALSABERS
  470. descText @MENUS_DUALSABERS_DESC
  471. type ITEM_TYPE_BUTTON
  472. style WINDOW_STYLE_EMPTY
  473. rect 32 152 160 16
  474. font 4
  475. textscale 1
  476. textstyle 1
  477. textalign ITEM_ALIGN_LEFT
  478. textalignx 0
  479. textaligny 0
  480. forecolor 1 1 1 1
  481. visible 1
  482. mouseEnter
  483. {
  484. show typebut_glow
  485. setitemrect typebut_glow 5 150 210 20
  486. }
  487. mouseExit
  488. {
  489. hide typebut_glow
  490. }
  491. action
  492. {
  493. play "sound/interface/choose_saber.wav"
  494. setcvar ui_saber_type "dual"
  495. uiScript "saber_type"
  496. setcvar ui_saber "single_1"
  497. setcvar ui_saber2 "single_1"
  498. uiScript "saber_hilt"
  499. uiScript "saber_color"
  500. uiScript "saber2_hilt"
  501. uiScript "saber2_color"
  502. setitemcolor typebut_single forecolor .65 .65 1 1
  503. setitemcolor typebut_dual forecolor 1 1 1 1
  504. setitemcolor typebut_staff forecolor .65 .65 1 1
  505. transition2 box2middle 212 126 219 44 20 5
  506. transition2 box2bottom 212 170 219 60 20 5
  507. transition2 box3middle 418 126 219 44 20 5
  508. transition2 box3bottom 418 170 219 60 20 5
  509. transition2 styleboxleft 425 183 0 40 20 5
  510. transition2 styleboxright 425 183 0 40 20 5
  511. transition2 saber 12 -130 615 615 20 5
  512. uiScript "updatefightingstylechoices"
  513. }
  514. }
  515. itemDef
  516. {
  517. name typebut_staff
  518. group none
  519. text @MENUS_SABERSTAFF
  520. descText @MENUS_SABERSTAFF_DESC
  521. type ITEM_TYPE_BUTTON
  522. style WINDOW_STYLE_EMPTY
  523. rect 32 172 160 16
  524. font 4
  525. textscale 1
  526. textstyle 1
  527. textalign ITEM_ALIGN_LEFT
  528. textalignx 0
  529. textaligny 0
  530. forecolor 1 1 1 1
  531. visible 1
  532. mouseEnter
  533. {
  534. show typebut_glow
  535. setitemrect typebut_glow 5 170 210 20
  536. }
  537. mouseExit
  538. {
  539. hide typebut_glow
  540. }
  541. action
  542. {
  543. play "sound/interface/choose_saber.wav"
  544. setcvar ui_saber_type "staff"
  545. uiScript "saber_type"
  546. setcvar ui_saber "dual_1"
  547. setcvar ui_saber2 ""
  548. uiScript "saber_hilt"
  549. uiScript "saber_color"
  550. uiScript "saber2_hilt"
  551. uiScript "saber2_color"
  552. setitemcolor typebut_single forecolor .65 .65 1 1
  553. setitemcolor typebut_dual forecolor .65 .65 1 1
  554. setitemcolor typebut_staff forecolor 1 1 1 1
  555. transition2 box2middle 212 126 219 0 20 5
  556. transition2 box2bottom 212 126 219 60 20 5
  557. transition2 box3middle 418 126 219 0 20 5
  558. transition2 box3bottom 418 126 219 60 20 5
  559. transition2 styleboxleft 425 183 0 40 20 5
  560. transition2 styleboxright 425 183 0 40 20 5
  561. transition2 saber 12 -80 615 615 20 10
  562. uiScript "updatefightingstylechoices"
  563. }
  564. }
  565. //----------------------------------------------------------------------------------------------
  566. //HILTS
  567. //----------------------------------------------------------------------------------------------
  568. itemDef
  569. {
  570. name hilttype
  571. group none
  572. text @MENUS_SABER_HILTS
  573. descText @MENUS_SABER_HILTS_DESC
  574. style WINDOW_STYLE_EMPTY
  575. rect 240 96 160 24
  576. font 3
  577. textscale 1
  578. textstyle 1
  579. textalignx 0
  580. textaligny 0
  581. textalign ITEM_ALIGN_LEFT
  582. backcolor 0 0 0 0
  583. forecolor .549 .854 1 1
  584. visible 1
  585. decoration
  586. }
  587. // HILT BUTTON 1 - SINGLE or DUAL
  588. itemDef
  589. {
  590. name hiltbut_glow
  591. group none
  592. style WINDOW_STYLE_SHADER
  593. rect 210 130 210 20
  594. background "gfx/menus/menu_buttonback"
  595. forecolor 1 1 1 1
  596. visible 0
  597. decoration
  598. }
  599. itemDef
  600. {
  601. name hiltbut
  602. group none
  603. text @MENUS_HILT1
  604. descText @MENUS_HILT1_DESC
  605. type ITEM_TYPE_MULTI
  606. style WINDOW_STYLE_EMPTY
  607. rect 240 132 160 16
  608. font 4
  609. textscale 1
  610. textalign ITEM_ALIGN_LEFT
  611. textstyle 1
  612. textalignx 0
  613. textaligny 0
  614. forecolor .65 .65 1 1
  615. cvarTest ui_saber_type
  616. hideCvar { "staff" }
  617. cvar "ui_saber"
  618. //FIXME: read these from sabers.cfg + *.sab?
  619. cvarStrList
  620. {
  621. @MENUS_SINGLE_HILT1 "single_1"
  622. @MENUS_SINGLE_HILT2 "single_2"
  623. @MENUS_SINGLE_HILT3 "single_3"
  624. @MENUS_SINGLE_HILT4 "single_4"
  625. @MENUS_SINGLE_HILT5 "single_5"
  626. @MENUS_SINGLE_HILT6 "single_6"
  627. @MENUS_SINGLE_HILT7 "single_7"
  628. @MENUS_SINGLE_HILT8 "single_8"
  629. @MENUS_SINGLE_HILT9 "single_9"
  630. }
  631. visible 1
  632. mouseEnter
  633. {
  634. show hiltbut_glow
  635. }
  636. mouseExit
  637. {
  638. hide hiltbut_glow
  639. }
  640. action
  641. {
  642. play "sound/interface/choose_hilt.wav"
  643. uiScript "saber_hilt"
  644. }
  645. }
  646. // HILT BUTTON 1 - STAVES
  647. itemDef
  648. {
  649. name hiltbut_staves
  650. group none
  651. text @MENUS_HILT1
  652. descText @MENUS_HILT1_DESC
  653. type ITEM_TYPE_MULTI
  654. style WINDOW_STYLE_EMPTY
  655. rect 240 132 160 16
  656. font 4
  657. textscale 1
  658. textstyle 1
  659. textalign ITEM_ALIGN_LEFT
  660. textalignx 0
  661. textaligny 0
  662. forecolor .65 .65 1 1
  663. cvarTest ui_saber_type
  664. hideCvar { "single"; "dual" }
  665. cvar "ui_saber"
  666. //FIXME: read these from sabers.cfg + *.sab?
  667. cvarStrList
  668. {
  669. @MENUS_STAFF_HILT1 "dual_1"
  670. @MENUS_STAFF_HILT2 "dual_2"
  671. @MENUS_STAFF_HILT3 "dual_3"
  672. @MENUS_STAFF_HILT4 "dual_4"
  673. @MENUS_STAFF_HILT5 "dual_5"
  674. }
  675. visible 1
  676. mouseEnter
  677. {
  678. show hiltbut_glow
  679. }
  680. mouseExit
  681. {
  682. hide hiltbut_glow
  683. }
  684. action
  685. {
  686. play "sound/interface/choose_hilt.wav"
  687. uiScript "saber_hilt"
  688. }
  689. }
  690. // HILT BUTTON 2 - DUAL
  691. itemDef
  692. {
  693. name hiltbut2_glow
  694. group none
  695. style WINDOW_STYLE_SHADER
  696. rect 210 150 210 20
  697. background "gfx/menus/menu_buttonback"
  698. forecolor 1 1 1 1
  699. visible 0
  700. cvarTest ui_saber_type
  701. hideCvar { "single"; "staff" }
  702. decoration
  703. }
  704. itemDef
  705. {
  706. name hiltbut2
  707. group none
  708. text @MENUS_HILT2
  709. descText @MENUS_HILT2_DESC
  710. type ITEM_TYPE_MULTI
  711. style WINDOW_STYLE_EMPTY
  712. rect 240 152 160 16
  713. font 4
  714. textscale 1
  715. textstyle 1
  716. textalign ITEM_ALIGN_LEFT
  717. textalignx 0
  718. textaligny 0
  719. forecolor .65 .65 1 1
  720. cvarTest ui_saber_type
  721. hideCvar { "single"; "staff" }
  722. cvar "ui_saber2"
  723. //FIXME: read these from sabers.cfg + *.sab?
  724. cvarStrList
  725. {
  726. @MENUS_SINGLE_HILT1 "single_1"
  727. @MENUS_SINGLE_HILT2 "single_2"
  728. @MENUS_SINGLE_HILT3 "single_3"
  729. @MENUS_SINGLE_HILT4 "single_4"
  730. @MENUS_SINGLE_HILT5 "single_5"
  731. @MENUS_SINGLE_HILT6 "single_6"
  732. @MENUS_SINGLE_HILT7 "single_7"
  733. @MENUS_SINGLE_HILT8 "single_8"
  734. @MENUS_SINGLE_HILT9 "single_9"
  735. }
  736. visible 1
  737. mouseEnter
  738. {
  739. show hiltbut2_glow
  740. }
  741. mouseExit
  742. {
  743. hide hiltbut2_glow
  744. }
  745. action
  746. {
  747. play "sound/interface/choose_hilt.wav"
  748. uiScript "saber2_hilt"
  749. }
  750. }
  751. //----------------------------------------------------------------------------------------------
  752. //BLADE COLORS
  753. //----------------------------------------------------------------------------------------------
  754. itemDef
  755. {
  756. name bladecolor_title
  757. group none
  758. text @MENUS_BLADE_COLOR
  759. descText @MENUS_BLADE_COLOR_DESC
  760. style WINDOW_STYLE_EMPTY
  761. rect 446 96 160 24
  762. font 3
  763. textscale 1
  764. textstyle 1
  765. textalignx 0
  766. textaligny 0
  767. textalign ITEM_ALIGN_LEFT
  768. backcolor 0 0 0 0
  769. forecolor .549 .854 1 1
  770. visible 1
  771. decoration
  772. }
  773. // COLOR 1 BUTTON
  774. /*itemDef
  775. {
  776. name colorbut_glow
  777. group none
  778. style WINDOW_STYLE_SHADER
  779. rect 446 136 160 16
  780. background "gfx/menus/menu_buttonback"
  781. forecolor 1 1 1 1
  782. visible 0
  783. decoration
  784. }
  785. itemDef
  786. {
  787. name colorbut
  788. group none
  789. text @MENUS_COLOR1
  790. descText @MENUS_COLOR1_DESC
  791. type ITEM_TYPE_MULTI
  792. style WINDOW_STYLE_EMPTY
  793. rect 446 136 160 16
  794. font 2
  795. textscale .8
  796. textstyle 1
  797. textalign ITEM_ALIGN_LEFT
  798. textalignx 0
  799. textaligny -4
  800. forecolor 1 1 1 1
  801. visible 1
  802. cvar "ui_saber_color"
  803. cvarStrList
  804. {
  805. "red" "red"
  806. "orange" "orange"
  807. "yellow" "yellow"
  808. "green" "green"
  809. "blue" "blue"
  810. "purple" "purple"
  811. }
  812. mouseEnter
  813. {
  814. show colorbut_glow
  815. }
  816. mouseExit
  817. {
  818. hide colorbut_glow
  819. }
  820. action
  821. {
  822. play "sound/interface/choose_blade.wav"
  823. uiScript "saber_color"
  824. }
  825. }*/
  826. itemDef
  827. {
  828. name blueicon
  829. group sabericons
  830. descText @MENUS_COLOR1_DESC
  831. style WINDOW_STYLE_SHADER
  832. type ITEM_TYPE_BUTTON
  833. rect 446 124 24 24
  834. background "gfx/menus/saber_icon_blue"
  835. forecolor .75 .75 .75 1
  836. border 1
  837. bordersize 1
  838. bordercolor .33 .33 .5 1
  839. visible 1
  840. mouseEnter
  841. {
  842. setitemcolor blueicon forecolor 1 1 1 1
  843. setitemcolor blueicon bordercolor .66 .66 1 1
  844. }
  845. mouseExit
  846. {
  847. setitemcolor blueicon forecolor .75 .75 .75 1
  848. setitemcolor blueicon bordercolor .33 .33 .5 1
  849. }
  850. action
  851. {
  852. play "sound/interface/choose_blade.wav"
  853. //uiScript "saber_color"
  854. setcvar "ui_saber_color" "blue"
  855. }
  856. }
  857. itemDef
  858. {
  859. name greenicon
  860. group sabericons
  861. descText @MENUS_COLOR1_DESC
  862. style WINDOW_STYLE_SHADER
  863. type ITEM_TYPE_BUTTON
  864. rect 480 124 24 24
  865. background "gfx/menus/saber_icon_green"
  866. forecolor .75 .75 .75 1
  867. border 1
  868. bordersize 1
  869. bordercolor .33 .33 .5 1
  870. visible 1
  871. mouseEnter
  872. {
  873. setitemcolor greenicon forecolor 1 1 1 1
  874. setitemcolor greenicon bordercolor .66 .66 1 1
  875. }
  876. mouseExit
  877. {
  878. setitemcolor greenicon forecolor .75 .75 .75 1
  879. setitemcolor greenicon bordercolor .33 .33 .5 1
  880. }
  881. action
  882. {
  883. play "sound/interface/choose_blade.wav"
  884. //uiScript "saber_color"
  885. setcvar "ui_saber_color" "green"
  886. }
  887. }
  888. itemDef
  889. {
  890. name orangeicon
  891. group sabericons
  892. descText @MENUS_COLOR1_DESC
  893. style WINDOW_STYLE_SHADER
  894. type ITEM_TYPE_BUTTON
  895. rect 514 124 24 24
  896. background "gfx/menus/saber_icon_orange"
  897. forecolor .75 .75 .75 1
  898. border 1
  899. bordersize 1
  900. bordercolor .33 .33 .5 1
  901. visible 1
  902. mouseEnter
  903. {
  904. setitemcolor orangeicon forecolor 1 1 1 1
  905. setitemcolor orangeicon bordercolor .66 .66 1 1
  906. }
  907. mouseExit
  908. {
  909. setitemcolor orangeicon forecolor .75 .75 .75 1
  910. setitemcolor orangeicon bordercolor .33 .33 .5 1
  911. }
  912. action
  913. {
  914. play "sound/interface/choose_blade.wav"
  915. //uiScript "saber_color"
  916. setcvar "ui_saber_color" "orange"
  917. }
  918. }
  919. itemDef
  920. {
  921. name purpleicon
  922. group sabericons
  923. descText @MENUS_COLOR1_DESC
  924. style WINDOW_STYLE_SHADER
  925. type ITEM_TYPE_BUTTON
  926. rect 548 124 24 24
  927. background "gfx/menus/saber_icon_purple"
  928. forecolor .75 .75 .75 1
  929. border 1
  930. bordersize 1
  931. bordercolor .33 .33 .5 1
  932. visible 1
  933. mouseEnter
  934. {
  935. setitemcolor purpleicon forecolor 1 1 1 1
  936. setitemcolor purpleicon bordercolor .66 .66 1 1
  937. }
  938. mouseExit
  939. {
  940. setitemcolor purpleicon forecolor .75 .75 .75 1
  941. setitemcolor purpleicon bordercolor .33 .33 .5 1
  942. }
  943. action
  944. {
  945. play "sound/interface/choose_blade.wav"
  946. //uiScript "saber_color"
  947. setcvar "ui_saber_color" "purple"
  948. }
  949. }
  950. itemDef
  951. {
  952. name yellowicon
  953. group sabericons
  954. descText @MENUS_COLOR1_DESC
  955. style WINDOW_STYLE_SHADER
  956. type ITEM_TYPE_BUTTON
  957. rect 582 124 24 24
  958. background "gfx/menus/saber_icon_yellow"
  959. forecolor .75 .75 .75 1
  960. border 1
  961. bordersize 1
  962. bordercolor .33 .33 .5 1
  963. visible 1
  964. mouseEnter
  965. {
  966. setitemcolor yellowicon forecolor 1 1 1 1
  967. setitemcolor yellowicon bordercolor .66 .66 1 1
  968. }
  969. mouseExit
  970. {
  971. setitemcolor yellowicon forecolor .75 .75 .75 1
  972. setitemcolor yellowicon bordercolor .33 .33 .5 1
  973. }
  974. action
  975. {
  976. play "sound/interface/choose_blade.wav"
  977. //uiScript "saber_color"
  978. setcvar "ui_saber_color" "yellow"
  979. }
  980. }
  981. // COLOR 2 BUTTON
  982. itemDef
  983. {
  984. name colorbut2
  985. group none
  986. text @MENUS_COLOR2
  987. descText @MENUS_COLOR2_DESC
  988. //type ITEM_TYPE_MULTI
  989. style WINDOW_STYLE_EMPTY
  990. rect 446 152 160 16
  991. font 2
  992. textscale .8
  993. textstyle 1
  994. textalign ITEM_ALIGN_LEFT
  995. textalignx 0
  996. textaligny -4
  997. forecolor .79 .64 .22 1
  998. visible 1
  999. decoration
  1000. cvarTest ui_saber_type
  1001. hideCvar { "single"; "staff" }
  1002. /*cvar "ui_saber2_color"
  1003. cvarStrList
  1004. {
  1005. "red" "red"
  1006. "orange" "orange"
  1007. "yellow" "yellow"
  1008. "green" "green"
  1009. "blue" "blue"
  1010. "purple" "purple"
  1011. }
  1012. mouseEnter
  1013. {
  1014. show colorbut2_glow
  1015. }
  1016. mouseExit
  1017. {
  1018. hide colorbut2_glow
  1019. }
  1020. action
  1021. {
  1022. play "sound/interface/choose_blade.wav"
  1023. uiScript "saber2_color"
  1024. }*/
  1025. }
  1026. itemDef
  1027. {
  1028. name blueicon2
  1029. group sabericons2
  1030. descText @MENUS_COLOR2_DESC
  1031. style WINDOW_STYLE_SHADER
  1032. type ITEM_TYPE_BUTTON
  1033. rect 446 170 24 24
  1034. background "gfx/menus/saber_icon_blue"
  1035. forecolor .75 .75 .75 1
  1036. border 1
  1037. bordersize 1
  1038. bordercolor .33 .33 .5 1
  1039. visible 1
  1040. cvarTest ui_saber_type
  1041. hideCvar { "single"; "staff" }
  1042. mouseEnter
  1043. {
  1044. setitemcolor blueicon2 forecolor 1 1 1 1
  1045. setitemcolor blueicon2 bordercolor .66 .66 1 1
  1046. }
  1047. mouseExit
  1048. {
  1049. setitemcolor blueicon2 forecolor .75 .75 .75 1
  1050. setitemcolor blueicon2 bordercolor .33 .33 .5 1
  1051. }
  1052. action
  1053. {
  1054. play "sound/interface/choose_blade.wav"
  1055. //uiScript "saber_color"
  1056. setcvar "ui_saber2_color" "blue"
  1057. }
  1058. }
  1059. itemDef
  1060. {
  1061. name greenicon2
  1062. group sabericons2
  1063. descText @MENUS_COLOR2_DESC
  1064. style WINDOW_STYLE_SHADER
  1065. type ITEM_TYPE_BUTTON
  1066. rect 480 170 24 24
  1067. background "gfx/menus/saber_icon_green"
  1068. forecolor .75 .75 .75 1
  1069. border 1
  1070. bordersize 1
  1071. bordercolor .33 .33 .5 1
  1072. visible 1
  1073. cvarTest ui_saber_type
  1074. hideCvar { "single"; "staff" }
  1075. mouseEnter
  1076. {
  1077. setitemcolor greenicon2 forecolor 1 1 1 1
  1078. setitemcolor greenicon2 bordercolor .66 .66 1 1
  1079. }
  1080. mouseExit
  1081. {
  1082. setitemcolor greenicon2 forecolor .75 .75 .75 1
  1083. setitemcolor greenicon2 bordercolor .33 .33 .5 1
  1084. }
  1085. action
  1086. {
  1087. play "sound/interface/choose_blade.wav"
  1088. //uiScript "saber_color"
  1089. setcvar "ui_saber2_color" "green"
  1090. }
  1091. }
  1092. itemDef
  1093. {
  1094. name orangeicon2
  1095. group sabericons2
  1096. style WINDOW_STYLE_SHADER
  1097. descText @MENUS_COLOR2_DESC
  1098. type ITEM_TYPE_BUTTON
  1099. rect 514 170 24 24
  1100. background "gfx/menus/saber_icon_orange"
  1101. forecolor .75 .75 .75 1
  1102. border 1
  1103. bordersize 1
  1104. bordercolor .33 .33 .5 1
  1105. visible 1
  1106. cvarTest ui_saber_type
  1107. hideCvar { "single"; "staff" }
  1108. mouseEnter
  1109. {
  1110. setitemcolor orangeicon2 forecolor 1 1 1 1
  1111. setitemcolor orangeicon2 bordercolor .66 .66 1 1
  1112. }
  1113. mouseExit
  1114. {
  1115. setitemcolor orangeicon2 forecolor .75 .75 .75 1
  1116. setitemcolor orangeicon2 bordercolor .33 .33 .5 1
  1117. }
  1118. action
  1119. {
  1120. play "sound/interface/choose_blade.wav"
  1121. //uiScript "saber_color"
  1122. setcvar "ui_saber2_color" "orange"
  1123. }
  1124. }
  1125. itemDef
  1126. {
  1127. name purpleicon2
  1128. group sabericons2
  1129. style WINDOW_STYLE_SHADER
  1130. type ITEM_TYPE_BUTTON
  1131. descText @MENUS_COLOR2_DESC
  1132. rect 548 170 24 24
  1133. background "gfx/menus/saber_icon_purple"
  1134. forecolor .75 .75 .75 1
  1135. border 1
  1136. bordersize 1
  1137. bordercolor .33 .33 .5 1
  1138. visible 1
  1139. cvarTest ui_saber_type
  1140. hideCvar { "single"; "staff" }
  1141. mouseEnter
  1142. {
  1143. setitemcolor purpleicon2 forecolor 1 1 1 1
  1144. setitemcolor purpleicon2 bordercolor .66 .66 1 1
  1145. }
  1146. mouseExit
  1147. {
  1148. setitemcolor purpleicon2 forecolor .75 .75 .75 1
  1149. setitemcolor purpleicon2 bordercolor .33 .33 .5 1
  1150. }
  1151. action
  1152. {
  1153. play "sound/interface/choose_blade.wav"
  1154. //uiScript "saber_color"
  1155. setcvar "ui_saber2_color" "purple"
  1156. }
  1157. }
  1158. itemDef
  1159. {
  1160. name yellowicon2
  1161. group sabericons2
  1162. style WINDOW_STYLE_SHADER
  1163. type ITEM_TYPE_BUTTON
  1164. rect 582 170 24 24
  1165. descText @MENUS_COLOR2_DESC
  1166. background "gfx/menus/saber_icon_yellow"
  1167. forecolor .75 .75 .75 1
  1168. border 1
  1169. bordersize 1
  1170. bordercolor .33 .33 .5 1
  1171. visible 1
  1172. cvarTest ui_saber_type
  1173. hideCvar { "single"; "staff" }
  1174. mouseEnter
  1175. {
  1176. setitemcolor yellowicon2 forecolor 1 1 1 1
  1177. setitemcolor yellowicon2 bordercolor .66 .66 1 1
  1178. }
  1179. mouseExit
  1180. {
  1181. setitemcolor yellowicon2 forecolor .75 .75 .75 1
  1182. setitemcolor yellowicon2 bordercolor .33 .33 .5 1
  1183. }
  1184. action
  1185. {
  1186. play "sound/interface/choose_blade.wav"
  1187. //uiScript "saber_color"
  1188. setcvar "ui_saber2_color" "yellow"
  1189. }
  1190. }
  1191. //----------------------------------------------------------------------------------------------
  1192. // SABER COMBAT STYLES
  1193. //----------------------------------------------------------------------------------------------
  1194. itemDef
  1195. {
  1196. name fightingstylebutton0
  1197. group stylebuttons
  1198. text @MENUS_SABERSTYLE
  1199. descText @MENUS_FIGHTINGSTYLE
  1200. type ITEM_TYPE_MULTI
  1201. style WINDOW_STYLE_EMPTY
  1202. rect 240 190 380 24
  1203. font 3
  1204. textscale 1
  1205. textalign ITEM_ALIGN_LEFT
  1206. textstyle 1
  1207. textalignx 0
  1208. textaligny 0
  1209. forecolor .65 .65 1 1
  1210. cvarTest ui_saber_type
  1211. showCvar { "single" }
  1212. cvar "ui_newfightingstyle"
  1213. cvarStrList
  1214. {
  1215. @MENUS_COMBATSTYLEFAST "0"
  1216. @MENUS_COMBATSTYLEMEDIUM "1"
  1217. @MENUS_COMBATSTYLEHEAVY "2"
  1218. }
  1219. visible 1
  1220. }
  1221. itemDef
  1222. {
  1223. name fightingstyle_glow
  1224. group none
  1225. style WINDOW_STYLE_SHADER
  1226. rect 240 190 380 24
  1227. background "gfx/menus/menu_buttonback"
  1228. forecolor 1 1 1 1
  1229. visible 0
  1230. decoration
  1231. }
  1232. //----------------------------------------------------------------------------------------------
  1233. //SABER MODELS
  1234. //----------------------------------------------------------------------------------------------
  1235. //FIRST SABER
  1236. itemDef
  1237. {
  1238. name saber
  1239. group models
  1240. type ITEM_TYPE_MODEL
  1241. //rect 12 -130 615 615
  1242. rect 12 -80 615 615
  1243. asset_model "models/weapons2/saber_1/saber_1.glm"
  1244. isSaber 1
  1245. model_angle 180
  1246. model_rotation 20
  1247. model_g2mins 0 0 0
  1248. model_g2maxs 20 20 20
  1249. model_fovx 75
  1250. model_fovy 75
  1251. visible 1
  1252. decoration
  1253. }
  1254. //SECOND SABER
  1255. itemDef
  1256. {
  1257. name saber2
  1258. group models
  1259. type ITEM_TYPE_MODEL
  1260. rect 12 -50 615 615
  1261. asset_model "models/weapons2/saber_1/saber_1.glm"
  1262. isSaber2 1
  1263. model_angle 180
  1264. model_rotation 20
  1265. model_g2mins 0 0 0
  1266. model_g2maxs 20 20 20
  1267. model_fovx 75
  1268. model_fovy 75
  1269. visible 1
  1270. cvarTest ui_saber_type
  1271. hideCvar { "single" "staff" }
  1272. decoration
  1273. }
  1274. //----------------------------------------------------------------------------------------------
  1275. // OTHER MAIN MENU BUTTONS
  1276. //----------------------------------------------------------------------------------------------
  1277. // BACK button in lower left corner
  1278. itemDef
  1279. {
  1280. name backbutton_glow
  1281. group mods
  1282. style WINDOW_STYLE_SHADER
  1283. rect 59 444 130 24
  1284. background "gfx/menus/menu_buttonback" // Frame around button
  1285. forecolor 1 1 1 1
  1286. visible 0
  1287. decoration
  1288. }
  1289. itemDef
  1290. {
  1291. name backbutton
  1292. group exit
  1293. text @MENUS_BACK
  1294. descText @MENUS_BACKUP_ONE_MENU
  1295. type ITEM_TYPE_BUTTON
  1296. style WINDOW_STYLE_EMPTY
  1297. rect 59 444 130 24
  1298. font 3
  1299. textscale 1.1
  1300. textalign ITEM_ALIGN_CENTER
  1301. textstyle 3
  1302. textalignx 65
  1303. textaligny -1
  1304. forecolor 1 .682 0 1
  1305. visible 1
  1306. cvarTest saber_menu
  1307. showCvar { "0" }
  1308. mouseEnter
  1309. {
  1310. show backbutton_glow
  1311. }
  1312. mouseExit
  1313. {
  1314. hide backbutton_glow
  1315. }
  1316. action
  1317. {
  1318. play "sound/interface/esc.wav"
  1319. close all ;
  1320. open characterMenu
  1321. }
  1322. }
  1323. // EXIT button in lower left corner
  1324. itemDef
  1325. {
  1326. name exitgamebutton_glow
  1327. group mods
  1328. style WINDOW_STYLE_SHADER
  1329. rect 255 444 130 24
  1330. background "gfx/menus/menu_buttonback"
  1331. forecolor 1 1 1 1
  1332. visible 0
  1333. decoration
  1334. }
  1335. itemDef
  1336. {
  1337. name exitgamebutton
  1338. group exit
  1339. text @MENUS_EXIT
  1340. descText @MENUS_JEDI_KNIGHT_II
  1341. type ITEM_TYPE_BUTTON
  1342. style WINDOW_STYLE_EMPTY
  1343. rect 255 444 130 24
  1344. font 3
  1345. textscale 1.1
  1346. textalign ITEM_ALIGN_CENTER
  1347. textstyle 3
  1348. textalignx 65
  1349. textaligny -1
  1350. forecolor 1 .682 0 1
  1351. visible 1
  1352. cvarTest saber_menu
  1353. showCvar { "0" }
  1354. mouseEnter
  1355. {
  1356. show exitgamebutton_glow
  1357. }
  1358. mouseExit
  1359. {
  1360. hide exitgamebutton_glow
  1361. }
  1362. action
  1363. {
  1364. play "sound/weapons/saber/saberoff.mp3"
  1365. uiScript "updatesabercvars"
  1366. close all
  1367. open quitMenu
  1368. }
  1369. }
  1370. //BEGIN GAME BUTTON
  1371. itemDef
  1372. {
  1373. name begingamebutton_glow
  1374. group mods
  1375. style WINDOW_STYLE_SHADER
  1376. rect 455 444 130 24
  1377. background "gfx/menus/menu_buttonback"
  1378. forecolor 1 1 1 1
  1379. visible 0
  1380. decoration
  1381. }
  1382. itemDef
  1383. {
  1384. name newgame_begin
  1385. group none
  1386. text @MENUS_BEGIN_GAME
  1387. descText @MENUS_START_JEDI_KNIGHT_III
  1388. type ITEM_TYPE_BUTTON
  1389. style WINDOW_STYLE_EMPTY
  1390. rect 455 444 130 24
  1391. font 3
  1392. textscale 1
  1393. textalignx 65
  1394. textaligny -1
  1395. textalign ITEM_ALIGN_CENTER
  1396. textstyle 3
  1397. forecolor 1 .682 0 1
  1398. visible 1
  1399. cvarTest saber_menu
  1400. showCvar { "0" }
  1401. action
  1402. {
  1403. uiScript "updatesabercvars"
  1404. uiScript "updatefightingstyle"
  1405. open demo_GotoTier
  1406. }
  1407. mouseEnter
  1408. {
  1409. show begingamebutton_glow
  1410. }
  1411. mouseExit
  1412. {
  1413. hide begingamebutton_glow
  1414. }
  1415. }
  1416. }
  1417. }