ingameload.menu 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. //----------------------------------------------------------------------------------------------
  2. // INGAME MAIN MENU
  3. //
  4. // Allows user to load from saved games. Called from in game main menu.
  5. //----------------------------------------------------------------------------------------------
  6. {
  7. menuDef
  8. {
  9. // ***IMPORTANT*** This name can not change, code looks for it.
  10. // If it must change, change it in UI_AdjustSaveGameListBox() also
  11. //
  12. name "ingameloadMenu"
  13. fullScreen 1 // MENU_TRUE
  14. rect 0 0 640 480 // Size and position of the menu
  15. visible 1 // Visible on open
  16. focusColor 1 1 1 1 // Focus color for text and items
  17. descX 320
  18. descY 426
  19. descScale 1
  20. descColor 1 .682 0 .8
  21. descAlignment ITEM_ALIGN_CENTER
  22. disablecolor .5 .5 .5 1
  23. onOpen
  24. {
  25. uiScript ReadSaveDirectory
  26. }
  27. onESC
  28. {
  29. play "sound/interface/esc.wav"
  30. uiScript closeingame // Close menu
  31. }
  32. //----------------------------------------------------------------------------------------------
  33. // MENU BACKGROUND
  34. //----------------------------------------------------------------------------------------------
  35. itemDef
  36. {
  37. name really_background
  38. group none
  39. style WINDOW_STYLE_SHADER
  40. rect 156 154 320 240
  41. background "gfx/menus/main_centerblue"
  42. forecolor 1 1 1 1
  43. visible 1
  44. decoration
  45. }
  46. itemDef
  47. {
  48. name background_text
  49. group none
  50. style WINDOW_STYLE_SHADER
  51. rect 0 0 160 480
  52. background "gfx/menus/menu_side_text"
  53. forecolor 1 1 1 1
  54. visible 1
  55. decoration
  56. }
  57. itemDef
  58. {
  59. name background_text_b
  60. group none
  61. style WINDOW_STYLE_SHADER
  62. rect 480 0 160 480
  63. background "gfx/menus/menu_side_text_right"
  64. forecolor 1 1 1 1
  65. visible 1
  66. decoration
  67. }
  68. itemDef
  69. {
  70. name background
  71. group none
  72. style WINDOW_STYLE_SHADER
  73. rect 0 0 640 480
  74. background "gfx/menus/main_background"
  75. forecolor 1 1 1 1
  76. visible 1
  77. decoration
  78. }
  79. itemDef
  80. {
  81. name starwars
  82. group none
  83. style WINDOW_STYLE_SHADER
  84. rect 107 8 428 112
  85. background "gfx/menus/jediacademy"
  86. forecolor 1 1 1 1
  87. visible 1
  88. decoration
  89. }
  90. itemDef
  91. {
  92. name left_frame
  93. group lf_fr
  94. style WINDOW_STYLE_SHADER
  95. rect 0 50 320 160
  96. background "gfx/menus/menu_boxes_left"
  97. forecolor 1 1 1 1
  98. visible 1
  99. decoration
  100. }
  101. itemDef
  102. {
  103. name right_frame
  104. group rt_fr
  105. style WINDOW_STYLE_SHADER
  106. rect 320 50 320 160
  107. background "gfx/menus/menu_boxes_right"
  108. forecolor 1 1 1 1
  109. visible 1
  110. decoration
  111. }
  112. //----------------------------------------------------------------------------------------------
  113. // TOP MENU BUTTONS
  114. //----------------------------------------------------------------------------------------------
  115. // Big button "SAVE"
  116. itemDef
  117. {
  118. name savegamebutton_glow
  119. group mods
  120. style WINDOW_STYLE_SHADER
  121. rect 7 126 130 24
  122. background "gfx/menus/menu_buttonback" // Frame around button
  123. forecolor 1 1 1 1
  124. visible 0
  125. decoration
  126. }
  127. itemDef
  128. {
  129. name savegamebutton
  130. group nbut
  131. text @MENUS_SAVE
  132. descText @MENUS_SAVE_CURRENT_GAME
  133. style WINDOW_STYLE_EMPTY
  134. type ITEM_TYPE_BUTTON
  135. rect 7 126 130 24
  136. textaligny 0
  137. font 3
  138. textscale 1.1
  139. textalign ITEM_ALIGN_CENTER
  140. textstyle 1
  141. textalignx 65
  142. forecolor 1 .682 0 1
  143. visible 1
  144. mouseEnter
  145. {
  146. show savegamebutton_glow
  147. }
  148. mouseExit
  149. {
  150. hide savegamebutton_glow
  151. }
  152. action
  153. {
  154. play "sound/interface/button1.wav" ;
  155. close all ;
  156. open ingamesaveMenu
  157. }
  158. }
  159. // Big button "LOAD"
  160. itemDef
  161. {
  162. name loadgamebutton
  163. group lbut
  164. text @MENUS_LOAD
  165. descText @MENUS_LOAD_A_SAVED_GAME
  166. style WINDOW_STYLE_EMPTY
  167. type ITEM_TYPE_BUTTON
  168. rect 170 126 130 24
  169. textaligny 0
  170. font 3
  171. textscale 1.1
  172. textalign ITEM_ALIGN_CENTER
  173. textstyle 1
  174. textalignx 65
  175. forecolor 1 1 1 1
  176. visible 1
  177. decoration
  178. }
  179. // Big button "CONTROLS"
  180. itemDef
  181. {
  182. name controlsbutton_glow
  183. group none
  184. style WINDOW_STYLE_SHADER
  185. rect 340 126 130 24
  186. background "gfx/menus/menu_buttonback"
  187. forecolor 1 1 1 1
  188. visible 0
  189. decoration
  190. }
  191. itemDef {
  192. name controlsbutton
  193. group cbut
  194. text @MENUS_CONTROLS
  195. descText @MENUS_CONFIGURE_GAME_CONTROLS
  196. type ITEM_TYPE_BUTTON
  197. style WINDOW_STYLE_EMPTY
  198. rect 340 126 130 24
  199. font 3
  200. textscale 1.1
  201. textaligny 0
  202. textalign ITEM_ALIGN_CENTER
  203. textstyle 1
  204. textalignx 65
  205. backcolor 0 0 0 0
  206. forecolor 1 .682 0 1
  207. visible 1
  208. mouseEnter
  209. {
  210. show controlsbutton_glow
  211. }
  212. mouseExit
  213. {
  214. hide controlsbutton_glow
  215. }
  216. action
  217. {
  218. play "sound/interface/button1.wav" ;
  219. close all ;
  220. open ingamecontrolsMenu ;
  221. }
  222. }
  223. // Big button "SETUP"
  224. itemDef
  225. {
  226. name setupbutton_glow
  227. group none
  228. style WINDOW_STYLE_SHADER
  229. rect 502 126 130 24
  230. background "gfx/menus/menu_buttonback"
  231. forecolor 1 1 1 1
  232. visible 0
  233. decoration
  234. }
  235. itemDef
  236. {
  237. name setupbutton
  238. group sbut
  239. text @MENUS_SETUP
  240. descText @MENUS_CONFIGURE_GAME_SETTINGS
  241. type ITEM_TYPE_BUTTON
  242. style WINDOW_STYLE_EMPTY
  243. rect 502 126 130 24
  244. font 3
  245. textscale 1.1
  246. textaligny 0
  247. textalign ITEM_ALIGN_CENTER
  248. textstyle 1
  249. textalignx 65
  250. backcolor 0 0 0 0
  251. forecolor 1 .682 0 1
  252. visible 1
  253. mouseEnter
  254. {
  255. show setupbutton_glow
  256. }
  257. mouseExit
  258. {
  259. hide setupbutton_glow
  260. }
  261. action
  262. {
  263. play "sound/interface/button1.wav" ;
  264. close all ;
  265. open ingamesetupMenu ;
  266. }
  267. }
  268. //----------------------------------------------------------------------------------------------
  269. // OTHER MAIN MENU BUTTONS
  270. //----------------------------------------------------------------------------------------------
  271. // BACK button in lower left corner
  272. itemDef
  273. {
  274. name backbutton_glow
  275. group mods
  276. style WINDOW_STYLE_SHADER
  277. rect 59 444 130 24
  278. background "gfx/menus/menu_buttonback" // Frame around button
  279. forecolor 1 1 1 1
  280. visible 0
  281. decoration
  282. }
  283. itemDef
  284. {
  285. name backbutton
  286. group exit
  287. text @MENUS_BACK
  288. descText @MENUS_BACKTOMAIN
  289. type ITEM_TYPE_BUTTON
  290. style WINDOW_STYLE_EMPTY
  291. rect 59 444 130 24
  292. font 3
  293. textscale 1.1
  294. textalign ITEM_ALIGN_CENTER
  295. textstyle 3
  296. textalignx 65
  297. textaligny -1
  298. forecolor 1 .682 0 1
  299. visible 1
  300. cvartest ui_missionfailed
  301. hidecvar
  302. {
  303. "1"
  304. }
  305. mouseEnter
  306. {
  307. show backbutton_glow
  308. }
  309. mouseExit
  310. {
  311. hide backbutton_glow
  312. }
  313. action
  314. {
  315. play "sound/interface/esc.wav"
  316. close all ;
  317. open ingamemainMenu
  318. }
  319. }
  320. // Only displayed when the mission failure screen is up
  321. itemDef
  322. {
  323. name backbutton
  324. group exit
  325. text @MENUS_BACK
  326. descText @MENUS_BACKTOMAIN
  327. type ITEM_TYPE_BUTTON
  328. style WINDOW_STYLE_EMPTY
  329. rect 59 444 130 24
  330. font 3
  331. textscale 1.1
  332. textalign ITEM_ALIGN_CENTER
  333. textstyle 3
  334. textalignx 65
  335. textaligny -1
  336. forecolor 1 .682 0 1
  337. visible 1
  338. cvartest ui_missionfailed
  339. showcvar
  340. {
  341. "1"
  342. }
  343. mouseEnter
  344. {
  345. show backbutton_glow
  346. }
  347. mouseExit
  348. {
  349. hide backbutton_glow
  350. }
  351. action
  352. {
  353. play "sound/interface/esc.wav"
  354. close all ;
  355. open missionfailed_menu
  356. }
  357. }
  358. // EXIT button in lower left corner
  359. itemDef
  360. {
  361. name exitgamebutton_glow
  362. group mods
  363. style WINDOW_STYLE_SHADER
  364. rect 255 444 130 24
  365. background "gfx/menus/menu_buttonback" // Frame around button
  366. forecolor 1 1 1 1
  367. visible 0
  368. decoration
  369. }
  370. itemDef
  371. {
  372. name exitgamebutton
  373. group exit
  374. text @MENUS_EXIT
  375. descText @MENUS_JEDI_KNIGHT_II
  376. type ITEM_TYPE_BUTTON
  377. style WINDOW_STYLE_EMPTY
  378. rect 255 444 130 24
  379. font 3
  380. textscale 1.1
  381. textalign ITEM_ALIGN_CENTER
  382. textstyle 3
  383. textalignx 65
  384. textaligny -1
  385. forecolor 1 .682 0 1
  386. visible 1
  387. mouseEnter
  388. {
  389. show exitgamebutton_glow
  390. }
  391. mouseExit
  392. {
  393. hide exitgamebutton_glow
  394. }
  395. action
  396. {
  397. play "sound/weapons/saber/saberoff.mp3";
  398. close all ;
  399. open ingamequitMenu
  400. }
  401. }
  402. // RESUME button in the lower right corner
  403. itemDef
  404. {
  405. name resumebutton_glow
  406. group mods
  407. style WINDOW_STYLE_SHADER
  408. rect 455 444 130 24
  409. background "gfx/menus/menu_buttonback" // Frame around button
  410. forecolor 1 1 1 1
  411. visible 0
  412. decoration
  413. }
  414. itemDef
  415. {
  416. name resume
  417. group none
  418. style WINDOW_STYLE_EMPTY
  419. type ITEM_TYPE_BUTTON
  420. rect 455 444 130 24
  421. text @MENUS_RESUME
  422. descText @MENUS_RESUME_CURRENT_GAME
  423. font 3
  424. textscale 1
  425. textalign ITEM_ALIGN_CENTER
  426. textstyle 3
  427. textalignx 65
  428. textaligny -1
  429. forecolor 1 .682 0 1
  430. visible 1
  431. mouseEnter
  432. {
  433. show resumebutton_glow
  434. }
  435. mouseExit
  436. {
  437. hide resumebutton_glow
  438. }
  439. action
  440. {
  441. play "sound/interface/button1.wav" ;
  442. uiScript closeingame // Close menu
  443. }
  444. }
  445. //----------------------------------------------------------------------------------------------
  446. // LOAD GAME MENU specific stuff
  447. //----------------------------------------------------------------------------------------------
  448. // Load Game title
  449. itemDef
  450. {
  451. name loadgame_title
  452. group title
  453. style WINDOW_STYLE_SHADER
  454. background "gfx/menus/menu_blendbox"
  455. text @MENUS_LOAD_GAME
  456. rect 100 164 440 16
  457. font 3
  458. textscale 0.7
  459. textalign ITEM_ALIGN_CENTER
  460. textalignx 225
  461. textaligny -1
  462. forecolor .549 .854 1 1
  463. visible 1
  464. decoration
  465. }
  466. itemDef
  467. {
  468. // ***IMPORTANT*** This name can not change, code looks for it.
  469. // If it must change, change it in UI_AdjustSaveGameListBox() also
  470. //
  471. name loadgamelist
  472. group loadscreen
  473. rect 40 200 360 190
  474. type ITEM_TYPE_LISTBOX
  475. style WINDOW_STYLE_FILLED
  476. elementwidth 120
  477. elementheight 16
  478. font 2
  479. textaligny 8
  480. textscale 0.7
  481. border 1
  482. bordersize 1
  483. bordercolor 0 0 .8 1
  484. forecolor .615 .615 .956 1
  485. backcolor 0 0 .5 .25
  486. outlinecolor .5 .5 .5 .5
  487. elementtype LISTBOX_TEXT
  488. feeder FEEDER_SAVEGAMES
  489. notselectable
  490. visible 1
  491. columns 2 2 55 150 155 0 200 //#of col., x loc. of 1st column, 2 number doesn't seem to do anything, third is width of column
  492. mouseEnter
  493. {
  494. setitemcolor loadgamelist bordercolor 1 1 1 1
  495. }
  496. mouseExit
  497. {
  498. setitemcolor loadgamelist bordercolor 0 0 .8 1
  499. }
  500. doubleclick
  501. {
  502. play sound/interface/button1.wav
  503. uiScript loadgame
  504. }
  505. action
  506. {
  507. play sound/interface/sub_select
  508. }
  509. }
  510. itemDef
  511. {
  512. name loadgamepic
  513. group loadscreen
  514. style WINDOW_STYLE_EMPTY
  515. ownerdraw 236 //UI_ALLMAPS_SELECTION
  516. font 2
  517. textscale .8
  518. // forecolor 1 1 1 1
  519. forecolor .549 .854 1 1
  520. rect 435 200 180 135
  521. border 1
  522. bordercolor 0 0 .8 1
  523. visible 1
  524. }
  525. // loadgame button
  526. itemDef
  527. {
  528. name loadgameaction_glow
  529. group glow
  530. style WINDOW_STYLE_SHADER
  531. rect 440 360 190 20
  532. background "gfx/menus/menu_blendbox2" // Frame around button
  533. forecolor 1 1 1 1
  534. visible 0
  535. decoration
  536. }
  537. itemDef
  538. {
  539. name loadgameaction
  540. group actionbutton
  541. text @MENUS_LOAD_GAME
  542. descText @MENUS_LOAD_CHOSEN_GAME
  543. type ITEM_TYPE_BUTTON
  544. style WINDOW_STYLE_EMPTY
  545. rect 440 360 175 25
  546. font 3
  547. textscale 0.8
  548. textalignx 175
  549. textaligny 1
  550. textalign ITEM_ALIGN_RIGHT
  551. textstyle 1
  552. forecolor 1 .682 0 1
  553. visible 1
  554. cvarTest ui_SelectionOK
  555. enableCvar { "1" }
  556. mouseEnter
  557. {
  558. show loadgameaction_glow
  559. }
  560. mouseExit
  561. {
  562. hide loadgameaction_glow
  563. }
  564. action
  565. {
  566. play sound/interface/button1.wav ;
  567. hide glow ;
  568. uiScript loadgame
  569. }
  570. }
  571. // deletegame button
  572. itemDef
  573. {
  574. name deletegameaction_glow
  575. group glow
  576. style WINDOW_STYLE_SHADER
  577. rect 440 385 190 20
  578. background "gfx/menus/menu_blendbox2" // Frame around button
  579. forecolor 1 1 1 1
  580. visible 0
  581. decoration
  582. }
  583. itemDef
  584. {
  585. name deletegamebutton
  586. group actionbutton
  587. text @MENUS_DELETE_GAME
  588. descText @MENUS_DELETE_CHOSEN_GAME
  589. type ITEM_TYPE_BUTTON
  590. style WINDOW_STYLE_EMPTY
  591. rect 440 385 175 25
  592. font 3
  593. textscale 0.8
  594. textalignx 175
  595. textaligny 1
  596. textalign ITEM_ALIGN_RIGHT
  597. textstyle 1
  598. forecolor 1 .682 0 1
  599. visible 1
  600. cvarTest ui_SelectionOK
  601. enableCvar { "1" }
  602. mouseEnter
  603. {
  604. show deletegameaction_glow
  605. }
  606. mouseExit
  607. {
  608. hide deletegameaction_glow
  609. }
  610. action
  611. {
  612. play sound/interface/button1.wav ;
  613. hide glow ;
  614. uiScript deletegame
  615. }
  616. }
  617. // resumegame button
  618. itemDef
  619. {
  620. name resumegameaction_glow
  621. group glow
  622. style WINDOW_STYLE_SHADER
  623. rect 440 410 190 20
  624. background "gfx/menus/menu_blendbox2" // Frame around button
  625. forecolor 1 1 1 1
  626. visible 0
  627. decoration
  628. }
  629. itemDef
  630. {
  631. name resumeautobutton
  632. group actionbutton
  633. text @MENUS_RESUME_MISSION
  634. descText @MENUS_RESUME_LAST_MISSION_ENTERED
  635. type ITEM_TYPE_BUTTON
  636. style WINDOW_STYLE_EMPTY
  637. rect 440 410 175 25
  638. font 3
  639. textscale 0.8
  640. textalignx 175
  641. textaligny 1
  642. textalign ITEM_ALIGN_RIGHT
  643. textstyle 1
  644. forecolor 1 .682 0 1
  645. visible 1 // This button isn't used when not in game.
  646. cvarTest ui_ResumeOK
  647. enableCvar { "1" }
  648. mouseEnter
  649. {
  650. show resumegameaction_glow
  651. }
  652. mouseExit
  653. {
  654. hide resumegameaction_glow
  655. }
  656. action
  657. {
  658. play "sound/interface/button1.wav" ;
  659. hide glow ;
  660. uiScript loadAuto
  661. }
  662. }
  663. }
  664. }