Msn_title_doc_handle = -1
function msn_title_init()
Msn_title_doc_handle = vint_document_find("msn_title")
vint_dataitem_add_subscription( "game_paused_item", "update", "msn_title_game_is_paused" )
thread_new( "msn_title_load_assets" )
end
function msn_title_load_assets()
pause_map_dump( true )
game_peg_load_with_cb("msn_title_peg_loaded", 2, "ui_msn_title_leave", "ui_msn_title_fryer")
end
function msn_title_peg_loaded()
local title_h = vint_object_find("title", 0, Msn_title_doc_handle)
vint_set_property(title_h, "image", "ui_msn_title_leave")
local ad1_h = vint_object_find("ad1", 0, Msn_title_doc_handle)
vint_set_property(ad1_h, "image", "ui_msn_title_fryer")
local anim_h = vint_object_find("title_anim", 0, Msn_title_doc_handle)
local twn_h = vint_object_find("end_event_twn", anim_h)
vint_set_property(twn_h, "end_event", "msn_title_unload")
vint_apply_start_values(anim_h)
lua_play_anim(anim_h)
end
function msn_title_game_is_paused( di_h )
local is_paused = vint_dataitem_get(di_h)
local root_anim_h = vint_object_find( "title_anim" )
vint_set_property( root_anim_h, "is_paused", is_paused )
end
function msn_title_unload()
game_peg_unload_wait("ui_msn_title_leave")
game_peg_unload_wait("ui_msn_title_fryer")
pause_map_restore()
pop_screen()
end
function msn_title_cleanup()
end