Cte_cid_lens_doc_handle = -1
local Binoc_grp_h = -1
local Fill_1_h = -1
local Fill_2_h = -1
local Frame_1_h = -1
local Frame_2_h = -1
local Frame_3_h = -1
local Frame_4_h = -1
local Dashes_1_h = -1
local Dashes_2_h = -1
local Dashes_3_h = -1
local Dashes_4_h = -1
local Dashes_5_h = -1
local Bracket_1_h = -1
local Bracket_2_h = -1
local Bracket_3_h = -1
local Bracket_4_h = -1
local Bracket_ref_1_h = -1
local Bracket_ref_2_h = -1
local Bracket_ref_3_h = -1
local Bracket_ref_4_h = -1
function cte_cid_lens_init()
pause_map_dump()
-- Delay loading new peg until pause map is fully dumped.
thread_new("cte_cid_lens_peg_delay_load")
Cte_cid_lens_doc_handle = vint_document_find("cte_cid_lens")
Binoc_grp_h = vint_object_find("binoc_grp", 0, Cte_cid_lens_doc_handle)
Fill_1_h = vint_object_find("fill_1", 0, Cte_cid_lens_doc_handle)
Fill_2_h = vint_object_find("fill_2", 0, Cte_cid_lens_doc_handle)
Frame_1_h = vint_object_find("frame_1", 0, Cte_cid_lens_doc_handle)
Frame_2_h = vint_object_find("frame_2", 0, Cte_cid_lens_doc_handle)
Frame_3_h = vint_object_find("frame_3", 0, Cte_cid_lens_doc_handle)
Frame_4_h = vint_object_find("frame_4", 0, Cte_cid_lens_doc_handle)
Dashes_1_h = vint_object_find("dashes_1", 0, Cte_cid_lens_doc_handle)
Dashes_2_h = vint_object_find("dashes_2", 0, Cte_cid_lens_doc_handle)
Dashes_3_h = vint_object_find("dashes_3", 0, Cte_cid_lens_doc_handle)
Dashes_4_h = vint_object_find("dashes_4", 0, Cte_cid_lens_doc_handle)
Dashes_5_h = vint_object_find("dashes_5", 0, Cte_cid_lens_doc_handle)
Bracket_1_h = vint_object_find("bracket_1", 0, Cte_cid_lens_doc_handle)
Bracket_2_h = vint_object_find("bracket_2", 0, Cte_cid_lens_doc_handle)
Bracket_3_h = vint_object_find("bracket_3", 0, Cte_cid_lens_doc_handle)
Bracket_4_h = vint_object_find("bracket_4", 0, Cte_cid_lens_doc_handle)
Bracket_ref_1_h = vint_object_find("bracket_ref_1", 0, Cte_cid_lens_doc_handle)
Bracket_ref_2_h = vint_object_find("bracket_ref_2", 0, Cte_cid_lens_doc_handle)
Bracket_ref_3_h = vint_object_find("bracket_ref_3", 0, Cte_cid_lens_doc_handle)
Bracket_ref_4_h = vint_object_find("bracket_ref_4", 0, Cte_cid_lens_doc_handle)
local binco_img_h = vint_object_find("bincoc", 0, Cte_cid_lens_doc_handle)
vint_set_property(binco_img_h, "visible", false)
vint_set_property(Binoc_grp_h, "visible", false)
end
function cte_cid_lens_cleanup()
game_peg_unload("ui_bms_cid_lens")
pause_map_restore()
end
function cte_cid_lens_peg_delay_load()
delay(1)
cte_cid_lens_peg_load()
end
function cte_cid_lens_peg_load()
game_peg_load_with_cb("cte_cid_lens_peg_load_complete", 1, "ui_bms_cid_lens")
end
function cte_cid_lens_peg_load_complete()
--vint_set_property(Binoc_h, "image", "ui_blank")
vint_set_property(Fill_1_h, "image", "ui_blank")
vint_set_property(Fill_2_h, "image", "ui_blank")
vint_set_property(Frame_1_h, "image", "ui_cid_frame")
vint_set_property(Frame_2_h, "image", "ui_cid_frame")
vint_set_property(Frame_3_h, "image", "ui_cid_frame")
vint_set_property(Frame_4_h, "image", "ui_cid_frame")
vint_set_property(Dashes_1_h, "image", "ui_rotate_1")
vint_set_property(Dashes_2_h, "image", "ui_rotate_1")
vint_set_property(Dashes_3_h, "image", "ui_rotate_1")
vint_set_property(Dashes_4_h, "image", "ui_rotate_1")
vint_set_property(Dashes_5_h, "image", "ui_rotate_1")
vint_set_property(Bracket_1_h, "image", "ui_hub_radial_bracket")
vint_set_property(Bracket_2_h, "image", "ui_hub_radial_bracket")
vint_set_property(Bracket_3_h, "image", "ui_hub_radial_bracket")
vint_set_property(Bracket_4_h, "image", "ui_hub_radial_bracket")
vint_set_property(Bracket_ref_1_h, "image", "ui_hub_radial_bracket")
vint_set_property(Bracket_ref_2_h, "image", "ui_hub_radial_bracket")
vint_set_property(Bracket_ref_3_h, "image", "ui_hub_radial_bracket")
vint_set_property(Bracket_ref_4_h, "image", "ui_hub_radial_bracket")
--play looping anim
local idle_anim_h = vint_object_find("idle_anim", 0, Cte_cid_lens_doc_handle)
vint_apply_start_values(idle_anim_h)
lua_play_anim(idle_anim_h)
end
function cte_cid_lens_on()
vint_set_property(Binoc_grp_h, "visible", true)
end
function cte_cid_lens_off()
vint_set_property(Binoc_grp_h, "visible", false)
end