./cte_cid_lens.lua

  1. Cte_cid_lens_doc_handle = -1 
  2.  
  3. local Binoc_grp_h = -1 
  4. local Fill_1_h = -1 
  5. local Fill_2_h = -1 
  6. local Frame_1_h = -1 
  7. local Frame_2_h = -1 
  8. local Frame_3_h = -1 
  9. local Frame_4_h = -1 
  10. local Dashes_1_h = -1 
  11. local Dashes_2_h = -1 
  12. local Dashes_3_h = -1 
  13. local Dashes_4_h = -1 
  14. local Dashes_5_h = -1 
  15. local Bracket_1_h = -1 
  16. local Bracket_2_h = -1 
  17. local Bracket_3_h = -1 
  18. local Bracket_4_h = -1 
  19. local Bracket_ref_1_h = -1 
  20. local Bracket_ref_2_h = -1 
  21. local Bracket_ref_3_h = -1 
  22. local Bracket_ref_4_h = -1 
  23.  
  24. function cte_cid_lens_init() 
  25.                  
  26.    pause_map_dump() 
  27.                  
  28. 	-- Delay loading new peg until pause map is fully dumped. 
  29. 	thread_new("cte_cid_lens_peg_delay_load") 
  30. 	  
  31. 	Cte_cid_lens_doc_handle = vint_document_find("cte_cid_lens") 
  32. 	Binoc_grp_h = vint_object_find("binoc_grp", 0, Cte_cid_lens_doc_handle) 
  33. 	Fill_1_h = vint_object_find("fill_1", 0, Cte_cid_lens_doc_handle) 
  34. 	Fill_2_h = vint_object_find("fill_2", 0, Cte_cid_lens_doc_handle) 
  35. 	Frame_1_h = vint_object_find("frame_1", 0, Cte_cid_lens_doc_handle) 
  36. 	Frame_2_h = vint_object_find("frame_2", 0, Cte_cid_lens_doc_handle) 
  37. 	Frame_3_h = vint_object_find("frame_3", 0, Cte_cid_lens_doc_handle) 
  38. 	Frame_4_h = vint_object_find("frame_4", 0, Cte_cid_lens_doc_handle) 
  39. 	Dashes_1_h = vint_object_find("dashes_1", 0, Cte_cid_lens_doc_handle) 
  40. 	Dashes_2_h = vint_object_find("dashes_2", 0, Cte_cid_lens_doc_handle) 
  41.    Dashes_3_h = vint_object_find("dashes_3", 0, Cte_cid_lens_doc_handle) 
  42.    Dashes_4_h = vint_object_find("dashes_4", 0, Cte_cid_lens_doc_handle) 
  43. 	Dashes_5_h = vint_object_find("dashes_5", 0, Cte_cid_lens_doc_handle) 
  44. 	Bracket_1_h = vint_object_find("bracket_1", 0, Cte_cid_lens_doc_handle) 
  45. 	Bracket_2_h = vint_object_find("bracket_2", 0, Cte_cid_lens_doc_handle) 
  46. 	Bracket_3_h = vint_object_find("bracket_3", 0, Cte_cid_lens_doc_handle) 
  47. 	Bracket_4_h = vint_object_find("bracket_4", 0, Cte_cid_lens_doc_handle) 
  48. 	Bracket_ref_1_h = vint_object_find("bracket_ref_1", 0, Cte_cid_lens_doc_handle) 
  49. 	Bracket_ref_2_h = vint_object_find("bracket_ref_2", 0, Cte_cid_lens_doc_handle) 
  50. 	Bracket_ref_3_h = vint_object_find("bracket_ref_3", 0, Cte_cid_lens_doc_handle) 
  51. 	Bracket_ref_4_h = vint_object_find("bracket_ref_4", 0, Cte_cid_lens_doc_handle) 
  52. 				  
  53. 	local binco_img_h = vint_object_find("bincoc", 0, Cte_cid_lens_doc_handle) 
  54. 	vint_set_property(binco_img_h, "visible", false) 
  55. 	 
  56. 	vint_set_property(Binoc_grp_h, "visible", false)                 
  57. end 
  58.  
  59.  
  60. function cte_cid_lens_cleanup() 
  61.    game_peg_unload("ui_bms_cid_lens") 
  62.    pause_map_restore()              
  63. end 
  64.  
  65.  
  66. function cte_cid_lens_peg_delay_load() 
  67. 	delay(1) 
  68. 	cte_cid_lens_peg_load() 
  69. end 
  70.  
  71.  
  72. function cte_cid_lens_peg_load() 
  73.   game_peg_load_with_cb("cte_cid_lens_peg_load_complete", 1, "ui_bms_cid_lens") 
  74. end 
  75.  
  76.  
  77. function cte_cid_lens_peg_load_complete() 
  78. 		 
  79. 	--vint_set_property(Binoc_h, "image", "ui_blank") 
  80. 	vint_set_property(Fill_1_h, "image", "ui_blank") 
  81. 	vint_set_property(Fill_2_h, "image", "ui_blank") 
  82. 	vint_set_property(Frame_1_h, "image", "ui_cid_frame") 
  83. 	vint_set_property(Frame_2_h, "image", "ui_cid_frame") 
  84. 	vint_set_property(Frame_3_h, "image", "ui_cid_frame") 
  85. 	vint_set_property(Frame_4_h, "image", "ui_cid_frame") 
  86. 	vint_set_property(Dashes_1_h, "image", "ui_rotate_1") 
  87. 	vint_set_property(Dashes_2_h, "image", "ui_rotate_1") 
  88. 	vint_set_property(Dashes_3_h, "image", "ui_rotate_1") 
  89. 	vint_set_property(Dashes_4_h, "image", "ui_rotate_1") 
  90. 	vint_set_property(Dashes_5_h, "image", "ui_rotate_1") 
  91. 	vint_set_property(Bracket_1_h, "image", "ui_hub_radial_bracket") 
  92. 	vint_set_property(Bracket_2_h, "image", "ui_hub_radial_bracket") 
  93. 	vint_set_property(Bracket_3_h, "image", "ui_hub_radial_bracket") 
  94. 	vint_set_property(Bracket_4_h, "image", "ui_hub_radial_bracket") 
  95. 	vint_set_property(Bracket_ref_1_h, "image", "ui_hub_radial_bracket") 
  96. 	vint_set_property(Bracket_ref_2_h, "image", "ui_hub_radial_bracket") 
  97. 	vint_set_property(Bracket_ref_3_h, "image", "ui_hub_radial_bracket") 
  98. 	vint_set_property(Bracket_ref_4_h, "image", "ui_hub_radial_bracket") 
  99.  
  100. 	--play looping anim 
  101. 				  
  102. 	local idle_anim_h = vint_object_find("idle_anim", 0, Cte_cid_lens_doc_handle) 
  103. 	vint_apply_start_values(idle_anim_h) 
  104. 	lua_play_anim(idle_anim_h) 
  105. end 
  106.  
  107.  
  108. function cte_cid_lens_on() 
  109.   vint_set_property(Binoc_grp_h, "visible", true) 
  110. end 
  111.  
  112.  
  113. function cte_cid_lens_off() 
  114.   vint_set_property(Binoc_grp_h, "visible", false) 
  115. end 
  116.  
  117.  
  118.  
  119.