./main_menu_common.lua

  1. Menu_hint_bar = -1 
  2. Main_menu_coop_is_xbox_live = -1			-- bool to determine whether main_menu_coop is xbox live or system link... 
  3. Main_menu_common_doc_h = -1 
  4.  
  5. Header_obj = -1 
  6. Header_mini_obj = -1 
  7. List = -1 
  8. Screen_mask = -1 
  9. Screen_slide_out_anim = -1 
  10. Screen_slide_in_anim = -1 
  11. Screen_in_anim = -1 
  12. Screen_out_anim = -1 
  13. Screen_back_in_anim = -1 
  14. Screen_back_out_anim = -1 
  15.  
  16. SAVE_OPERATION_SAVE_GAME = 0 
  17. SAVE_OPERATION_LOAD_GAME = 1 
  18. Save_system_operation = SAVE_OPERATION_LOAD_GAME 
  19.  
  20. COOP_INVITE_LIST			= 0 
  21. COOP_ONLINE_JOIN_LIST  	= 1 
  22. COOP_SYSLINK_JOIN_LIST 	= 2 
  23. Coop_connect_operation = COOP_ONLINE_JOIN_LIST 
  24.  
  25. Enter_dlc_menu = false 
  26. Load_for_coop = false 
  27. In_pause_menu = false 
  28. Exit_after_closing = false 
  29. First_time = true 
  30. Save_message_displayed = false 
  31. Start_game_after_display = false 
  32. Show_continue = false 
  33. Press_start_called = false 
  34. Close_all_menu = false 
  35. Join_friend_after_display = -1 
  36. In_silverlink_menu = false 
  37. Silverlink_rewards_type = -1 
  38.  
  39. -- PC Menu has height adjusted 
  40. local PC_menu_adjusted = false 
  41.  
  42. function main_menu_common_init() 
  43. 	Main_menu_common_doc_h = vint_document_find("main_menu_common") 
  44.  
  45. 	--sync the main menu logo anim if availble 
  46. 	local bg_saints_doc_handle = vint_document_find("bg_saints") 
  47. 	if bg_saints_doc_handle ~= 0 and bg_saints_doc_handle ~= nil then 
  48. 		if Bg_staints_play_logo_slide == true then 
  49. 			local intro_logo_slide_anim_h = vint_object_find("intro_logo_slide_anim", 0, Main_menu_common_doc_h) 
  50. 			vint_apply_start_values(intro_logo_slide_anim_h) 
  51. 			lua_play_anim(intro_logo_slide_anim_h) 
  52. 		end 
  53. 		Bg_staints_play_logo_slide = false 
  54. 	end 
  55. 	 
  56. 	 
  57. 	-- Japanese Logo version... 
  58. 	local logo_jp_h = vint_object_find("logo_jp") 
  59. 	 
  60. 	--Adjust logo if we are japanese... 
  61. 	if game_get_language() == "JP" then 
  62. 		vint_set_property(logo_jp_h, "visible", true) 
  63. 	else 
  64. 		vint_set_property(logo_jp_h, "visible", false) 
  65. 	end 
  66. 	 
  67. 	List = Vdo_mega_list:new("list", 0, Main_menu_common_doc_h, "main_menu_common.lua", "List") 
  68. 	List:set_highlight_color(COLOR_STORE_REWARDS_PRIMARY, COLOR_STORE_REWARDS_SECONDARY) 
  69. 	 
  70. 	Header_obj = Vdo_pause_header:new("header",0,Main_menu_common_doc_h) 
  71.  
  72. 	List:set_visible(false) 
  73. 	Header_obj:set_visible(false) 
  74. 	 
  75. 	--For silverlink menu... 
  76. 	Header_mini_obj = Vdo_pause_header_mini:new("header_mini", 0, Main_menu_common_doc_h) 
  77. 	Header_mini_obj:set_visible(false) 
  78. 	 
  79. 	Screen_mask = vint_object_find("screen_mask",0,Main_menu_common_doc_h) 
  80. 	 
  81. 	Screen_in_anim = Vdo_anim_object:new("screen_in_anim",0,Main_menu_common_doc_h) 
  82. 	local twn = Vdo_tween_object:new("screen_in_twn", Screen_in_anim.handle) 
  83. 	twn:set_end_event("menu_common_anim_in_cb") 
  84. 	 
  85. 	Screen_out_anim = Vdo_anim_object:new("screen_out_anim",0,Main_menu_common_doc_h) 
  86. 	local twn2 = Vdo_tween_object:new("screen_out_twn", Screen_out_anim.handle) 
  87. 	twn2:set_end_event("menu_common_anim_out_cb") 
  88. 	 
  89. 	Screen_slide_out_anim = Vdo_anim_object:new("screen_slide_out_anim",0,Main_menu_common_doc_h) 
  90. 	local twn_out = Vdo_tween_object:new("screen_slide_out_twn1", Screen_slide_out_anim.handle) 
  91. 	twn_out:set_end_event("menu_common_anim_out_cb") 
  92. 	 
  93. 	Screen_slide_in_anim = Vdo_anim_object:new("screen_slide_in_anim",0,Main_menu_common_doc_h) 
  94. 	local twn_in = Vdo_tween_object:new("screen_slide_in_twn1", Screen_slide_in_anim.handle) 
  95. 	twn_in:set_end_event("menu_common_anim_in_cb") 
  96. 	 
  97. 	Screen_back_in_anim = Vdo_anim_object:new("screen_back_in_anim",0,Main_menu_common_doc_h) 
  98. 	local twn_back_in = Vdo_tween_object:new("back_in_twn1", Screen_back_in_anim.handle) 
  99. 	twn_back_in:set_end_event("menu_common_anim_in_cb") 
  100. 	 
  101. 	Screen_back_out_anim = Vdo_anim_object:new("screen_back_out_anim",0,Main_menu_common_doc_h) 
  102. 	local twn_back_out = Vdo_tween_object:new("back_out_twn1", Screen_back_out_anim.handle) 
  103. 	twn_back_out:set_end_event("menu_common_anim_out_cb") 
  104. 	 
  105. 	bg_saints_set_type(BG_TYPE_VIDEO,true) 
  106. 	 
  107. 	--Hide everything on init... 
  108. 	main_menu_logo_hide() 
  109. 	 
  110. 	-- Move the title up on PC to make room for the extra options 
  111. 	if game_get_platform() == "PC" and PC_menu_adjusted == false then 
  112. 		--[[ 
  113. 		local base_logo_h = vint_object_find("base_logo") 
  114. 		local x, y = vint_get_property(base_logo_h, "anchor") 
  115. 		if vint_is_std_res() then 
  116. 			vint_set_property(base_logo_h, "anchor", x, y - 35) 
  117. 		else 
  118. 			vint_set_property(base_logo_h, "anchor", x, y - 25) 
  119. 		end 
  120. 		]] 
  121. 		PC_menu_adjusted = true 
  122. 	end 
  123. 	 
  124. 	--Hide silverlink logo... 
  125. 	local silverlink_logo_h = vint_object_find("silverlink_logo") 
  126. 	vint_set_property(silverlink_logo_h, "visible", false) 
  127. 	 
  128. 	--Hide silverlink logo... 
  129. 	local logged_in_text_h = vint_object_find("logged_in_text", 0, Main_menu_common_doc_h) 
  130. 	vint_set_property(logged_in_text_h, "visible", false) 
  131. 	 
  132. 	  -- HVS_EC  Set GPU Reserve on  (Enable Kinect Eye) 
  133. 	os_set_gpu_reserve_state(true) 
  134. end 
  135.  
  136. function main_menu_common_cleanup() 
  137.  -- HVS_EC  Set GPU Reserve off  (Disable Kinect Eye) 
  138. 	os_set_gpu_reserve_state(false) 
  139. end 
  140.  
  141. ------------------------------------------------------------------------------- 
  142. -- Start the bg video... 
  143. ------------------------------------------------------------------------------- 
  144. function main_menu_start_video(has_pressed_start) 
  145. 	--local intro_logo_slide_anim_h = vint_object_find("intro_logo_slide_anim", 0, Main_menu_common_doc_h) 
  146. 	--vint_apply_start_values(intro_logo_slide_anim_h) 
  147. 	--lua_play_anim(intro_logo_slide_anim_h) 
  148. 	 
  149. 	--bg_saints_set_video("main_menu_bg.bik") 
  150. 	-- HVS_BDF 4/10/14: we use Bink 2 on SR4GAT 
  151. 	bg_saints_set_video("main_menu_bg.bk2") 
  152. 	if not has_pressed_start then 
  153. 		--bg_saints_press_start_setup() 
  154. 	end 
  155. 	bg_saints_play_video(true, "video_stopped") 
  156. 	 
  157. 	if has_pressed_start == true then  
  158. 		--bg_saints_main_menu_setup() 
  159. 	end 
  160. end 
  161.  
  162. function main_menu_stop_video() 
  163. 	bg_saints_play_video(false, "video_stopped") 
  164. end 
  165.  
  166. function video_stopped() 
  167. 	main_menu_video_has_stopped() 
  168. end 
  169.  
  170. function main_menu_common_reset() 
  171. 	--main_menu_restart_video() 
  172. 	-- Move the title up on PC to make room for the extra options 
  173. 	Header_obj:reset_width() 
  174. 	if game_get_platform() == "PC" then 
  175. 		--[[ 
  176. 		local base_logo_h = vint_object_find("base_logo") 
  177. 		local x, y = vint_get_property(base_logo_h, "anchor") 
  178. 		if vint_is_std_res() then 
  179. 			vint_set_property(base_logo_h, "anchor", x, y - 35) 
  180. 		else 
  181. 			vint_set_property(base_logo_h, "anchor", x, y - 25) 
  182. 		end 
  183. 		]] 
  184. 		PC_menu_adjusted = true 
  185. 	end 
  186. end 
  187.  
  188. ------------------------------------------------------------------------------- 
  189. -- Show logo... 
  190. ------------------------------------------------------------------------------- 
  191. function main_menu_logo_show() 
  192. 	--show the main menu logo. 
  193. 	 
  194. 	local intro_logo_anim_h = vint_object_find("intro_logo_anim", 0, Main_menu_common_doc_h) 
  195. 	lua_play_anim(intro_logo_anim_h, 0, Main_menu_common_doc_h) 
  196. 	 
  197. 	local logo_h = vint_object_find("base_logo", 0, Main_menu_common_doc_h) 
  198. 	vint_set_property(logo_h, "alpha", 1) 
  199. 	 
  200. 	First_time = true 
  201. end 
  202.  
  203. ------------------------------------------------------------------------------- 
  204. -- Hide logo... 
  205. ------------------------------------------------------------------------------- 
  206. function main_menu_logo_hide() 
  207. 	--we probably don't need this... 
  208. 	 
  209. 	local intro_logo_anim_h = vint_object_find("intro_logo_anim", 0, Main_menu_common_doc_h) 
  210. 	vint_set_property(intro_logo_anim_h, "is_paused", true) 
  211. 	 
  212. 	local logo_h = vint_object_find("base_logo", 0, Main_menu_common_doc_h) 
  213. 	vint_set_property(logo_h, "alpha", 0) 
  214. 	 
  215. end 
  216.  
  217. ------------------------------------------------------------------------------- 
  218. ---LEGACY C++ stuff from the old main menu... 
  219. -- Lets clean this up. 
  220. ------------------------------------------------------------------------------- 
  221. function main_menu_controller_selected(show_continue) 
  222. 	Main_menu_controller_is_selected = true 
  223. 	Show_continue = show_continue 
  224. 	 
  225. 	main_menu_top_press_start_hide() 
  226. 	main_menu_top_menu_show() 
  227. 	 
  228. 	if Press_start_called == false then 
  229. 		bg_saints_main_menu_setup() 
  230. 		Press_start_called = true 
  231. 	end 
  232. end 
  233.  
  234. --FORCES the player to a specific menu... 
  235. function main_menu_force_to_menu() 
  236. 	--Don't do anything because we shouldn't 
  237. --[[ 
  238. 	if Main_menu_controller_selected == false then 
  239. 		Main_menu_first_menu = menu_name 
  240. 	else 
  241. 		main_menu_close_extra_screens(true) 
  242. 		if menu_name == "top" then 
  243. 			if Main_menu_controller_selected == true then 
  244. 				menu_hide_active() 
  245. 				vint_set_property(vint_object_find("safe_frame"), "visible", true) 
  246. 				Main_menu_can_has_input = true 
  247. 				menu_input_block(false) 
  248. 				main_menu_screen_fade(0) 
  249. 			end 
  250. 			 
  251. 			main_menu_grab_input() 
  252. 			dialog_box_force_close_all() 
  253. 		elseif menu_name == "coop_load" then 
  254. 			credits_force_close() 
  255. 			Pause_load_is_coop = true 
  256. 			vint_set_property(vint_object_find("safe_frame"), "visible", true) 
  257. 			main_menu_load_menu_select() 
  258. 		elseif menu_name == "customize" then 
  259. 			vint_set_property(vint_object_find("safe_frame"), "visible", true) 
  260. 			main_menu_customize_menu_select() 
  261. 		end 
  262. 	end 
  263. ]] 
  264. end 
  265.  
  266. function main_menu_nav(target, event) 
  267. 	-- We will try and use input tracker... 
  268. 	--do nothing 
  269. end 
  270.  
  271. function load_before_join() 
  272. 	Load_for_coop = true 
  273. 	push_screen("pause_save_game") 
  274. end 
  275.  
  276. -- Make the megalist look main menuy 
  277. -- 
  278. function main_menu_set_style(list, header, width, num_pops) 
  279. 	 
  280. 	header:set_visible(true) 
  281. 	list:set_visible(true) 
  282. 	 
  283. 	--get the list width 
  284. 	local list_w, list_h = vint_get_property(list.handle, "screen_size") 
  285. 	list_w = width or list_w 
  286.  
  287. 	local new_x 
  288. 	if vint_is_std_res() == false then 
  289. 		new_x = 640 
  290. 	else 
  291. 		new_x = 320 * 1.5 
  292. 	end 
  293. 	new_x = new_x - (list_w * 0.5) 
  294. 	 
  295. 	local list_tween_h 
  296. 	local header_tween_h 
  297. 	local hint_bar_tween_h 
  298. 	 
  299. 	local max_width = 650 
  300. 	local back_out_twn1_h = vint_object_find("back_out_twn1", Screen_back_out_anim.handle) 
  301. 	local back_out_twn2_h = vint_object_find("back_out_twn2", Screen_back_out_anim.handle) 
  302. 	local back_out_twn3_h = vint_object_find("back_out_twn3", Screen_back_out_anim.handle) 
  303. 	 
  304. 	local slide_out_twn1_h = vint_object_find("screen_slide_out_twn1", Screen_slide_out_anim.handle) 
  305. 	local slide_out_twn2_h = vint_object_find("screen_slide_out_twn2", Screen_slide_out_anim.handle) 
  306. 	local slide_out_twn3_h = vint_object_find("screen_slide_out_twn3", Screen_slide_out_anim.handle) 
  307. 	--[[ 
  308. 	if list_w > max_width then 
  309. 		vint_set_property(back_out_twn1_h, "end_value", -1 * max_width, 652) 
  310. 		vint_set_property(back_out_twn2_h, "end_value", -1 * max_width, 230) 
  311. 		vint_set_property(back_out_twn3_h, "end_value", -1 * max_width, 267) 
  312. 		 
  313. 		vint_set_property(slide_out_twn1_h, "end_value", 1100, 652) 
  314. 		vint_set_property(slide_out_twn2_h, "end_value", 1100, 267) 
  315. 		vint_set_property(slide_out_twn3_h, "end_value", 1150, 230) 
  316. 	else 
  317. 		vint_set_property(back_out_twn1_h, "end_value", -300, 652) 
  318. 		vint_set_property(back_out_twn2_h, "end_value", -300, 230) 
  319. 		vint_set_property(back_out_twn3_h, "end_value", -300, 267) 
  320. 		 
  321. 		vint_set_property(slide_out_twn1_h, "end_value", 900, 652) 
  322. 		vint_set_property(slide_out_twn2_h, "end_value", 900, 267) 
  323. 		vint_set_property(slide_out_twn3_h, "end_value", 950, 230) 
  324. 	end 
  325. 	]] 
  326. 	if not First_time then 
  327. 		 
  328. 		 
  329. 		 
  330. 		bg_saints_set_type(BG_TYPE_PAUSE, true, list_w) 
  331. 		local mask_x,mask_y = vint_get_property(Screen_mask, "anchor") 
  332. 		--main_menu_mask_morph(BG_TYPE_CENTER, list_w, new_x) 
  333. 		 
  334. 		if num_pops > 0 then 
  335. 			--main_menu_set_slide_in_values( new_x ) 
  336. 			vint_apply_start_values(Screen_slide_in_anim.handle) 
  337. 			Screen_slide_in_anim:play(0) 
  338. 		else 
  339. 			--main_menu_set_back_in_values( new_x ) 
  340. 			vint_apply_start_values(Screen_back_in_anim.handle) 
  341. 			Screen_back_in_anim:play(0) 
  342. 		end 
  343. 	else 
  344. 		--main_menu_center_layout( new_x ) 
  345. 		--vint_set_property(Screen_mask,"screen_size", list_w, 800) 
  346. 		--main_menu_mask_morph(BG_TYPE_CENTER, list_w, new_x) 
  347. 		bg_saints_set_type(BG_TYPE_PAUSE, false, list_w) 
  348. 		glitch_cell() 
  349. 		ui_audio_post_event("UI_Hub_Menu_Forward") 
  350. 		Screen_back_in_anim:play(0) 
  351. 	end 
  352. end 
  353.  
  354. function main_menu_mask_morph( screen_type, size_end_x, anchor_end_x ) 
  355. 	--[[ 
  356. 	--get handles for everyone 
  357. 	local morph_anim_h = vint_object_find("screen_mask_anim", 0, Main_menu_common_doc_h) 
  358. 	local morph_scale_twn_h = vint_object_find("screen_mask_scale_twn", 0, Main_menu_common_doc_h) 
  359. 	local morph_anchor_twn_h = vint_object_find("screen_mask_anchor_twn", 0, Main_menu_common_doc_h)  
  360. 	 
  361. 	--create the center anchor point from the width of the mask 
  362. 	--anchor_end_x = (anchor_end_x) - (size_end_x * 0.5) 
  363.  
  364. 	--setup the anchor for the mask 
  365. 	--get the starting x position 
  366. 	local mask_anchor_start_x,mask_anchor_start_y = vint_get_property( Screen_mask, "anchor" ) 
  367. 	vint_set_property(morph_anchor_twn_h, "start_value", mask_anchor_start_x, mask_anchor_start_y ) 
  368. 	vint_set_property(morph_anchor_twn_h, "end_value", anchor_end_x, mask_anchor_start_y ) 
  369. 	 
  370. 	--setup the scale of the mask 
  371. 	--get the starting scale 
  372. 	local size_start_x,size_start_y = vint_get_property(Screen_mask,"scale") 
  373. 	--get the correct size, this fixes SD scale issues 
  374. 	local adjusted_size_end_x,crap = element_get_scale_from_size(Screen_mask, size_end_x, 16) 
  375. 	vint_set_property(morph_scale_twn_h, "start_value", size_start_x , size_start_y) 
  376. 	vint_set_property(morph_scale_twn_h, "end_value", adjusted_size_end_x , size_start_y) 
  377. 	 
  378. 	--play the animation 
  379. 	lua_play_anim(morph_anim_h, 0, Main_menu_common_doc_h)	 
  380. 	]] 
  381. end 
  382.  
  383. function main_menu_set_slide_in_values( new_x ) 
  384. 	local hint_anchor_twn_h = vint_object_find("screen_slide_in_twn1", 0, Main_menu_common_doc_h) 
  385. 	local header_anchor_twn_h = vint_object_find("screen_slide_in_twn3", 0, Main_menu_common_doc_h)  
  386. 	local list_anchor_twn_h = vint_object_find("screen_slide_in_twn2", 0, Main_menu_common_doc_h)  
  387. 	 
  388. 	local hint_x,hint_y = vint_get_property(hint_anchor_twn_h, "end_value") 
  389. 	local header_x,header_y = vint_get_property(header_anchor_twn_h, "end_value") 
  390. 	local list_x,list_y = vint_get_property(list_anchor_twn_h, "end_value") 
  391. 	 
  392. 	--vint_set_property(hint_anchor_twn_h, "end_value", new_x + 17, hint_y) 
  393. 	--vint_set_property(header_anchor_twn_h, "end_value", new_x + 30, header_y) 
  394. 	--vint_set_property(list_anchor_twn_h, "end_value", new_x, list_y) 
  395. end 
  396.  
  397. function main_menu_set_back_in_values( new_x ) 
  398. 	local hint_anchor_twn_h = vint_object_find("back_in_twn1", 0, Main_menu_common_doc_h) 
  399. 	local header_anchor_twn_h = vint_object_find("back_in_twn3", 0, Main_menu_common_doc_h)  
  400. 	local list_anchor_twn_h = vint_object_find("back_in_twn2", 0, Main_menu_common_doc_h)  
  401. 	 
  402. 	local hint_x,hint_y = vint_get_property(hint_anchor_twn_h, "end_value") 
  403. 	local header_x,header_y = vint_get_property(header_anchor_twn_h, "end_value") 
  404. 	local list_x,list_y = vint_get_property(list_anchor_twn_h, "end_value") 
  405. 	 
  406. 	--vint_set_property(hint_anchor_twn_h, "end_value", new_x + 17, hint_y) 
  407. 	--vint_set_property(header_anchor_twn_h, "end_value", new_x + 30, header_y) 
  408. 	--vint_set_property(list_anchor_twn_h, "end_value", new_x, list_y) 
  409. end 
  410.  
  411. function main_menu_center_layout( new_x ) 
  412. 	--get the list x and y 
  413. 	local list_x, list_y = vint_get_property(List.handle, "anchor") 
  414. 	local header_x, header_y = vint_get_property(Header_obj.handle, "anchor") 
  415. 	local hint_anchor_twn_h = vint_object_find("back_in_twn1", 0, Main_menu_common_doc_h) 
  416. 	local hint_x,hint_y = vint_get_property(hint_anchor_twn_h, "end_value") 
  417. 	 
  418. 	--vint_set_property(List.handle, "anchor", new_x, list_y) 
  419. 	--vint_set_property(Header_obj.handle, "anchor", new_x + 30, header_y) 
  420. 	--vint_set_property(Menu_hint_bar.handle, "anchor", new_x + 17, hint_y) 
  421. 	--vint_set_property(Screen_mask, "anchor", new_x, -58) 
  422. end 
  423.  
  424. ------------------------------------------------------------------------------- 
  425. -- Shows the silverlink logo via animation... 
  426. -- @bool 	is_visible 		Should the logo be displayed? 
  427. -- 
  428. function main_menu_silverlink_logo_show(is_visible) 
  429. 	local silver_link_in_anim_h = vint_object_find("silverlink_in_anim", 0, Main_menu_common_doc_h) 
  430. 	local silver_link_out_anim_h = vint_object_find("silverlink_out_anim", 0, Main_menu_common_doc_h) 
  431. 	if is_visible then 
  432. 		vint_set_property(silver_link_out_anim_h, "is_paused", true) 
  433. 		lua_play_anim(silver_link_in_anim_h, 0, Main_menu_common_doc_h) 
  434. 	else 
  435. 		vint_set_property(silver_link_in_anim_h, "is_paused", true) 
  436. 		lua_play_anim(silver_link_out_anim_h, 0, Main_menu_common_doc_h) 
  437. 	end 
  438. end 
  439.  
  440. ------------------------------------------------------------------------------- 
  441. -- Shows the silverlink logo via visible flag... 
  442. -- @bool 	is_visible 		Should the logo be displayed? 
  443. -- 
  444. function main_menu_silverlink_logo_is_visible(is_visible) 
  445. 	local silverlink_logo_h = vint_object_find("silverlink_logo", 0, Main_menu_common_doc_h) 
  446. 	vint_set_property(silverlink_logo_h, "visible", is_visible) 
  447. end 
  448.  
  449. ------------------------------------------------------------------------------- 
  450. -- Shows the silverlink login via animation... 
  451. -- @bool 	is_visible 		Should the logo be displayed? 
  452. -- 
  453. function main_menu_silverlink_login_show(is_visible) 
  454. 	local in_anim_h = vint_object_find("silverlink_login_in_anim", 0, Main_menu_common_doc_h) 
  455. 	local out_anim_h = vint_object_find("silverlink_login_out_anim", 0, Main_menu_common_doc_h) 
  456. 	if is_visible then 
  457. 		vint_set_property(in_anim_h, "is_paused", true) 
  458. 		lua_play_anim(in_anim_h, 0, Main_menu_common_doc_h) 
  459. 	else 
  460. 		vint_set_property(out_anim_h, "is_paused", true) 
  461. 		lua_play_anim(out_anim_h, 0, Main_menu_common_doc_h) 
  462. 	end 
  463. end 
  464.  
  465. ------------------------------------------------------------------------------- 
  466. -- Updates the display login... 
  467. -- 
  468. function main_menu_silverlink_update_login(display_login) 
  469. 	local logged_in_text_h = vint_object_find("logged_in_text", 0, Main_menu_common_doc_h) 
  470. 	 
  471. 	if display_login then 
  472. 		--Get login data from game... 
  473. 		local login_id_tag = silverlink_get_login() 
  474.  
  475. 		--prepare string with login data and update text tag... 
  476. 		local insert_values = { [0] = login_id_tag} 
  477. 		local login_string = vint_insert_values_in_string("SL_LOGIN_DISPLAY", insert_values) 
  478. 		vint_set_property(logged_in_text_h, "text_tag", login_string) 
  479. 	end 
  480. 	vint_set_property(logged_in_text_h, "visible", display_login) 
  481. end 
  482.