local f0_local0 = module local f0_local1, f0_local2 = ... f0_local0( f0_local1, package.seeall ) CoD.PrintModuleLoad( _NAME ) IntelTable = { File = "mp/alien/alien_armory_intel.csv", Size = 13, Cols = { index = 0, menu_order = 1, type = 2, audio_caption = 3, map_name = 4, locked_text = 5, intel_name = 6, audio = 7, img2 = 8, bink3 = 9, subject = 10, file_num = 11, red_text1 = 12, red_text2 = 13, red_text3 = 14, audio_snip = 15, ingame_splash_title = 16, custom_audio_track = 17 }, Unlocked = {} } g_available_episodes = {} g_episode_array_index = 1 g_episode = 1 g_map = "mp_alien_armory" function aliens_intel_update_episode( f1_arg0 ) g_episode_array_index = g_episode_array_index + f1_arg0 if g_episode_array_index < 1 then g_episode_array_index = #g_available_episodes elseif g_episode_array_index > #g_available_episodes then g_episode_array_index = 1 end aliens_intel_update_globals( g_available_episodes[g_episode_array_index] ) IntelTable.Unlocked = {} set_unlocked_table() end function aliens_intel_generate_available_episodes() if Engine.IsXbox360() and Engine.IsXenonDevTitle() then g_available_episodes[#g_available_episodes + 1] = 1 g_available_episodes[#g_available_episodes + 1] = 2 g_available_episodes[#g_available_episodes + 1] = 3 g_available_episodes[#g_available_episodes + 1] = 4 else if Engine.AnyoneHasAliensDLC1() then g_available_episodes[#g_available_episodes + 1] = 1 end if Engine.AnyoneHasAliensDLC2() then g_available_episodes[#g_available_episodes + 1] = 2 end if Engine.AnyoneHasAliensDLC3() then g_available_episodes[#g_available_episodes + 1] = 3 end if Engine.AnyoneHasAliensDLC4() then g_available_episodes[#g_available_episodes + 1] = 4 end end end function aliens_intel_menu_initialize() IntelTable.Unlocked = {} g_available_episodes = {} g_episode_array_index = 1 aliens_intel_generate_available_episodes() local f3_local0 = Engine.GetDvarString( "ui_mapname" ) local f3_local1 = 0 if f3_local0 == "mp_alien_town" then f3_local1 = g_available_episodes[1] elseif f3_local0 == "mp_alien_armory" then if Engine.AnyoneHasAliensDLC1() then f3_local1 = 1 else f3_local1 = g_available_episodes[1] end elseif f3_local0 == "mp_alien_beacon" then if Engine.AnyoneHasAliensDLC2() then f3_local1 = 2 else f3_local1 = g_available_episodes[1] end elseif f3_local0 == "mp_alien_dlc3" then if Engine.AnyoneHasAliensDLC3() then f3_local1 = 3 else f3_local1 = g_available_episodes[1] end elseif f3_local0 == "mp_alien_last" then if Engine.AnyoneHasAliensDLC4() then f3_local1 = 4 else f3_local1 = g_available_episodes[1] end end if f3_local1 == 0 then f3_local1 = 1 end aliens_intel_update_globals( f3_local1 ) for f3_local5, f3_local6 in ipairs( g_available_episodes ) do if f3_local6 == f3_local1 then g_episode_array_index = f3_local5 end end set_unlocked_table() end function aliens_intel_update_globals( f4_arg0 ) if f4_arg0 == 1 then g_episode = 1 g_map = "mp_alien_armory" IntelTable.File = "mp/alien/alien_armory_intel.csv" IntelTable.Size = 13 elseif f4_arg0 == 2 then g_episode = 2 g_map = "mp_alien_beacon" IntelTable.File = "mp/alien/alien_beacon_intel.csv" IntelTable.Size = 9 elseif f4_arg0 == 3 then g_episode = 3 g_map = "mp_alien_dlc3" IntelTable.File = "mp/alien/alien_dlc3_intel.csv" IntelTable.Size = 6 elseif f4_arg0 == 4 then g_episode = 4 g_map = "mp_alien_last" IntelTable.File = "mp/alien/alien_last_intel.csv" IntelTable.Size = 8 end end function set_unlocked_table() local f5_local0 = 1 local f5_local1 = 0 local f5_local2 = LUI.FlowManager.GetMenuScopedDataByMenuName( "aliens_intel_main" ) local f5_local3 = f5_local2.exclusiveController local f5_local4 = Engine.GetPlayerDataReservedInt( f5_local3, CoD.StatsGroup.Coop, "intel_episode_" .. g_episode .. "_sequenced_count" ) for f5_local5 = 1, IntelTable.Size, 1 do local f5_local8 = Engine.TableLookup( IntelTable.File, IntelTable.Cols.menu_order, f5_local5, IntelTable.Cols.type ) if f5_local8 == "dossier" then IntelTable.Unlocked[f5_local5] = 1 end if f5_local8 == "intercept" then if Engine.GetPlayerDataReservedInt( f5_local3, CoD.StatsGroup.Coop, "intel_episode_" .. g_episode .. "_location_" .. f5_local0 ) == 1 then IntelTable.Unlocked[f5_local5] = 1 else IntelTable.Unlocked[f5_local5] = 0 end f5_local0 = f5_local0 + 1 end if f5_local8 == "nightfall" then if f5_local1 < f5_local4 then IntelTable.Unlocked[f5_local5] = 1 f5_local1 = f5_local1 + 1 else IntelTable.Unlocked[f5_local5] = 0 end end end end function aliens_calculate_intel_num_collected( f6_arg0, f6_arg1 ) local f6_local0 = 0 if f6_arg0 then f6_local0 = 1 end for f6_local4, f6_local5 in ipairs( IntelTable.Unlocked ) do if f6_local5 == 1 then f6_local0 = f6_local0 + 1 end end if f6_arg0 and LUI.mp_menus.Aliens.OutroVideoUnlocked( f6_arg1, g_episode ) then f6_local0 = f6_local0 + 1 end return f6_local0 end function HandleAliensIntel( f7_arg0, f7_arg1 ) LUI.FlowManager.RequestAddMenu( f7_arg0, "aliens_intel_main", true, f7_arg1.controller, false ) end function GetAliensIntelButton() return { type = "UIGenericButton", id = "aliens_intel_main_btn_id", properties = { button_text = Engine.Localize( "@LUA_MENU_INTEL_CAPS" ), desc_text = Engine.Localize( "@LUA_MENU_CLASSIFIED_DESC" ), button_action_func = HandleAliensIntel } } end function exit_aliens_intel_main( f9_arg0 ) Engine.StopMenuVideo() PersistentBackground.Show() LUI.mp_menus.Aliens.SwapExtinctionMapMusic( LUI.mp_menus.Aliens.GetExtinctionMapMusic() ) end function AliensIntelSwapBink( f10_arg0, f10_arg1, f10_arg2 ) if f10_arg1 then local f10_local0 = 1 if Engine.IsPS3() then f10_local0 = 0 end if f10_arg0 == 0 then Engine.PlayMenuVideo( g_map .. "_" .. f10_arg2, f10_local0 ) Engine.StopMusic( 200 ) else Engine.PlayMenuVideo( Engine.TableLookup( IntelTable.File, IntelTable.Cols.menu_order, f10_arg0, IntelTable.Cols.bink3 ), f10_local0 ) if tonumber( Engine.TableLookup( IntelTable.File, IntelTable.Cols.menu_order, f10_arg0, IntelTable.Cols.custom_audio_track ) ) == 1 then Engine.StopMusic( 200 ) else Engine.PlayMusic( CoD.Music.MainExtinctIntelMusic ) end end end end function aliens_intel_menu_button( f11_arg0, f11_arg1 ) local f11_local0 = 42 local f11_local1 = (f11_local0 - f11_arg1.intel_icon_dims) * 0.5 local self = LUI.UIButton.new() self.id = "aliens_intel_button_id" self.properties = {} self:registerAnimationState( "default", { leftAnchor = true, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 0, right = 0, top = 0, bottom = f11_local0 } ) self:animateToState( "default" ) local f11_local3 = LUI.UIImage.new() f11_local3.id = "btn_divider_id" f11_local3:registerAnimationState( "default", { material = RegisterMaterial( "white" ), leftAnchor = true, rightAnchor = true, topAnchor = false, bottomAnchor = true, left = 0, right = 0, top = 0, bottom = 1, red = 1, green = 1, blue = 1, alpha = 0.1 } ) f11_local3:animateToState( "default" ) self:addElement( f11_local3 ) local f11_local4 = LUI.UIImage.new() f11_local4.id = "btn_bkg_id" f11_local4:registerAnimationState( "default", { material = RegisterMaterial( "btn_alien_loadout_rtcap_f" ), leftAnchor = true, rightAnchor = true, topAnchor = true, bottomAnchor = true, left = 0, right = 0, top = 0, bottom = 16, red = 1, green = 1, blue = 1, alpha = 0 } ) f11_local4:registerAnimationState( "dimmed", { red = 1, green = 1, blue = 1, alpha = 0.5 } ) f11_local4:registerAnimationState( "focus", { red = 1, green = 1, blue = 1, alpha = 0.8 } ) f11_local4:registerEventHandler( "button_over", MBh.AnimateLoop( { { "focus", 0 }, { "dimmed", 750 }, { "focus", 750 } } ) ) f11_local4:registerEventHandler( "button_up", MBh.AnimateToState( "default", 0 ) ) f11_local4:registerEventHandler( "button_locked", MBh.AnimateToState( "focus", 0 ) ) f11_local4:animateToState( "default" ) self:addElement( f11_local4 ) local f11_local5 = LUI.UIImage.new() f11_local5.id = "now_playing_id" f11_local5:registerAnimationState( "default", { material = RegisterMaterial( "alien_icon_intel_now_playing" ), leftAnchor = true, rightAnchor = false, topAnchor = false, bottomAnchor = false, left = 5, width = 32, height = 32, alpha = f11_arg1.intel_now_playing } ) f11_local5:registerAnimationState( "visible", { alpha = 1 } ) f11_local5:registerAnimationState( "invisible", { alpha = 0 } ) f11_local5:registerEventHandler( "now_playing", MBh.AnimateToState( "visible", 0 ) ) f11_local5:registerEventHandler( "not_playing", MBh.AnimateToState( "invisible", 0 ) ) f11_local5:animateToState( "default" ) self:addElement( f11_local5 ) if f11_arg1.intel_icon_dims > 0 then local f11_local6 = LUI.UIImage.new() f11_local6.id = "btn_img_id" f11_local6:registerAnimationState( "default", { material = RegisterMaterial( f11_arg1.intel_icon ), leftAnchor = true, rightAnchor = false, topAnchor = false, bottomAnchor = false, left = f11_local1, width = f11_arg1.intel_icon_dims, height = f11_arg1.intel_icon_dims, alpha = f11_arg1.intel_alpha } ) f11_local6:registerAnimationState( "visible", { alpha = f11_arg1.intel_alpha } ) f11_local6:registerAnimationState( "invisible", { alpha = 0 } ) f11_local6:registerEventHandler( "now_playing", MBh.AnimateToState( "invisible", 0 ) ) f11_local6:registerEventHandler( "not_playing", MBh.AnimateToState( "visible", 0 ) ) f11_local6:animateToState( "default" ) self:addElement( f11_local6 ) end local f11_local6 = LUI.UIText.new() f11_local6.id = "btn_name_text_id" f11_local6:registerAnimationState( "default", { font = CoD.TextSettings.NormalFont.Font, alignment = LUI.Alignment.Left, leftAnchor = true, rightAnchor = true, topAnchor = false, bottomAnchor = false, left = f11_arg1.intel_icon_dims + f11_local1 * 2, right = 0, top = -CoD.TextSettings.NormalFont.Height * 0.5, bottom = CoD.TextSettings.NormalFont.Height * 0.5, red = 0.7, green = 0.7, blue = 0.7, alpha = f11_arg1.intel_alpha } ) f11_local6:registerAnimationState( "focus", { red = 0, green = 0, blue = 0 } ) f11_local6:registerEventHandler( "button_over", MBh.AnimateToState( "focus", 0 ) ) f11_local6:registerEventHandler( "button_up", MBh.AnimateToState( "default", 0 ) ) f11_local6:registerEventHandler( "button_locked", MBh.AnimateToState( "focus", 0 ) ) f11_local6:setText( f11_arg1.intel_name ) f11_local6:animateToState( "default" ) self:addElement( f11_local6 ) return self end function AliensIntelListFeeder( f12_arg0 ) assert( f12_arg0.exclusiveController, "No Exclusive controller found when opening Extinction Intel Menu." ) local f12_local0 = {} local f12_local1 = "vf_lock" local f12_local2 = 48 local f12_local3 = "Locked" local f12_local4 = 1 f12_local0[1] = { type = "aliens_intel_menu_button", id = "aliens_intel_btn_id_" .. g_episode .. "_intro", properties = { intel_name = Engine.Localize( "@ALIEN_INTEL_FRONTEND_EXTINCTION_INTEL_INTRO" ), intel_icon_dims = 0, intel_now_playing = 1 }, handlers = { button_action = function ( f13_arg0, f13_arg1 ) AliensIntelSwapBink( 0, true, "intro" ) f13_arg0:dispatchEventToRoot( { name = "turn_off_now_playing", immediate = true } ) f13_arg0:dispatchEventToRoot( { name = "invis_text", immediate = true } ) f13_arg0:dispatchEventToChildren( { name = "now_playing", immediate = true } ) end } } for f12_local9, f12_local10 in ipairs( IntelTable.Unlocked ) do if g_map == "mp_alien_last" and f12_local9 == 8 then break elseif f12_local10 == 1 then f12_local1 = "alien_icon_intel_" .. Engine.TableLookup( IntelTable.File, IntelTable.Cols.menu_order, f12_local9, IntelTable.Cols.type ) f12_local3 = Engine.Localize( "@ALIEN_INTEL_FRONTEND_" .. Engine.TableLookup( IntelTable.File, IntelTable.Cols.menu_order, f12_local9, IntelTable.Cols.intel_name ) ) f12_local2 = 32 f12_local4 = 1 else f12_local1 = "vf_lock" local f12_local8 = Engine.TableLookup( IntelTable.File, IntelTable.Cols.menu_order, f12_local9, IntelTable.Cols.type ) if f12_local8 == "nightfall" then f12_local3 = Engine.Localize( "@ALIEN_INTEL_FRONTEND_EXTINCTION_CLASSIFIED_INTEL" ) elseif f12_local8 == "intercept" then f12_local3 = Engine.Localize( "@ALIEN_INTEL_FRONTEND_EXTINCTION_ENCRYPTED" ) end f12_local2 = 48 f12_local4 = 0.5 end f12_local0[#f12_local0 + 1] = { type = "aliens_intel_menu_button", id = "aliens_intel_btn_id_" .. g_episode .. "_" .. f12_local9, properties = { intel_icon = f12_local1, intel_name = f12_local3, intel_icon_dims = f12_local2, intel_alpha = f12_local4, intel_now_playing = 0 }, handlers = { button_action = function ( f14_arg0, f14_arg1 ) if f12_local10 == 1 then AliensIntelSwapBink( f12_local9, f12_local10 ) f14_arg0:dispatchEventToRoot( { name = "turn_off_now_playing", immediate = true } ) f14_arg0:dispatchEventToRoot( { name = "update_intel", immediate = true, new_index = f12_local9 } ) f14_arg0:dispatchEventToChildren( { name = "now_playing", immediate = true } ) end end } } end f12_local5 = LUI.mp_menus.Aliens.OutroVideoUnlocked( f12_arg0.exclusiveController, g_episode ) if f12_local5 then f12_local1 = "none" f12_local3 = Engine.Localize( "@ALIEN_INTEL_FRONTEND_EXTINCTION_INTEL_OUTRO" ) f12_local2 = 0 f12_local4 = 1 else f12_local1 = "vf_lock" f12_local3 = Engine.Localize( "@ALIEN_INTEL_FRONTEND_EF_OUTRO_LOCKED" ) f12_local2 = 48 f12_local4 = 0.5 end f12_local0[#f12_local0 + 1] = { type = "aliens_intel_menu_button", id = "aliens_intel_btn_id_" .. g_episode .. "_outro", properties = { intel_icon = f12_local1, intel_name = f12_local3, intel_icon_dims = f12_local2, intel_alpha = f12_local4, intel_now_playing = 0 }, handlers = { button_action = function ( f15_arg0, f15_arg1 ) if f12_local5 then AliensIntelSwapBink( 0, true, "outro" ) f15_arg0:dispatchEventToRoot( { name = "turn_off_now_playing", immediate = true } ) f15_arg0:dispatchEventToRoot( { name = "invis_text", immediate = true } ) f15_arg0:dispatchEventToChildren( { name = "now_playing", immediate = true } ) end end } } if g_map == "mp_alien_last" then if 1 == IntelTable.Unlocked[8] then f12_local1 = "alien_icon_intel_" .. Engine.TableLookup( IntelTable.File, IntelTable.Cols.menu_order, 8, IntelTable.Cols.type ) f12_local3 = Engine.Localize( "@ALIEN_INTEL_FRONTEND_" .. Engine.TableLookup( IntelTable.File, IntelTable.Cols.menu_order, 8, IntelTable.Cols.intel_name ) ) f12_local2 = 32 f12_local4 = 1 else f12_local1 = "vf_lock" f12_local3 = Engine.Localize( "@ALIEN_INTEL_FRONTEND_EXTINCTION_TOP_SECRET" ) f12_local2 = 48 f12_local4 = 0.5 end f12_local0[#f12_local0 + 1] = { type = "aliens_intel_menu_button", id = "aliens_intel_btn_id_" .. g_episode .. "_" .. 8, properties = { intel_icon = f12_local1, intel_name = f12_local3, intel_icon_dims = f12_local2, intel_alpha = f12_local4, intel_now_playing = 0 }, handlers = { button_action = function ( f16_arg0, f16_arg1 ) if IntelTable.Unlocked[8] == 1 then AliensIntelSwapBink( 8, 1 ) f16_arg0:dispatchEventToRoot( { name = "turn_off_now_playing", immediate = true } ) f16_arg0:dispatchEventToRoot( { name = "update_intel", immediate = true, new_index = 8 } ) f16_arg0:dispatchEventToChildren( { name = "now_playing", immediate = true } ) end end } } end return f12_local0 end function aliens_intel_main() local f17_local0 = Engine.Localize( ButtonMap.button_shoulderr.string ) local f17_local1 = Engine.Localize( ButtonMap.button_shoulderl.string ) local f17_local2 = 1 if 1 == #g_available_episodes then f17_local2 = 0 end local f17_local3 = Engine.IsConsoleGame() if not f17_local3 then f17_local3 = Engine.IsGamepadEnabled() == 1 end if not f17_local3 then f17_local0 = Engine.Localize( ButtonMap.button_shoulderr.keyboard_string ) f17_local1 = Engine.Localize( ButtonMap.button_shoulderl.keyboard_string ) end local f17_local4 = { type = "UIElement", id = "aliens_intel_id", properties = {}, states = { default = { topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = true, top = 0, bottom = 0, left = 0, right = 0 } }, handlers = { menu_create = function ( f18_arg0, f18_arg1 ) PersistentBackground.Hide() Engine.Exec( "uploadstats", f18_arg0.properties.exclusiveController ) Engine.StopMusic( 200 ) if Engine.IsConsoleGame() or Engine.IsGamepadEnabled() == 1 then f18_arg0:dispatchEventToRoot( { name = "add_button_helper_text", button_ref = "button_action", helper_text = Engine.Localize( "@ALIENS_SELECT" ), side = "left", clickable = false } ) end end }, children = { { type = "generic_menu_title", id = "aliens_intel_main_title_text_id", properties = { menu_title = Engine.Localize( "@ALIEN_INTEL_FRONTEND_EXTINCTION_INTEL_CAPS" ) } }, { type = "UIText", id = "aliens_intel_main_bumper_l_id", properties = { text = f17_local1 }, states = { default = { font = CoD.TextSettings.ExtraBigFont.Font, alignment = LUI.Alignment.Center, leftAnchor = true, rightAnchor = false, topAnchor = false, bottomAnchor = false, top = -CoD.TextSettings.ExtraBigFont.Height / 2 - 246, bottom = CoD.TextSettings.ExtraBigFont.Height / 2 - 246, left = 106, right = 0, alpha = f17_local2 } } }, { type = "UIText", id = "aliens_intel_main_bumper_r_id", properties = { text = f17_local0 }, states = { default = { font = CoD.TextSettings.ExtraBigFont.Font, alignment = LUI.Alignment.Center, leftAnchor = true, rightAnchor = false, topAnchor = false, bottomAnchor = false, top = -CoD.TextSettings.ExtraBigFont.Height / 2 - 246, bottom = CoD.TextSettings.ExtraBigFont.Height / 2 - 246, left = 282, right = 0, alpha = f17_local2 } } }, { type = "UIText", id = "aliens_intel_main_episode_text_id", properties = { text = Engine.Localize( "@ALIEN_INTEL_FRONTEND_EXTINCTION_INTEL_EPISODE_CAPS", g_episode ) }, states = { default = { font = CoD.TextSettings.NormalFont.Font, alignment = LUI.Alignment.Center, leftAnchor = true, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 134, right = -998, top = 102, bottom = 102 + CoD.TextSettings.NormalFont.Height, red = 1, green = 1, blue = 1, alpha = 1 } }, handlers = { change_episode = function ( f19_arg0, f19_arg1 ) f19_arg0:setText( Engine.Localize( "@ALIEN_INTEL_FRONTEND_EXTINCTION_INTEL_EPISODE_CAPS", g_episode ) ) end } }, { type = "UIText", id = "aliens_intel_collected_text_id", properties = { text = Engine.Localize( "@ALIEN_INTEL_FRONTEND_EXTINCTION_INTEL_COLLECTED", 0, 0 ) }, states = { default = { font = CoD.TextSettings.NormalFont.Font, alignment = LUI.Alignment.Right, leftAnchor = false, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 0, right = -120, top = 60, bottom = 60 + CoD.TextSettings.NormalFont.Height, red = Colors.grey_4.r, green = Colors.grey_4.g, blue = Colors.grey_4.b, alpha = 1 } }, handlers = { menu_create = function ( f20_arg0, f20_arg1 ) f20_arg0:setText( Engine.Localize( "@ALIEN_INTEL_FRONTEND_EXTINCTION_INTEL_COLLECTED", aliens_calculate_intel_num_collected( true, f20_arg1.controller ), IntelTable.Size + 2 ) ) end, change_episode = function ( f21_arg0, f21_arg1 ) f21_arg0:processEvent( { name = "menu_create", immediate = true, controller = f21_arg1.controller } ) end } }, { type = "generic_menu_background_withfade", id = "aliens_intel_menu_fade_id", properties = { fill_alpha = 0, top_offset = 0 }, states = { default = { leftAnchor = true, rightAnchor = false, topAnchor = true, bottomAnchor = false, left = 96, right = 322, top = 100, bottom = GenericMenuDims.menu_bottom } } }, { type = "generic_menu_background", id = " aliens_intel_menu_title_bar", properties = { hide_bottom = true }, states = { default = { leftAnchor = true, rightAnchor = false, topAnchor = true, bottomAnchor = false, left = 96, right = 322, top = 104 + CoD.TextSettings.NormalFont.Height } } }, { type = "UIScrollingVerticalList", id = "aliens_intel_list_id", properties = { use_scrollbar = true, bar_width = 8, exclusiveController = MBh.Property( "exclusiveController" ) }, states = { default = { alignment = LUI.Alignment.Top, leftAnchor = true, rightAnchor = false, topAnchor = true, bottomAnchor = false, left = 100, right = 310, top = 136, bottom = GenericMenuDims.menu_bottom, spacing = 1, alpha = 1 } }, handlers = { turn_off_now_playing = function ( f22_arg0, f22_arg1 ) local f22_local0 = f22_arg0:getFirstChild() while f22_local0 do f22_local0:dispatchEventToChildren( { name = "not_playing", immediate = true } ) f22_local0 = f22_local0:getNextSibling() end end, change_episode = function ( f23_arg0, f23_arg1 ) f23_arg0:processEvent( { name = "menu_refresh", immediate = true } ) f23_arg0:dispatchEventToRoot( { name = "invis_text", immediate = true } ) AliensIntelSwapBink( 0, true, "intro" ) end }, childrenFeeder = AliensIntelListFeeder }, { type = "UIImage", id = "cinematic_image_id", states = { default = { material = RegisterMaterial( "cinematic" ), leftAnchor = true, rightAnchor = false, topAnchor = true, bottomAnchor = false, left = 324, right = 1190, top = 100, bottom = 630 } } }, { type = "UIText", id = "subject_name_id", properties = { text = Engine.Localize( "@ALIEN_INTEL_FRONTEND_" .. Engine.TableLookup( IntelTable.File, IntelTable.Cols.menu_order, 1, IntelTable.Cols.subject ) ) }, states = { default = { font = CoD.TextSettings.ExtraBigFont.Font, alignment = LUI.Alignment.Left, leftAnchor = true, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 522, right = 0, top = 112, bottom = 112 + CoD.TextSettings.ExtraBigFont.Height, red = 0, green = 0, blue = 0, alpha = 0 }, visible = { alpha = 1 } }, handlers = { invis_text = function ( f24_arg0, f24_arg1 ) f24_arg0:animateToState( "default" ) end, update_intel = function ( f25_arg0, f25_arg1 ) if g_episode == 1 then f25_arg0:animateToState( "visible" ) f25_arg0:setText( Engine.Localize( "@ALIEN_INTEL_FRONTEND_" .. Engine.TableLookup( IntelTable.File, IntelTable.Cols.menu_order, f25_arg1.new_index, IntelTable.Cols.subject ) ) ) end end } }, { type = "UIText", id = "file_num_text_id", properties = { text = Engine.Localize( "@ALIEN_INTEL_FRONTEND_" .. Engine.TableLookup( IntelTable.File, IntelTable.Cols.menu_order, 1, IntelTable.Cols.file_num ) ) }, states = { default = { font = CoD.TextSettings.NormalFont.Font, alignment = LUI.Alignment.Left, leftAnchor = true, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 482, right = 0, top = 473, bottom = 473 + CoD.TextSettings.NormalFont.Height, red = Colors.grey_4.r, green = Colors.grey_4.g, blue = Colors.grey_4.b, alpha = 0 }, visible = { alpha = 1 }, invisible = { alpha = 0 } }, handlers = { invis_text = function ( f26_arg0, f26_arg1 ) f26_arg0:animateToState( "default" ) end, update_intel = function ( f27_arg0, f27_arg1 ) if g_episode == 1 then f27_arg0:setText( Engine.Localize( "@ALIEN_INTEL_FRONTEND_" .. Engine.TableLookup( IntelTable.File, IntelTable.Cols.menu_order, f27_arg1.new_index, IntelTable.Cols.file_num ) ) ) local f27_local0 = MBh.AnimateSequence( { { "invisible", 0 }, { "invisible", 100 }, { "visible", 1000 } } ) f27_local0( f27_arg0, {} ) end end } }, { type = "generic_back_button", id = "aliens_intel_main_back_id" }, { type = "UIBindButton", id = "aliens_intel_main_back_id", handlers = { button_shoulderr = function ( f28_arg0, f28_arg1 ) if #g_available_episodes > 1 then aliens_intel_update_episode( 1 ) f28_arg0:dispatchEventToRoot( { name = "change_episode", immediate = true, controller = f28_arg1.controller } ) end end, button_shoulderl = function ( f29_arg0, f29_arg1 ) if #g_available_episodes > 1 then aliens_intel_update_episode( -1 ) f29_arg0:dispatchEventToRoot( { name = "change_episode", immediate = true, controller = f29_arg1.controller } ) end end } }, { type = "button_helper_text_main", id = "aliens_intel_helper_text_id", handlers = { menu_create = function ( f30_arg0, f30_arg1 ) f30_arg0:dispatchEventToRoot( LUI.ButtonHelperText.CommonEvents.addBackButton ) if #g_available_episodes > 1 then f30_arg0:processEvent( { name = "add_button_helper_text", priority = 1, button_ref = "button_shoulderl", button_ref2 = "button_shoulderr", helper_text = Engine.Localize( "ALIEN_INTEL_FRONTEND_EXTINCTION_INTEL_TOGGLE_EPISODE" ), side = "left", clickable = true, immediate = true } ) end end } }, { type = "online_friends_widget", id = "online_friends_widget_id" } } } return AliensIntelSwapBink( 0, true, "intro" ) end LUI.FlowManager.RegisterStackPushBehaviour( "aliens_intel_main", aliens_intel_menu_initialize ) LUI.MenuBuilder.registerDef( "aliens_intel_main", aliens_intel_main ) LUI.MenuBuilder.registerType( "aliens_intel_menu_button", aliens_intel_menu_button ) LUI.FlowManager.RegisterStackPopBehaviour( "aliens_intel_main", exit_aliens_intel_main ) LockTable( _M )