./cte_binoc_only.lua

  1. Cte_binoc_only_doc_handle = -1 
  2.  
  3. local Binoc_grp_h = -1 
  4. local Binoc_h = -1 
  5.  
  6. function cte_binoc_only_init() 
  7. 	 
  8. 	pause_map_dump() 
  9. 	 
  10. 	-- Delay loading new peg until pause map is fully dumped. 
  11. 	thread_new("cte_binoc_only_peg_delay_load") 
  12. 	 
  13. 	Cte_binoc_only_doc_handle = vint_document_find("cte_binoc_only") 
  14. 	Binoc_grp_h = vint_object_find("binoc_grp", 0, Cte_binoc_only_doc_handle) 
  15. 	Binoc_h = vint_object_find("binoc", 0, Cte_binoc_only_doc_handle) 
  16. 	 
  17. 	vint_set_property(Binoc_grp_h, "visible", false) 
  18. 	 
  19. end 
  20.  
  21.  
  22. function cte_binoc_only_peg_delay_load() 
  23. 	delay(2) 
  24. 	cte_binoc_only_peg_load() 
  25. end 
  26.  
  27. function cte_binoc_only_peg_load() 
  28. 	game_peg_load_with_cb("cte_binoc_only_peg_load_complete",1,"ui_cte_binoc") 
  29. end 
  30.  
  31. function cte_binoc_only_peg_load_complete() 
  32. 	vint_set_property(Binoc_h, "image", "ui_cte_binoc") 
  33. end 
  34.  
  35.  
  36.  
  37. --binoc 
  38.  
  39. function cte_binoc_only_on() 
  40. 	vint_set_property(Binoc_grp_h, "visible", true) 
  41. end 
  42.  
  43. function cte_binoc_only_off() 
  44. 	vint_set_property(Binoc_grp_h, "visible", false) 
  45. end 
  46.  
  47.  
  48. function cte_binoc_only_cleanup() 
  49. 	game_peg_unload("ui_cte_binoc") 
  50. 	pause_map_restore() 
  51. end 
  52.  
  53.