loadgame.menu 13 KB

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