ingamesave.menu 13 KB

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