local f0_local0 = module local f0_local1, f0_local2 = ... f0_local0( f0_local1, package.seeall ) CoD.PrintModuleLoad( _NAME ) HighlightType = { MostHours = 0, MVP = 1, LatestRecruit = 2 } DownloadState = { ClanInformation = 0, PlayercardCache = 1, Done = 2 } function OnCreate( f1_arg0, f1_arg1 ) local f1_local0 = f1_arg1.controller local f1_local1 = LUI.FlowManager.GetMenuScopedDataFromElement( f1_arg0 ) f1_local1.clanWindow = f1_arg0:getFirstDescendentById( "clan_member_models_id" ) f1_local1.controller = f1_local0 f1_local1.remoteView = f1_arg0.properties.remoteView f1_local1.downloadState = DownloadState.ClanInformation f1_arg0:processEvent( { name = "hide_playercard" } ) f1_arg0:processEvent( { name = "update_header_text", string = Engine.Localize( "@CLANS_CLAN_PAGE_CAPS", Engine.MarkLocalized( f1_local1.remoteView and f1_arg0.properties.remotePlayerName or Engine.GetUsernameByController( f1_local0 ) ) ), dispatchChildren = true } ) end function UpdateClanDetails( f2_arg0, f2_arg1 ) local f2_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f2_arg0 ) local f2_local1 = f2_local0.controller UpdateClanCard( f2_arg0, f2_arg1 ) local f2_local2 = nil if f2_local0.remoteView then f2_local2 = Clan.GetRemoteClanWarInfo() else f2_local2 = { position = Clan.GetWarPosition( f2_local1 ), points = Clan.GetClanPoints( f2_local1 ), nodes = Clan.GetHeldNodeCount( f2_local1 ), division = Clan.GetClanDivision( f2_local1 ) } end f2_local2.name = "update_clan_war_info" f2_local2.dispatchChildren = true f2_arg0:processEvent( f2_local2 ) f2_arg0:processEvent( LUI.ButtonHelperText.CommonEvents.addBackButton ) if not f2_local0.remoteView then f2_arg0:processEvent( { name = "add_button_helper_text", button_ref = "button_alt2", helper_text = Engine.Localize( "@CLANS_ROSTER" ), side = "right", clickable = true, width = 190, priority = -1000 } ) end if f2_local0.remoteView then Clan.DownloadRemoteClanPlayercardCache( f2_local1 ) else Clan.DownloadClanPlayercardCache( f2_local1 ) end end function CheckDownloadStatus( f3_arg0, f3_arg1 ) local f3_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f3_arg0 ) if f3_local0.downloadState == DownloadState.ClanInformation then local f3_local1 = false if f3_local0.remoteView then f3_local1 = not Clan.IsDownloadingRemoteData( f3_local0.controller ) else f3_local1 = not Clan.IsDownloadingData( f3_local0.controller ) end if f3_local1 then local f3_local2 = f3_arg0:getFirstDescendentById( "clan_details_full_load_id" ) if f3_local2 then f3_local2:close() end UpdateClanDetails( f3_arg0, f3_arg1 ) f3_arg0:processEvent( { name = "show_clan_details" } ) f3_local0.downloadState = DownloadState.PlayercardCache end elseif f3_local0.downloadState == DownloadState.PlayercardCache then if RefreshCacheInfo( f3_arg0, f3_arg1 ) then f3_local0.downloadState = DownloadState.Done end else local f3_local1 = f3_arg0:getFirstDescendentById( "download_update_timer_id" ) f3_local1:close() end end function UpdateClanCard( f4_arg0, f4_arg1 ) local f4_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f4_arg0 ) local f4_local1 = f4_arg1.controller if not f4_local1 then f4_local1 = f4_arg0.properties.exclusiveController end local f4_local2 = { name = "update_clan_card" } local f4_local3 = 0 if f4_local0.remoteView then local f4_local4 = Clan.GetRemoteClanCardData() f4_local2.clan_name = f4_local4.name f4_local2.clan_tag = f4_local4.tag f4_local2.clan_level = f4_local4.level f4_local2.current_xp = f4_local4.xp f4_local2.xp_to_next = f4_local4.xpToNext f4_local2.next_level_progress = f4_local4.nextLevelProgress f4_local2.clan_motto = f4_local4.motto f4_local2.kd_ratio = f4_local4.kdRatio f4_local2.win_percent = f4_local4.winPercent f4_local2.member_count = f4_local4.memberCount f4_local2.reward_count = f4_local4.rewardCount f4_local3 = f4_local4.background else f4_local2.clan_name = Clan.GetName( f4_local1 ) f4_local2.clan_tag = Engine.GetClanTag( f4_local1 ) f4_local2.clan_level = Clan.GetLevel( f4_local1 ) f4_local2.current_xp = Clan.GetCurrentXP( f4_local1 ) f4_local2.xp_to_next = Clan.GetXPToNext( f4_local1 ) f4_local2.next_level_progress = Clan.GetNextLevelProgress( f4_local1 ) f4_local2.clan_motto = Clan.GetMotto( f4_local1 ) f4_local2.cxp_time = Clan.GetDCXPTime( f4_local1 ) f4_local2.kd_ratio = Clan.GetKDRatio( f4_local1 ) f4_local2.win_percent = Clan.GetWinPercent( f4_local1 ) f4_local2.member_count = Clan.GetMemberCount( f4_local1 ) f4_local2.reward_count = Clan.GetRewardCount( f4_local1 ) f4_local3 = Clan.GetBackground( f4_local1 ) end local f4_local4 = Engine.TableLookup( "mp/cac/clanbackgrounds.csv", 0, f4_local3, 1 ) if not f4_local4 or f4_local4 == "" then f4_local4 = "clan_page_bkground_001" end f4_local2.clan_background = f4_local4 if f4_local2.clan_tag == "" or f4_local2.clan_tag == nil then f4_local2.clan_tag = Engine.Localize( "@CLANS_NO_CLAN_TAG" ) end if f4_local2.clan_motto == "" or f4_local2.clan_motto == nil then f4_local2.clan_motto = Engine.Localize( "@CLANS_NO_CLAN_MOTTO" ) end f4_arg0:processEvent( f4_local2 ) end function UpdateLeaderCard( f5_arg0, f5_arg1 ) local f5_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f5_arg0 ) local f5_local1 = f5_local0.remoteView and Clan.GetRemoteLeaderPlayercard( f5_arg1 ) or Clan.GetLeaderPlayercard( f5_arg1 ) local f5_local2 = { name = "update_playercard" } if f5_local1.hasPlatformInfo then f5_local2.hasPlatformInfo = true f5_local2.gamertag = f5_local1.gamertag f5_local2.clantag = f5_local1.clantag f5_local2.rank = f5_local1.rank f5_local2.prestige = f5_local1.prestige f5_local2.background = f5_local1.background f5_local2.patchEmblem = f5_local1.patchEmblem f5_local2.patchShape = "0" else local f5_local3 = LUI.FlowManager.GetMenuScopedDataFromElement( f5_arg0 ) f5_local3.hasClassifiedInfo = true f5_local2.gamertag = Engine.Localize( "@CLANS_NON_PLATFORM_NAME" ) f5_local2.clantag = "" end f5_arg0:processEvent( f5_local2 ) f5_arg0:processEvent( { name = "show_playercard" } ) end function UpdateMemberHighlights( f6_arg0, f6_arg1 ) local f6_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f6_arg0 ) local f6_local1 = f6_local0.remoteView and Clan.GetRemoteHighlightCacheInfo( f6_arg1, HighlightType.MostHours ) or Clan.GetHighlightCacheInfo( f6_arg1, HighlightType.MostHours ) local f6_local2 = f6_local0.remoteView and Clan.GetRemoteHighlightCacheInfo( f6_arg1, HighlightType.MVP ) or Clan.GetHighlightCacheInfo( f6_arg1, HighlightType.MVP ) local f6_local3 = f6_local0.remoteView and Clan.GetRemoteHighlightCacheInfo( f6_arg1, HighlightType.LatestRecruit ) or Clan.GetHighlightCacheInfo( f6_arg1, HighlightType.LatestRecruit ) local f6_local4 = f6_local0.hasClassifiedInfo if not f6_local4 then if f6_local1.hasPlatformInfo and f6_local2.hasPlatformInfo then f6_local4 = not f6_local3.hasPlatformInfo else f6_local4 = true end end f6_local0.hasClassifiedInfo = f6_local4 f6_local0.clanWindow.modelData = { f6_local1, f6_local2, f6_local3 } f6_local4 = Engine.Localize( "@CLANS_NON_PLATFORM_NAME" ) f6_arg0:processEvent( { name = "update_member_highlights", controller = f6_arg1, dispatchChildren = true, most_hours = f6_local1.gamertag or f6_local4, mvp_name = f6_local2.gamertag or f6_local4, latest_name = f6_local3.gamertag or f6_local4 } ) end function RefreshCacheInfo( f7_arg0, f7_arg1 ) local f7_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f7_arg0 ) if not (not f7_local0.remoteView or not Clan.IsDownloadingRemoteClanPlayercards( f7_local0.controller )) or Clan.IsDownloadingClanPlayercards( f7_local0.controller ) then return false end local f7_local1 = f7_arg0:getFirstDescendentById( "leader_loading_widget_id" ) f7_local1:close() UpdateLeaderCard( f7_arg0, f7_local0.controller ) UpdateMemberHighlights( f7_arg0, f7_local0.controller ) if f7_local0.hasClassifiedInfo then f7_arg0:processEvent( { name = "show_classified_note" } ) end return true end function OpenClanRoster( f8_arg0, f8_arg1 ) local f8_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f8_arg0 ) if not f8_local0.remoteView and Engine.IsNetworkConnected() and Engine.IsUserSignedInToLive( f8_arg1.controller ) then LUI.FlowManager.RequestPopupMenu( f8_arg0, "popup_friends", true, f8_arg1.controller, false, { isClanRoster = true } ) end end function GetDivisionImage( f9_arg0 ) local f9_local0 = "" if f9_arg0 == 1 then f9_local0 = "icon_clan_level_diamond" elseif f9_arg0 == 2 then f9_local0 = "icon_clan_level_platinum" elseif f9_arg0 == 3 then f9_local0 = "icon_clan_level_gold" elseif f9_arg0 == 4 then f9_local0 = "icon_clan_level_silver" elseif f9_arg0 == 5 then f9_local0 = "icon_clan_level_bronze" end return f9_local0 end function BonusFeeder( f10_arg0 ) local f10_local0 = {} local f10_local1 = LUI.FlowManager.GetMenuScopedDataByMenuName( "clan_details_main" ) local f10_local2 = f10_arg0.exclusiveController local f10_local3 = math.min( 3, f10_local1.remoteView and Clan.GetRemoteClanBonusCount() or Clan.GetBonusCount( f10_local2 ) ) local f10_local4, f10_local5 = nil for f10_local6 = 0, f10_local3 - 1, 1 do if f10_local1.remoteView then f10_local4, f10_local5 = Clan.GetRemoteClanBonusByIndex( f10_local6 ) else f10_local4 = Clan.GetBonusValueByIndex( f10_local2, f10_local6 ) f10_local5 = Clan.GetBonusTypeByIndex( f10_local2, f10_local6 ) end f10_local0[#f10_local0 + 1] = { type = "clanwars_bonus_widget", id = "bonus_widget" .. f10_local6, properties = { value = tostring( f10_local4 ), gametype = f10_local5 } } end if #f10_local0 < 1 then f10_local0[#f10_local0 + 1] = { type = "UIText", id = "no_bonus_text_id", properties = { text = Engine.Localize( "@CLANS_NO_BONUSES" ) }, states = { default = { topAnchor = false, bottomAnchor = false, leftAnchor = true, rightAnchor = true, top = -CoD.TextSettings.NormalFont.Height * 0.5, height = CoD.TextSettings.NormalFont.Height, left = 0, right = 0, red = Colors.white.r, green = Colors.white.g, blue = Colors.white.b, font = CoD.TextSettings.NormalFont.Font, alignment = LUI.Alignment.Center } } } end return f10_local0 end function clan_details_member_highlight() return { type = "UIElement", properties = { charHandle = "default_handle", highlight_text = "", uv_values = { 0, 0, 0.33, 1 }, character_pos = CharacterCameraPresets.ClanDetails.Position }, states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = 0, height = 420, left = 0, width = 215 } }, children = { { type = "generic_menu_background_withfade", properties = { top_offset = GenericTitleBarDims.TitleBarHeight - 1, fill_alpha = 1 } }, { type = "UIText", id = "clan_member_highlight_name_id", properties = { text = "" }, states = { default = CoD.ColorizeState( Colors.primary_text_color, { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = GenericTitleBarDims.TitleBarHeight + 197, height = CoD.TextSettings.NormalFont.Height, left = -185, width = 400, alignment = LUI.Alignment.Right, font = CoD.TextSettings.NormalFont.Font, alpha = 0.5, zRot = 90 } ) }, handlers = { update_member_name = function ( f12_arg0, f12_arg1 ) f12_arg0:setText( f12_arg1.member_name or "" ) end } }, { type = "UIElement", id = "clan_member_highlight_award_bg_id", states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = true, top = 0, height = GenericTitleBarDims.TitleBarHeight, left = 0, right = 0 } }, children = { { type = "generic_menu_background", properties = { top_offset = 0, fill_alpha = 1, hide_bottom = true } }, { type = "UIText", id = "clan_member_highlight_award_text_id", properties = { text = MBh.Property( "highlight_text" ) }, states = { default = CoD.ColorizeState( Colors.primary_text_color, { topAnchor = false, bottomAnchor = false, leftAnchor = true, rightAnchor = true, left = 0, right = 0, height = CoD.TextSettings.NormalFont.Height, font = CoD.TextSettings.NormalFont.Font, align = LUI.Alignment.Center } ) } } } } } } end function clan_details_member_highlight_window() return { type = "UIElement", id = "clan_details_member_highlight_window_id", states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = 100, height = 420, left = 550, width = 600 } }, children = { { type = "UIHorizontalList", id = "clan_details_member_highlights_id", states = { default = { topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = false, top = 0, bottom = 0, left = 0, right = 0, spacing = 10 } }, children = { { type = "clan_details_member_highlight", id = "clan_details_member_highlight_0", properties = { charHandle = "member_highlight_char_window_0", highlight_text = Engine.Localize( "@CLANS_MOST_HOURS_PLAYED" ), uv_values = { 0, 0, 0.33, 1 }, character_pos = CharacterCameraPresets.ClanDetails.Left.Position }, handlers = { update_member_highlights = function ( f14_arg0, f14_arg1 ) f14_arg0:processEvent( { name = "update_member_name", member_name = f14_arg1.most_hours } ) end } }, { type = "clan_details_member_highlight", id = "clan_details_member_highlight_1", properties = { charHandle = "member_highlight_char_window_1", highlight_text = Engine.Localize( "@CLANS_MVP" ), uv_values = { 0.33, 0, 0.66, 1 }, character_pos = CharacterCameraPresets.ClanDetails.Center.Position }, handlers = { update_member_highlights = function ( f15_arg0, f15_arg1 ) f15_arg0:processEvent( { name = "update_member_name", member_name = f15_arg1.mvp_name } ) end } }, { type = "clan_details_member_highlight", id = "clan_details_member_highlight_2", properties = { charHandle = "member_highlight_char_window_2", highlight_text = Engine.Localize( "@CLANS_LATEST_RECRUIT" ), uv_values = { 0.66, 0, 1, 1 }, character_pos = CharacterCameraPresets.ClanDetails.Right.Position }, handlers = { update_member_highlights = function ( f16_arg0, f16_arg1 ) f16_arg0:processEvent( { name = "update_member_name", member_name = f16_arg1.latest_name } ) end } } } } } } end function clanwars_bonus_widget() return { type = "UIElement", id = "clanwars_bonus_widget_container_id", properties = { value = 0, gametype = "" }, states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = 0, bottom = 40, left = 0, right = 135 } }, children = { { type = "UIElement", id = "clanwars_bonus_widget_container_id", states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = 0, bottom = 40, left = 0, right = 40 } }, children = { { type = "UIImage", id = "clanwars_bonus_widget_bg_id", states = { default = { topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = true, top = 0, bottom = 0, left = 0, right = 0, material = RegisterMaterial( "white" ), alpha = 0.1 } } }, { type = "UIText", id = "clanwars_bonus_widget_bonus_id", properties = { text = MBh.Property( "value" ) }, states = { default = { topAnchor = false, bottomAnchor = false, leftAnchor = true, rightAnchor = true, height = CoD.TextSettings.NormalFont.Height, left = 0, right = 0, red = Colors.white.r, green = Colors.white.g, blue = Colors.white.b, font = CoD.TextSettings.SmallFont.Font } } } } }, { type = "UIMarqueeText", id = "clanwars_bonus_widget_mode_id", properties = { text = MBh.Property( "gametype" ) }, states = { default = { topAnchor = false, bottomAnchor = false, leftAnchor = true, rightAnchor = true, height = CoD.TextSettings.SmallFont.Height, left = 45, right = 0, alignment = LUI.Alignment.Left, red = Colors.white.r, green = Colors.white.g, blue = Colors.white.b, font = CoD.TextSettings.SmallFont.Font } } } } } end function clanwars_position_info_widget() return { type = "UIElement", id = "clanwars_info_position_container_id", states = { default = { topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = false, top = 0, bottom = 0, left = 0, right = 240 } }, children = { { type = "generic_drop_shadow", id = "clanwars_info_position_drop_shadow_id", properties = { offset_shadow = 0, alpha = 0.4 } }, { type = "generic_menu_background", id = "clanwars_info_position_background_id", properties = { fill_alpha = 1 } }, { type = "UIElement", id = "clanwars_info_position_label_container_id", states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = true, top = 0, bottom = GenericTitleBarDims.TitleBarHeight, left = 0, right = 0 } }, children = { { type = "UIImage", id = "clanwars_info_position_label_bg_id", states = { default = CoD.ColorizeState( Swatches.GenericMenu.Border, { topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = true, top = 0, bottom = 0, left = 0, right = 0, material = RegisterMaterial( "white" ), alpha = Swatches.GenericMenu.BorderAlpha } ) } }, { type = "UIImage", id = "clanwars_info_position_division_id", states = { default = { topAnchor = false, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = -24, bottom = 24, left = 0, right = 48, alpha = 1 }, hidden = { alpha = 0 } }, handlers = { update_clan_war_info = function ( f19_arg0, f19_arg1 ) local f19_local0 = GetDivisionImage( f19_arg1.division ) if f19_local0 and f19_local0 ~= "" then f19_arg0:setImage( RegisterMaterial( f19_local0 ) ) f19_arg0:animateToState( "default", 0 ) else f19_arg0:animateToState( "hidden", 0 ) end end } }, { type = "UIMarqueeText", id = "clanwars_info_position_label_id", properties = { text = Engine.Localize( "@CLANS_CURRENT_WAR_POSITION" ) }, handlers = { update_clan_war_info = function ( f20_arg0, f20_arg1 ) local f20_local0 = GetDivisionImage( f20_arg1.division ) local f20_local1 = f20_local0 and f20_local0 ~= "" local f20_local2 = f20_arg0 local f20_local3 = f20_arg0.registerAnimationState local f20_local4 = "default" local f20_local5 = { topAnchor = false, bottomAnchor = false, leftAnchor = true, rightAnchor = true, top = CoD.TextSettings.NormalFont.Height * -0.5, bottom = CoD.TextSettings.NormalFont.Height * 0.5 } local f20_local6 if f20_local1 then f20_local6 = 50 if not f20_local6 then else f20_local5.left = f20_local6 f20_local5.right = 0 if f20_local1 then f20_local6 = LUI.Alignment.Left if not f20_local6 then else f20_local5.alignment = f20_local6 f20_local5.font = CoD.TextSettings.NormalFont.Font f20_local3( f20_local2, f20_local4, f20_local5 ) f20_arg0:animateToState( "default", 0 ) end end f20_local6 = LUI.Alignment.Center end end f20_local6 = 0 end } } } }, { type = "UIElement", id = "clanwars_info_position_container_id", states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = 40, height = 40, left = 5, width = 40 } }, children = { { type = "UIImage", id = "clanwars_info_position_bg_id", states = { default = { topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = true, top = -12, bottom = 12, left = -12, right = 12, material = RegisterMaterial( "box_clan_hexagon" ), alpha = 0.1 } } }, { type = "UIText", id = "clanwars_info_position_id", states = { default = { topAnchor = false, bottomAnchor = false, leftAnchor = true, rightAnchor = true, height = CoD.TextSettings.NormalFont.Height, left = 0, right = 0, alignment = LUI.Alignment.Center, red = Colors.white.r, green = Colors.white.g, blue = Colors.white.b, font = CoD.TextSettings.NormalFont.Font } }, handlers = { update_clan_war_info = function ( f21_arg0, f21_arg1 ) f21_arg0:setText( f21_arg1.position ) end } } } }, { type = "UIText", id = "clanwars_info_total_cp_id", states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = true, top = 40, left = 50, right = 0, height = CoD.TextSettings.NormalFont.Height, alignment = LUI.Alignment.Left, red = Colors.white.r, green = Colors.white.g, blue = Colors.white.b, font = CoD.TextSettings.NormalFont.Font } }, handlers = { update_clan_war_info = function ( f22_arg0, f22_arg1 ) f22_arg0:setText( Engine.Localize( "@CLANS_TOTAL_CP", f22_arg1.points ) ) end } }, { type = "UIText", id = "clanwars_info_total_nodes_id", states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = true, top = 60, left = 50, right = 0, height = CoD.TextSettings.NormalFont.Height, alignment = LUI.Alignment.Left, red = Colors.white.r, green = Colors.white.g, blue = Colors.white.b, font = CoD.TextSettings.NormalFont.Font } }, handlers = { update_clan_war_info = function ( f23_arg0, f23_arg1 ) f23_arg0:setText( Engine.Localize( "@CLANS_TOTAL_NODES_HELD", f23_arg1.nodes ) ) end } } } } end function clanwars_bonuses_info_widget() return { type = "UIElement", id = "clanwars_info_bonuses_container_id", states = { default = { topAnchor = true, bottomAnchor = true, leftAnchor = false, rightAnchor = true, top = 0, bottom = 0, left = -420, right = 0 } }, children = { { type = "generic_drop_shadow", id = "clanwars_info_bonuses_drop_shadow_id", properties = { offset_shadow = 0, alpha = 0.4 } }, { type = "generic_menu_background", id = "clanwars_info_bonuses_background_id", properties = { fill_alpha = 1 } }, { type = "UIElement", id = "clanwars_info_bonuses_label_container_id", states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = true, top = 0, bottom = GenericTitleBarDims.TitleBarHeight, left = 0, right = 0 } }, children = { { type = "UIImage", id = "clanwars_info_bonuses_label_bg_id", states = { default = CoD.ColorizeState( Swatches.GenericMenu.Border, { topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = true, top = 0, bottom = 0, left = 0, right = 0, material = RegisterMaterial( "white" ), alpha = Swatches.GenericMenu.BorderAlpha } ) } }, { type = "UIMarqueeText", id = "clanwars_info_bonuses_label_id", properties = { text = Engine.Localize( "@CLANS_ACTIVE_BONUSES" ) }, states = { default = { topAnchor = false, bottomAnchor = false, leftAnchor = true, rightAnchor = true, height = CoD.TextSettings.NormalFont.Height, left = 0, right = 0, valign = LUI.Alignment.Center, red = Colors.white.r, green = Colors.white.g, blue = Colors.white.b, font = CoD.TextSettings.NormalFont.Font } } } } }, { type = "UIHorizontalList", id = "bonus_widget_hlist_id", properties = { exclusiveController = MBh.Property( "exclusiveController" ) }, states = { default = { topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = true, top = 40, bottom = 0, left = 5, right = 0, spacing = 5 } }, childrenFeeder = BonusFeeder } } } end function clan_details_clanwars_info() return { type = "UIElement", id = "clan_details_clanwars_info_id", states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = 530, height = 88, left = 550, right = 1215 } }, children = { { type = "clanwars_position_info_widget", id = "clan_details_position_info_id" }, { type = "clanwars_bonuses_info_widget", id = "clan_details_bonuses_info_id" } } } end function clan_details_main() return { type = "UIElement", id = "clan_details_root", properties = { remoteView = false }, states = { default = { topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = true, top = 0, bottom = 0, left = 0, right = 0 } }, handlers = { menu_create = OnCreate, check_download_status = CheckDownloadStatus }, children = { { type = "UIImage", id = "clan_details_bg_id", states = { default = { material = RegisterMaterial( "bkgd_cas" ), topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = true, top = 0, bottom = 0, left = 0, right = 0 } } }, { type = "generic_menu_title", id = "clan_details_title_id", properties = { menu_title = "" } }, { type = "UIText", id = "clan_details_in_clan_id", properties = { text = Engine.Localize( "@CLANS_NONPLATFORM_ON_MOBILE" ) }, states = { default = { leftAnchor = false, rightAnchor = true, topAnchor = true, bottomAnchor = false, top = 58, right = -100, width = 500, height = CoD.TextSettings.NormalFont.Height, font = CoD.TextSettings.NormalFont.Font, alignment = LUI.Alignment.Right, alpha = 0, red = Colors.secondary_text_color.r, green = Colors.secondary_text_color.g, blue = Colors.secondary_text_color.b }, visible = { alpha = 1 } }, handlers = { show_classified_note = function ( f27_arg0, f27_arg1 ) f27_arg0:animateToState( "visible", 0 ) end } }, { type = "UIElement", id = "clan_container_id", states = { default = { topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = true, top = 0, bottom = 0, left = 0, right = 0, alpha = 0 }, visible = { alpha = 1 } }, handlers = { show_clan_details = MBh.AnimateToState( "visible" ) }, children = { { type = "UIElement", id = "clan_details_background_container_id", states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = 100, left = 70, width = 460, height = 550 } }, children = { { type = "generic_menu_background_withfade", properties = { top_offset = 0, fill_alpha = 1 } } } }, { type = "ClanCard", id = "clan_card_id" }, { type = "UIMarqueeText", id = "clan_details_mobile_reminder_id", properties = { text = Engine.Localize( "@CLANS_MOBILE_REMINDER" ), useTextWrapping = true, textHeight = CoD.TextSettings.TinyFont.Height }, states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = 420, height = CoD.TextSettings.TinyFont.Height * 2, left = 80, width = 440, font = CoD.TextSettings.SmallFont.Font, alignment = LUI.Alignment.Left, alpha = 0.4 } } }, { type = "UIText", id = "clan_details_leader_playercard_label_id", properties = { text = Engine.Localize( "@CLANS_CLAN_LEADER_CAPS" ) }, states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = 460, height = CoD.TextSettings.BigFont.Height, left = 85, width = 440, font = CoD.TextSettings.BigFont.Font } } }, { type = "playercard", id = "clan_details_leader_playercard_id", properties = { gamertag = "", clantag = "", background = "0", patchEmblem = "0", patchShape = "0" }, states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = 510, bottom = 600, left = 80, width = 500, alpha = 1 } } }, { type = "clan_details_member_highlight_window", id = "clan_details_member_highlight_window_id" }, { type = "ClanMembersWindow", id = "clan_member_models_id", properties = { char_window_dims = { top = -30, bottom = 482, left = -100, right = 412 }, character_pos = { CharacterCameraPresets.ClanDetails.Left.Position, CharacterCameraPresets.ClanDetails.Center.Position, CharacterCameraPresets.ClanDetails.Right.Position }, controller = MBh.Property( "exclusiveController" ), loadingOffset = 155 }, states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = 110, height = 420, left = 570, width = 630 } } }, { type = "clan_details_clanwars_info", id = "clan_details_clanwars_info_id" }, { type = "generic_loading_widget", id = "leader_loading_widget_id", properties = { message = Engine.Localize( "@MENU_LOADING_DOTS" ) }, states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = 480, bottom = 580, left = 60, right = 460 } } } } }, { type = "live_dialog_text_box_with_cancel", id = "clan_details_full_load_id", properties = { message = Engine.Localize( "@MENU_DOWNLOADING" ), cancel_func = MBh.LeaveMenu() } }, { type = "button_helper_text_main", id = "clan_details_helper_text_id" }, { type = "UIBindButton", id = "clan_details_bind_button_id", handlers = { button_secondary = MBh.LeaveMenu(), button_alt2 = OpenClanRoster } }, { type = "UITimer", id = "download_update_timer_id", properties = { event = "check_download_status", interval = 100, disposable = false } } } } end LUI.MenuBuilder.registerDef( "clan_details_member_highlight", clan_details_member_highlight ) LUI.MenuBuilder.registerDef( "clan_details_member_highlight_window", clan_details_member_highlight_window ) LUI.MenuBuilder.registerDef( "clan_details_main", clan_details_main ) LUI.MenuBuilder.registerDef( "clanwars_position_info_widget", clanwars_position_info_widget ) LUI.MenuBuilder.registerDef( "clanwars_bonuses_info_widget", clanwars_bonuses_info_widget ) LUI.MenuBuilder.registerDef( "clan_details_clanwars_info", clan_details_clanwars_info ) LUI.MenuBuilder.registerDef( "clanwars_bonus_widget", clanwars_bonus_widget ) LockTable( _M )