sr2lua/mission_replay.lua

  1. ----------------------- 
  2. --  MISSION REPLAY   -- 
  3. ----------------------- 
  4.  
  5. MISSION_REPLAY_SWATCH_HEIGHT = 125 
  6. MISSION_REPLAY_SWATCH_WIDTH = 190 
  7. MISSION_REPLAY_SWATCH_COLS = 4 
  8. MISSION_REPLAY_SWATCH_HL_SCALE = 1 
  9. MISSION_REPLAY_SWATCH_UHL_SCALE = .8 
  10.  
  11. Mission_replay_building_menu = 0 
  12.  
  13. Mission_replay_loaded_pegs = { } 
  14. Mission_replay_clip_peg = 0 
  15. Mission_replay_gang_peg = 0 
  16.  
  17. Mission_replay_input_subs = { } 
  18.  
  19. Mission_replay = { handles = {}, } 
  20.  
  21. Mission_replay_cur_swatch = 0 
  22.  
  23. ---------------------- 
  24. --	SYSTEM FUNCTIONS -- 
  25. ---------------------- 
  26.  
  27. --	Initialize the menu 
  28. function mission_replay_init() 
  29. 	Menu_swap_center = true			--Change menubase to use center swappin	g style 
  30. 	 
  31. 	Mission_replay.handles.mission_details_slide_in = vint_object_find("mission_details_slide_in") 
  32. 	Mission_replay.handles.mission_details_slide_out = vint_object_find("mission_details_slide_out") 
  33. 	 
  34. 	--check marks for the completion strings 
  35. 	Mission_replay.handles.mission_check_sp = vint_object_find("mission_check_sp") 
  36. 	Mission_replay.handles.mission_check_coop = vint_object_find("mission_check_coop") 
  37. 	 
  38. 	vint_set_property(Mission_replay.handles.mission_details_slide_in, "is_paused", true) 
  39. 	vint_set_property(Mission_replay.handles.mission_details_slide_out, "is_paused", true) 
  40. 	 
  41. 	--Event Tracking 
  42. 	event_tracking_interface_enter("Mission Replay") 
  43. 	 
  44. 	menu_store_use_hud(false) 
  45. 	menu_init() 
  46. 	Menu_active_anchor_end_x, Menu_active_anchor_end_y = vint_get_property(vint_object_find("menu_center"), "anchor") 
  47. 	menu_horz_init(Mission_replay_horz) 
  48. 	interface_effect_begin("pause") 
  49. end 
  50.  
  51. -- Shutdown and cleanup the menu 
  52. function mission_replay_cleanup() 
  53. 	for k, v in Mission_replay_loaded_pegs do 
  54. 		peg_unload(k) 
  55. 	end 
  56. 	interface_effect_end() 
  57. end 
  58.  
  59. function mission_replay_exit() 
  60. 	dialog_box_confirmation("MENU_TITLE_WARNING", "STORE_EXIT_CLIPBOARD", "mission_replay_exit_confirm") 
  61. end 
  62.  
  63. function mission_replay_exit_confirm(result, action) 
  64. 	if action == DIALOG_ACTION_CLOSE and result == 0 then 
  65. 		menu_close(mission_replay_exit_final) 
  66. 	end 
  67. end 
  68.  
  69. function mission_replay_exit_final() 
  70. 	mission_replay_unload_details() 
  71. 	vint_document_unload(vint_document_find("mission_replay"))	 
  72. end 
  73.  
  74. ------------------------ 
  75. --	MENU FUNCTIONALITY -- 
  76. ------------------------ 
  77.  
  78. -- Scroll bar 
  79.  
  80. Mission_replay_scroll_data = 0 
  81. Mission_replay_text_clip_height = 0 
  82. Mission_replay_story_text_height = 0 
  83. Mission_replay_story_text_pos = 0 
  84.  
  85. function mission_replay_scroll_bar_init(bar_grp) 
  86. 	vint_set_property(bar_grp, "visible", false) 
  87. 	 
  88. 	local scroll_data = { 
  89. 		visible =			false, 
  90. 		bar_grp =			bar_grp, 
  91. 		bg_n_h =			vint_object_find("menu_scroll_bg_n", bar_grp), 
  92. 		bg_c_h =			vint_object_find("menu_scroll_bg_c", bar_grp), 
  93. 		bg_s_h =			vint_object_find("menu_scroll_bg_s", bar_grp), 
  94. 		thumb_n_h =			vint_object_find("menu_scroll_thumb_n", bar_grp), 
  95. 		thumb_s_h =			vint_object_find("menu_scroll_thumb_s", bar_grp), 
  96. 		thumb_blend_h =		vint_object_find("menu_scroll_thumb_blend", bar_grp), 
  97. 		thumb_pos =			0, 
  98. 		bar_height =		332, 
  99. 		thumb_height =		332, 
  100. 	} 
  101.  
  102. 	return scroll_data 
  103. end 
  104.  
  105. function mission_replay_scroll_bar_update(scroll_data) 
  106. 	if scroll_data.visible == false then 
  107. 		return 
  108. 	end 
  109.  
  110. 	-- update the thumb pos 
  111. 	local thumb_offset = scroll_data.thumb_pos * scroll_data.bar_height + 10 
  112. 	 
  113. 	if thumb_offset > scroll_data.bar_height - 50 then 
  114. 		thumb_offset = scroll_data.bar_height - 50 
  115. 	end 
  116. 	 
  117. 	vint_set_property(scroll_data.thumb_n_h,		"anchor", 3, thumb_offset) 
  118. 	vint_set_property(scroll_data.thumb_s_h,		"anchor", 3, thumb_offset + scroll_data.thumb_height - 20) --Magic Number represents the offset from the thumb height 
  119. 	vint_set_property(scroll_data.thumb_blend_h,	"anchor", 3, thumb_offset + scroll_data.thumb_height - 63) --Magic Number represents the offset from the thumb height 
  120. end 
  121.  
  122. function mission_replay_scroll_bar_show(scroll_data) 
  123. 	vint_set_property(scroll_data.bar_grp, "visible", true) 
  124. 	scroll_data.visible = true 
  125. end 
  126.  
  127. function mission_replay_scroll_bar_set_bar_height(scroll_data, new_height) 
  128. 	--This magic number will allow you to change the base height of the scrollbar 
  129. 	scroll_data.bar_height = new_height - 54 
  130.  
  131. 	vint_set_property(scroll_data.bg_s_h, "anchor", 38, new_height - 10) 
  132. 	vint_set_property(scroll_data.bg_c_h, "source_se", 10, new_height - 28) 
  133.  
  134. 	menu_scroll_bar_update(scroll_data) 
  135. end 
  136.  
  137. function mission_replay_scroll_bar_set_thumb_size(scroll_data, height) 
  138. 	scroll_data.thumb_height = height * scroll_data.bar_height 
  139. 	 
  140. 	if scroll_data.thumb_height < 60 then 
  141. 		scroll_data.thumb_height = 60 
  142. 	end 
  143. 	 
  144. 	vint_set_property(scroll_data.thumb_n_h, "source_se", 32, scroll_data.thumb_height - 20) 
  145. 	menu_scroll_bar_update(scroll_data) 
  146. end 
  147.  
  148. function mission_replay_scroll_bar_set_thumb_pos(scroll_data, value) 
  149. 	if scroll_data.thumb_pos ~= value then 
  150. 		scroll_data.thumb_pos = value 
  151. 		menu_scroll_bar_update(scroll_data) 
  152. 	end 
  153. end 
  154.  
  155. function mission_replay_scroll_bar_hide(scroll_data) 
  156. 	vint_set_property(scroll_data.bar_grp, "visible", false) 
  157. 	scroll_data.visible = false 
  158. end 
  159.  
  160. -- support 
  161.  
  162. function mission_replay_load_peg(peg_name) 
  163. 	peg_load(peg_name) 
  164. 	Mission_replay_loaded_pegs[peg_name] = true 
  165. end 
  166.  
  167. function mission_replay_unload_peg(peg_name) 
  168. 	peg_unload(peg_name) 
  169. 	Mission_replay_loaded_pegs[peg_name] = nil 
  170. end 
  171.  
  172. function mission_detail_replay_response(success) 
  173. 	if success == true then 
  174. 		vint_set_property(vint_object_find("mission_details"), "visible", false) 
  175. 		 
  176. 		menu_close(mission_replay_exit_final) 
  177. 	end 
  178. end 
  179.  
  180. -- swatches 
  181.  
  182. function mission_replay_mission_select() 
  183. 	local swatches = Menu_active[0].swatches 
  184. 	local swatch = swatches[Menu_active[0].cur_idx] 
  185. 	 
  186. 	if swatch.is_unlocked ~= true then 
  187. 		return 
  188. 	end 
  189. 	 
  190. 	--Hide swatch controls 
  191. 	vint_set_property(Menu_option_labels.control_parent, "visible", false) 
  192. 	 
  193. 	local detail_frame = vint_object_find("mission_details") 
  194. 	vint_set_property(vint_object_find("display_line_1", detail_frame), "text_tag", swatch.display_line_1) 
  195. 	vint_set_property(vint_object_find("display_line_2", detail_frame), "text_tag", swatch.display_line_2) 
  196. 	vint_set_property(vint_object_find("gang_name", detail_frame), "text_tag", swatch.gang_name) 
  197. 	 
  198. 	Mission_replay_clip_peg = "ui_c_news_"..swatch.internal_name 
  199. 	mission_replay_load_peg(Mission_replay_clip_peg) 
  200. 	 
  201. 	vint_set_property(vint_object_find("clipping", detail_frame), "image", "ui_ct_news_"..swatch.internal_name) 
  202. 	vint_set_property(vint_object_find("clipping", detail_frame), "scale", 0.75, 0.75) 
  203. 	 
  204. 	Mission_replay_gang_peg = "ui_crib_news_image_"..swatch.gang_code 
  205. 	mission_replay_load_peg(Mission_replay_gang_peg) 
  206.  
  207. 	vint_set_property(vint_object_find("gang_watermark", detail_frame), "image", "ui_crib_news_img_"..swatch.gang_code..".tga") 
  208. 	 
  209. 	local story_text = vint_object_find("story_text", detail_frame) 
  210. 	vint_set_property(story_text, "text_tag", swatch.internal_name.."_HEADLINE_TEXT") 
  211. 	vint_set_property(story_text, "offset", 0, 0) 
  212. 	 
  213. 	vint_set_property(vint_object_find("mission_check_coop", detail_frame), "visible", swatch.coop_complete == true) 
  214. 	 
  215. 	local dummy 
  216. 	dummy, Mission_replay_story_text_height = element_get_actual_size(story_text) 
  217. 	dummy, Mission_replay_text_clip_height = vint_get_property(vint_object_find("story_clip"), "clip_size") 
  218. 	Mission_replay_scroll_data = mission_replay_scroll_bar_init(vint_object_find("replay_scroll_bar")) 
  219. 	Mission_replay_story_text_pos = 0 
  220. 	 
  221. 	if Mission_replay_story_text_height > Mission_replay_text_clip_height then 
  222. 		mission_replay_scroll_bar_show(Mission_replay_scroll_data) 
  223. 		mission_replay_scroll_bar_set_bar_height(Mission_replay_scroll_data, Mission_replay_text_clip_height + 15) 
  224. 		mission_replay_scroll_bar_set_thumb_size(Mission_replay_scroll_data, Mission_replay_text_clip_height / Mission_replay_story_text_height) 
  225. 	end 
  226. 	 
  227. 	Menu_active.btn_tips = Mission_replay_details_btn_tips 
  228. 	btn_tips_update() 
  229. 		 
  230. 	local subs_h = vint_subscribe_to_input_event(nil, "select", "mission_replay_detail_input", 500) 
  231. 	Mission_replay_input_subs[subs_h] = true 
  232. 	subs_h = vint_subscribe_to_input_event(nil, "back", "mission_replay_detail_input", 500) 
  233. 	Mission_replay_input_subs[subs_h] = true 
  234. 	subs_h = vint_subscribe_to_input_event(nil, "nav_up", "mission_replay_detail_input", 500) 
  235. 	Mission_replay_input_subs[subs_h] = true 
  236. 	subs_h = vint_subscribe_to_input_event(nil, "nav_down", "mission_replay_detail_input", 500) 
  237. 	Mission_replay_input_subs[subs_h] = true 
  238. 	subs_h = vint_subscribe_to_input_event(nil, "pause", "mission_replay_detail_input", 500) 
  239. 	Mission_replay_input_subs[subs_h] = true 
  240.  
  241. 	subs_h = vint_subscribe_to_input_event(nil, "all_unassigned", "mission_replay_detail_input", 500) 
  242. 	Mission_replay_input_subs[subs_h] = true 
  243. 	 
  244. 	vint_set_property(detail_frame, "visible", true) 
  245. 	 
  246. 	lua_play_anim(Mission_replay.handles.mission_details_slide_in) 
  247. 	 
  248. 	--Hide triggers 
  249. 	mission_replay_menu_triggers_show(false) 
  250. end 
  251.  
  252. function mission_replay_mission_nav() 
  253. end 
  254.  
  255. function mission_replay_mission_enter(swatch) 
  256. 	-- select the thumbnail, make it bright 
  257. 	vint_set_property(swatch.txt_grp, "visible", true) 
  258. 	vint_set_property(vint_object_find("clipping", swatch.swatch_h), "tint", 1, 1, 1) 
  259. 	Mission_replay_cur_swatch = swatch 
  260. end 
  261.  
  262. function mission_replay_mission_leave(swatch) 
  263. 	-- unselect the thumbnail, tint it dark 
  264. 	vint_set_property(swatch.txt_grp, "visible", false) 
  265. 	vint_set_property(vint_object_find("clipping", swatch.swatch_h), "tint", 0.5, 0.5, 0.5) 
  266. end 
  267.  
  268. function mission_replay_update_swatch(swatch, row, col) 
  269. 	-- update newspaper icon 
  270. 	local clipping = vint_object_find("clipping", swatch.swatch_h) 
  271. 	 
  272. 	if swatch.is_unlocked == false then 
  273. 		vint_set_property(clipping, "image", "ui_crib_news_locked_t") 
  274. 	else 
  275. 		vint_set_property(clipping, "image", "ui_crib_news_"..swatch.internal_name.."_t") 
  276. 	end 
  277. 	 
  278. 	vint_set_property(clipping, "rotation", rand_float(-0.075, 0.075)) 
  279. 	vint_set_property(clipping, "scale", 1.5, 1.5) 
  280. 	 
  281. 	local visible_text, hidden_text 
  282. 	if col < 2 then 
  283. 		visible_text = vint_object_find("right_text", swatch.swatch_h) 
  284. 		hidden_text = vint_object_find("left_text", swatch.swatch_h) 
  285. 	else 
  286. 		hidden_text = vint_object_find("right_text", swatch.swatch_h) 
  287. 		visible_text = vint_object_find("left_text", swatch.swatch_h) 
  288. 	end 
  289. 	 
  290. 	vint_set_property(hidden_text, "visible", false) 
  291. 	vint_set_property(visible_text, "visible", false) 
  292. 	 
  293. 	vint_set_property(vint_object_find("locked", swatch.swatch_h), "visible", swatch.is_unlocked == false) 
  294. 	vint_set_property(vint_object_find("locked_coop", swatch.swatch_h), "visible", swatch.buddy_complete == false) 
  295. 	 
  296. 	swatch.txt_grp = visible_text 
  297. 	 
  298. 	vint_set_property(vint_object_find("display_line_1", visible_text), "text_tag", swatch.display_line_1) 
  299. 	vint_set_property(vint_object_find("display_line_2", visible_text), "text_tag", swatch.display_line_2) 
  300. 	vint_set_property(vint_object_find("gang_name", visible_text), "text_tag", swatch.gang_name) 
  301. end 
  302.  
  303. function mission_replay_consume_data(internal_name, display_line_1, display_line_2, gang_name, gang_code, is_unlocked, is_mission, coop_complete, buddy_complete) 
  304. 	local item = { 
  305. 		type = MENU_ITEM_TYPE_SELECTABLE, 
  306. 		internal_name = internal_name, 
  307. 		display_line_1 = display_line_1, 
  308. 		display_line_2 = display_line_2, 
  309. 		is_unlocked = is_unlocked, 
  310. 		coop_complete = coop_complete, 
  311. 		buddy_complete = buddy_complete, 
  312. 		gang_name = gang_name, 
  313. 		gang_code = gang_code, 
  314. 		is_mission = is_mission, 
  315. 		on_select = mission_replay_mission_select, 
  316. 	} 
  317.  
  318. 	local swatches = Mission_replay_building_menu[0].swatches 
  319. 	swatches[swatches.num_swatches] = item 
  320. 	swatches.num_swatches = swatches.num_swatches + 1 
  321. end 
  322.  
  323. function mission_replay_mission_show(menu_data) 
  324. 	-- load relavent peg 
  325. 	mission_replay_load_peg(menu_data.peg) 
  326. 	 
  327. 	-- build swatch list 
  328. 	local menu_item = menu_data[0] 
  329.  
  330. 	menu_item.swatches = { num_swatches = 0 } 
  331. 	Mission_replay_building_menu = menu_data 
  332. 	vint_dataresponder_request("mission_replay", "mission_replay_consume_data", 0, "list_missions", menu_data.mission_group) 
  333.  
  334. 	local swatch_template = vint_object_find("swatch_clipping", nil) 
  335. 	menu_grid_show(menu_data, menu_item, swatch_template) 
  336. 	 
  337. 	mission_replay_menu_triggers_show(true) 
  338. end	 
  339.  
  340. function mission_replay_mission_release(menu) 
  341. 	mission_replay_unload_peg(menu.peg) 
  342. 	menu_grid_release(menu[0]) 
  343. end 
  344.  
  345. function mission_replay_mission_back() 
  346. 	mission_replay_exit() 
  347. end 
  348.  
  349. -- details 
  350.  
  351. function mission_replay_detail_scroll_up() 
  352. 	if Mission_replay_story_text_pos <= 0 then 
  353. 		return 
  354. 	end 
  355. 	 
  356. 	Mission_replay_story_text_pos = Mission_replay_story_text_pos - Mission_replay_text_clip_height 
  357. 	 
  358. 	if Mission_replay_story_text_pos < 0 then 
  359. 		Mission_replay_story_text_pos = 0 
  360. 	end 
  361. 	 
  362. 	vint_set_property(vint_object_find("story_text"), "offset", 0, -Mission_replay_story_text_pos) 
  363. 	mission_replay_scroll_bar_set_thumb_pos(Mission_replay_scroll_data, Mission_replay_story_text_pos / Mission_replay_story_text_height) 
  364. end 
  365.  
  366. function mission_replay_detail_scroll_down() 
  367. 	if Mission_replay_story_text_pos + Mission_replay_text_clip_height >= Mission_replay_story_text_height then 
  368. 		return 
  369. 	end 
  370. 	 
  371. 	Mission_replay_story_text_pos = Mission_replay_story_text_pos + Mission_replay_text_clip_height 
  372. 	 
  373. 	if Mission_replay_story_text_pos + Mission_replay_text_clip_height > Mission_replay_story_text_height then 
  374. 		Mission_replay_story_text_pos = Mission_replay_story_text_height - Mission_replay_text_clip_height 
  375. 	end 
  376. 	 
  377. 	vint_set_property(vint_object_find("story_text"), "offset", 0, -Mission_replay_story_text_pos) 
  378. 	mission_replay_scroll_bar_set_thumb_pos(Mission_replay_scroll_data, Mission_replay_story_text_pos / Mission_replay_story_text_height) 
  379. end 
  380.  
  381. function mission_detail_replay_confirm(mission_name) 
  382. 	-- this could invoke a series of dialogs on local and remote coop player so it's blocking 
  383. 	vint_dataresponder_request("mission_replay", "mission_detail_replay_response", 0, "mission_start", mission_name) 
  384. end 
  385.  
  386. function mission_replay_detail_input(target, event, accelleration) 
  387. 	if menu_input_is_blocked() == true then 
  388. 		return 
  389. 	end 
  390. 	 
  391. 	if event == "nav_up" then 
  392. 		mission_replay_detail_scroll_up() 
  393. 	elseif event == "nav_down" then 
  394. 		mission_replay_detail_scroll_down() 
  395. 	elseif event == "select" then 
  396. 		local menu_item = Menu_active[0] 
  397. 		local swatch = menu_item.swatches[menu_item.cur_idx] 
  398. 		 
  399. 		if swatch.is_unlocked == true then 
  400. 			thread_new("mission_detail_replay_confirm", swatch.internal_name) 
  401. 		end 
  402. 	elseif event == "back" then 
  403. 			 
  404. 		for k, v in Mission_replay_input_subs do 
  405. 			vint_unsubscribe_to_input_event(k) 
  406. 		end 
  407. 		Mission_replay_input_subs = { } 
  408. 		 
  409. 		Menu_active.btn_tips = nil 
  410. 		btn_tips_update() 
  411. 		 
  412. 		--Slide out frame for missions 
  413. 		lua_play_anim(Mission_replay.handles.mission_details_slide_out) 
  414. 		local tween_h = vint_object_find("slide_out_ender", Mission_replay.handles.mission_details_slide_out) 
  415. 		vint_set_property(tween_h, "end_event", "mission_replay_unload_details") 
  416. 	 
  417. 		--Show swatches again 
  418. 		vint_set_property(Menu_option_labels.control_parent, "visible", true) 
  419. 	 
  420. 		--Block input until peg is unloaded 
  421. 		menu_input_block(true) 
  422. 		 
  423. 		--Show triggers 
  424. 		mission_replay_menu_triggers_show(true) 
  425. 		 
  426. 	elseif event == "pause" then 
  427. 		--Cause special pause 
  428. 		dialog_open_pause_display() 
  429. 	end 
  430. end 
  431.  
  432.  
  433. function mission_replay_unload_details() 
  434. 	vint_set_property(vint_object_find("mission_details"), "visible", false) 
  435. 	if Mission_replay_clip_peg ~= nil then 
  436. 		mission_replay_unload_peg(Mission_replay_clip_peg) 
  437. 	end  
  438. 	 
  439. 	if Mission_replay_gang_peg ~= nil then 
  440. 		mission_replay_unload_peg(Mission_replay_gang_peg) 
  441. 	end 
  442. 	 
  443. 	--Pegs are unloaded now unblock input 
  444. 	menu_input_block(false) 
  445. end 
  446.  
  447. function mission_replay_menu_triggers_show(is_visible) 
  448. 	local h = vint_object_find("upper_nav_trigger_right", nil, MENU_BASE_DOC_HANDLE) 
  449. 	vint_set_property(h, "visible", is_visible) 
  450. 	h = vint_object_find("upper_nav_trigger_right_hl", nil, MENU_BASE_DOC_HANDLE) 
  451. 	vint_set_property(h, "visible", is_visible) 
  452. 	h = vint_object_find("upper_nav_trigger_left", nil, MENU_BASE_DOC_HANDLE) 
  453. 	vint_set_property(h, "visible", is_visible) 
  454. 	h = vint_object_find("upper_nav_trigger_left_hl", nil, MENU_BASE_DOC_HANDLE) 
  455. 	vint_set_property(h, "visible", is_visible) 
  456. end 
  457.  
  458. --------------- 
  459. -- MENU DATA -- 
  460. --------------- 
  461. Mission_replay_details_btn_tips = { 
  462. 	a_button = { label = "MISSION_COOP_REPLAY_PROMPT",	enabled = true, }, 
  463. 	b_button = { label = "MENU_BACK",						enabled = true, }, 
  464. 	-- this seem to want to put it in the extra tab but there's not room 
  465. --	right_stick = { label = "MENU_SCROLL", enabled = true}, 
  466. } 
  467.  
  468. Mission_replay_prologue_menu = { 
  469. --	btn_tips = Pcr01_untop_btn_tips, 
  470. 	on_show = mission_replay_mission_show, 
  471. 	on_release = mission_replay_mission_release, 
  472. 	on_back = mission_replay_mission_back, 
  473. 	 
  474. 	mission_group = "prologue", 
  475. 	peg = "ui_crib_news_tss", 
  476. 	hide_header = true, 
  477. 	hide_frame = true, 
  478. 	max_height = 500, 
  479. 	 
  480. 	num_items = 1, 
  481. 	[0] = { 
  482. 		label = "", 
  483. 		type = MENU_ITEM_TYPE_GRID, 
  484. 		on_select = mission_replay_mission_select, 
  485. 		on_nav = mission_replay_mission_nav, 
  486. 		on_leave = mission_replay_mission_leave, 
  487. 		on_enter = mission_replay_mission_enter, 
  488. 		update_swatch = mission_replay_update_swatch, 
  489. 		row_height = MISSION_REPLAY_SWATCH_HEIGHT, 
  490. 		num_cols = MISSION_REPLAY_SWATCH_COLS, 
  491. 		col_width = MISSION_REPLAY_SWATCH_WIDTH, 
  492. 		highlight_scale = MISSION_REPLAY_SWATCH_HL_SCALE, 
  493. 		unhighlight_scale = MISSION_REPLAY_SWATCH_UHL_SCALE, 
  494. 		hide_arrows = true, 
  495. 	} 
  496. } 
  497.  
  498. Mission_replay_bh_menu = { 
  499. --	btn_tips = Pcr01_untop_btn_tips, 
  500. 	on_show = mission_replay_mission_show, 
  501. 	on_release = mission_replay_mission_release, 
  502. 	on_back = mission_replay_mission_back, 
  503. 	 
  504. 	mission_group = "brotherhood", 
  505. 	peg = "ui_crib_news_bh", 
  506. 	hide_header = true, 
  507. 	hide_frame = true, 
  508. 	max_height = 500, 
  509. 	 
  510. 	num_items = 1, 
  511. 	[0] = { 
  512. 		label = "", 
  513. 		type = MENU_ITEM_TYPE_GRID, 
  514. 		on_select = mission_replay_mission_select, 
  515. 		on_nav = mission_replay_mission_nav, 
  516. 		on_leave = mission_replay_mission_leave, 
  517. 		on_enter = mission_replay_mission_enter, 
  518. 		update_swatch = mission_replay_update_swatch, 
  519. 		row_height = MISSION_REPLAY_SWATCH_HEIGHT, 
  520. 		num_cols = MISSION_REPLAY_SWATCH_COLS, 
  521. 		col_width = MISSION_REPLAY_SWATCH_WIDTH, 
  522. 		highlight_scale = MISSION_REPLAY_SWATCH_HL_SCALE, 
  523. 		unhighlight_scale = MISSION_REPLAY_SWATCH_UHL_SCALE, 
  524. 		hide_arrows = true, 
  525. 	} 
  526. } 
  527.  
  528. Mission_replay_rn_menu = { 
  529. --	btn_tips = Pcr01_untop_btn_tips, 
  530. 	on_show = mission_replay_mission_show, 
  531. 	on_release = mission_replay_mission_release, 
  532. 	on_back = mission_replay_mission_back, 
  533. 	 
  534. 	mission_group = "ronin", 
  535. 	peg = "ui_crib_news_rn", 
  536. 	hide_header = true, 
  537. 	hide_frame = true, 
  538. 	max_height = 500, 
  539.  
  540. 	num_items = 1, 
  541. 	[0] = { 
  542. 		label = "", 
  543. 		type = MENU_ITEM_TYPE_GRID, 
  544. 		on_select = mission_replay_mission_select, 
  545. 		on_nav = mission_replay_mission_nav, 
  546. 		on_leave = mission_replay_mission_leave, 
  547. 		on_enter = mission_replay_mission_enter, 
  548. 		update_swatch = mission_replay_update_swatch, 
  549. 		row_height = MISSION_REPLAY_SWATCH_HEIGHT, 
  550. 		num_cols = MISSION_REPLAY_SWATCH_COLS, 
  551. 		col_width = MISSION_REPLAY_SWATCH_WIDTH, 
  552. 		highlight_scale = MISSION_REPLAY_SWATCH_HL_SCALE, 
  553. 		unhighlight_scale = MISSION_REPLAY_SWATCH_UHL_SCALE, 
  554. 		hide_arrows = true, 
  555. 	} 
  556. } 
  557.  
  558. Mission_replay_ss_menu = { 
  559. --	btn_tips = Pcr01_untop_btn_tips, 
  560. 	on_show = mission_replay_mission_show, 
  561. 	on_release = mission_replay_mission_release, 
  562. 	on_back = mission_replay_mission_back, 
  563. 	 
  564. 	mission_group = "sons of samedi", 
  565. 	peg = "ui_crib_news_ss", 
  566. 	hide_header = true, 
  567. 	hide_frame = true, 
  568. 	max_height = 500, 
  569.  
  570. 	num_items = 1, 
  571. 	[0] = { 
  572. 		label = "", 
  573. 		type = MENU_ITEM_TYPE_GRID, 
  574. 		on_select = mission_replay_mission_select, 
  575. 		on_nav = mission_replay_mission_nav, 
  576. 		on_leave = mission_replay_mission_leave, 
  577. 		on_enter = mission_replay_mission_enter, 
  578. 		update_swatch = mission_replay_update_swatch, 
  579. 		row_height = MISSION_REPLAY_SWATCH_HEIGHT, 
  580. 		num_cols = MISSION_REPLAY_SWATCH_COLS, 
  581. 		col_width = MISSION_REPLAY_SWATCH_WIDTH, 
  582. 		highlight_scale = MISSION_REPLAY_SWATCH_HL_SCALE, 
  583. 		unhighlight_scale = MISSION_REPLAY_SWATCH_UHL_SCALE, 
  584. 		hide_arrows = true, 
  585. 	} 
  586. } 
  587.  
  588. Mission_replay_epilogue_menu = { 
  589. --	btn_tips = Pcr01_untop_btn_tips, 
  590. 	on_show = mission_replay_mission_show, 
  591. 	on_release = mission_replay_mission_release, 
  592. 	on_back = mission_replay_mission_back, 
  593. 	 
  594. 	mission_group = "epilogue", 
  595. 	peg = "ui_crib_news_ep", 
  596. 	hide_header = true, 
  597. 	hide_frame = true, 
  598. 	max_height = 500, 
  599.  
  600. 	num_items = 1, 
  601. 	[0] = { 
  602. 		label = "", 
  603. 		type = MENU_ITEM_TYPE_GRID, 
  604. 		on_select = mission_replay_mission_select, 
  605. 		on_nav = mission_replay_mission_nav, 
  606. 		on_leave = mission_replay_mission_leave, 
  607. 		on_enter = mission_replay_mission_enter, 
  608. 		update_swatch = mission_replay_update_swatch, 
  609. 		row_height = MISSION_REPLAY_SWATCH_HEIGHT, 
  610. 		num_cols = MISSION_REPLAY_SWATCH_COLS, 
  611. 		col_width = MISSION_REPLAY_SWATCH_WIDTH, 
  612. 		highlight_scale = MISSION_REPLAY_SWATCH_HL_SCALE, 
  613. 		unhighlight_scale = MISSION_REPLAY_SWATCH_UHL_SCALE, 
  614. 		hide_arrows = true, 
  615. 	} 
  616. } 
  617.  
  618. Mission_replay_extras_menu = { 
  619. --	btn_tips = Pcr01_untop_btn_tips, 
  620. 	on_show = mission_replay_mission_show, 
  621. 	on_release = mission_replay_mission_release, 
  622. 	on_back = mission_replay_mission_back, 
  623. 	 
  624. 	mission_group = "extra", 
  625. 	peg = "ui_crib_news_em", 
  626. 	hide_header = true, 
  627. 	hide_frame = true, 
  628. 	max_height = 500, 
  629.  
  630. 	num_items = 1, 
  631. 	[0] = { 
  632. 		label = "", 
  633. 		type = MENU_ITEM_TYPE_GRID, 
  634. 		on_select = mission_replay_mission_select, 
  635. 		on_nav = mission_replay_mission_nav, 
  636. 		on_leave = mission_replay_mission_leave, 
  637. 		on_enter = mission_replay_mission_enter, 
  638. 		update_swatch = mission_replay_update_swatch, 
  639. 		row_height = MISSION_REPLAY_SWATCH_HEIGHT, 
  640. 		num_cols = MISSION_REPLAY_SWATCH_COLS, 
  641. 		col_width = MISSION_REPLAY_SWATCH_WIDTH, 
  642. 		highlight_scale = MISSION_REPLAY_SWATCH_HL_SCALE, 
  643. 		unhighlight_scale = MISSION_REPLAY_SWATCH_UHL_SCALE, 
  644. 		hide_arrows = true, 
  645. 	} 
  646. } 
  647.  
  648. Mission_replay_horz = { 
  649. 	num_items = 6, 
  650. 	[0] = {label = "HELP_CAT_PROL", sub_menu = Mission_replay_prologue_menu}, 
  651. 	[1] = {label = "GANG_NAME_TB", sub_menu = Mission_replay_bh_menu}, 
  652. 	[2] = {label = "GANG_NAME_TR", sub_menu = Mission_replay_rn_menu}, 
  653. 	[3] = {label = "GANG_NAME_SOS", sub_menu = Mission_replay_ss_menu}, 
  654. 	[4] = {label = "HELP_CAT_EPI", sub_menu = Mission_replay_epilogue_menu}, 
  655. 	[5] = {label = "MAINMENU_EXTRAS", sub_menu = Mission_replay_extras_menu}, 
  656. } 
  657.