LUI.ClanCard = {} LUI.ClanMembersWindow = InheritFrom( LUI.UIElement ) XP_BAR_WIDTH = 212 LUI.ClanCard.new = function ( f1_arg0, f1_arg1, f1_arg2 ) local f1_local0 = 128 local self = LUI.UIElement.new( CoD.CreateState( 80, 110, 520, 390, CoD.AnchorTypes.TopLeft ) ) self.id = "clan_card_id" local f1_local2 = LUI.UIElement.new( CoD.CreateState( 0, 0, 0, 180, CoD.AnchorTypes.TopLeftRight ) ) f1_local2.id = "clan_card_top_id" self:addElement( f1_local2 ) self.cardBG = LUI.UIImage.new( CoD.CreateState( 0, 0, 0, 144, CoD.AnchorTypes.TopLeftRight ) ) f1_local2:addElement( self.cardBG ) local f1_local3 = CoD.CreateState( -130, -10, -80, 40, CoD.AnchorTypes.TopRight ) f1_local3.material = RegisterMaterial( "icon_clan_xp" ) f1_local3.alpha = 0 self.cxpIcon = LUI.UIImage.new( f1_local3 ) self.cxpIcon:registerAnimationState( "visible", { alpha = 1 } ) self.cxpIcon.id = "clan_card_dcxp_label_id" f1_local2:addElement( self.cxpIcon ) f1_local3 = CoD.CreateState( -60, 5, -3, 5 + CoD.TextSettings.NormalFont.Height, CoD.AnchorTypes.TopRight ) f1_local3.font = CoD.TextSettings.NormalFont.Font f1_local3.alignment = LUI.Alignment.Right CoD.ColorizeState( Colors.primary_text_color, f1_local3 ) f1_local3.alpha = 0 self.cxpText = LUI.UIText.new( f1_local3 ) self.cxpText:registerAnimationState( "visible", { alpha = 1 } ) self.cxpText.id = "clan_card_dcxp_id" f1_local2:addElement( self.cxpText ) f1_local3 = CoD.CreateState( 20, 10, -10, -CoD.TextSettings.NormalFont.Height, CoD.AnchorTypes.All ) f1_local3.spacing = 3 local f1_local4 = LUI.UIVerticalList.new( f1_local3 ) f1_local2:addElement( f1_local4 ) f1_local3 = CoD.CreateState( 0, 0, 0, CoD.TextSettings.BigFont.Height, CoD.AnchorTypes.TopLeftRight ) f1_local3.font = CoD.TextSettings.BigFont.Font f1_local3.alignment = LUI.Alignment.Left CoD.ColorizeState( Colors.primary_text_color, f1_local3 ) self.clanTag = LUI.UIText.new( f1_local3 ) self.clanTag.id = "clan_card_clan_tag_id" f1_local4:addElement( self.clanTag ) f1_local3 = CoD.CreateState( 0, 0, 0, CoD.TextSettings.ExtraBigFont.Height, CoD.AnchorTypes.TopLeftRight ) f1_local3.font = CoD.TextSettings.ExtraBigFont.Font f1_local3.alignment = LUI.Alignment.Left CoD.ColorizeState( Colors.white, f1_local3 ) self.clanName = LUI.UIMarqueeText.new( f1_local3 ) self.clanName.id = "clan_card_clan_name_id" f1_local4:addElement( self.clanName ) local f1_local5 = LUI.UIHorizontalList.new( CoD.CreateState( 0, 0, 0, CoD.TextSettings.BigFont.Height, CoD.AnchorTypes.TopLeftRight ) ) f1_local4:addElement( f1_local5 ) local f1_local6, f1_local7, f1_local8, f1_local9 = GetTextDimensions( Engine.Localize( "@LUA_MENU_CLAN_LEVEL" ), CoD.TextSettings.BigFont.Font, CoD.TextSettings.BigFont.Height ) f1_local3 = CoD.CreateState( 0, 0, f1_local8 + 10, CoD.TextSettings.BigFont.Height, CoD.AnchorTypes.TopLeft ) f1_local3.font = CoD.TextSettings.BigFont.Font f1_local3.alignment = LUI.Alignment.Left CoD.ColorizeState( Colors.primary_text_color, f1_local3 ) local f1_local10 = LUI.UIText.new( f1_local3 ) f1_local10.id = "clan_card_clan_level_label_id" f1_local10:setText( Engine.Localize( "@LUA_MENU_CLAN_LEVEL" ) ) f1_local10:setTextStyle( CoD.TextStyle.Shadowed ) f1_local5:addElement( f1_local10 ) f1_local3 = CoD.CreateState( 0, -20, 40, 20, CoD.AnchorTypes.Left ) f1_local3.material = RegisterMaterial( "icon_clan_level_bg" ) local f1_local11 = LUI.UIImage.new( f1_local3 ) f1_local5:addElement( f1_local11 ) f1_local3 = CoD.CreateState( 0, CoD.TextSettings.NormalFont.Height * -0.55, 0, CoD.TextSettings.NormalFont.Height * 0.45, CoD.AnchorTypes.None ) f1_local3.font = CoD.TextSettings.NormalFont.Font f1_local3.alignment = LUI.Alignment.Center CoD.ColorizeState( Colors.black, f1_local3 ) self.clanLevelText = LUI.UIText.new( f1_local3 ) self.clanLevelText.id = "clan_card_clan_level_text_id" f1_local11:addElement( self.clanLevelText ) f1_local4:addElement( LUI.UIElement.new( CoD.CreateState( 0, 0, 0, 5, CoD.AnchorTypes.TopLeftRight ) ) ) LUI.ClanCard.AddLevelProgressBar( f1_local4, self ) f1_local3 = CoD.CreateState( 0, -CoD.TextSettings.NormalFont.Height - 11, 0, -CoD.TextSettings.NormalFont.Height - 10, CoD.AnchorTypes.BottomLeftRight ) f1_local3.material = RegisterMaterial( "white" ) f1_local3.alpha = 0.15 local f1_local12 = LUI.UIImage.new( f1_local3 ) f1_local12.id = "clan_card_motto_horizontal_line_id" f1_local2:addElement( f1_local12 ) f1_local3 = CoD.CreateState( 10, -CoD.TextSettings.NormalFont.Height - 5, 0, -5, CoD.AnchorTypes.BottomLeftRight ) f1_local3.font = CoD.TextSettings.NormalFont.Font f1_local3.alignment = LUI.Alignment.Left CoD.ColorizeState( Colors.primary_text_color, f1_local3 ) self.clanMotto = LUI.UIText.new( f1_local3 ) self.clanMotto.id = "clan_card_clan_motto_id" f1_local2:addElement( self.clanMotto ) local f1_local13 = LUI.UIElement.new( CoD.CreateState( 0, 190, 0, 0, CoD.AnchorTypes.All ) ) f1_local13.id = "clan_card_stats_group_id" self:addElement( f1_local13 ) local f1_local14 = CoD.CreateState( 0, 0, 0, 0, CoD.AnchorTypes.All ) f1_local14.spacing = 4 local f1_local15 = LUI.UIVerticalList.new( f1_local14 ) f1_local15.id = "clan_card_stats_id" f1_local13:addElement( f1_local15 ) self.kdRatio = LUI.ClanCard.AddClanStat( f1_local15, "clan_kd_id", Engine.Localize( "@LUA_MENU_CLAN_KD_RATIO" ), "Placeholder Value", 260, 160 ) self.winPercent = LUI.ClanCard.AddClanStat( f1_local15, "clan_win_id", Engine.Localize( "@LUA_MENU_CLAN_WIN_PERCENTAGE" ), "Placeholder Value", 260, 160 ) self.memberCount = LUI.ClanCard.AddClanStat( f1_local15, "clan_member_count_id", Engine.Localize( "@LUA_MENU_CLAN_MEMBERS" ), "Placeholder Value", 260, 160 ) self.rewardsEarned = LUI.ClanCard.AddClanStat( f1_local15, "clan_hours_played_id", Engine.Localize( "@LUA_MENU_CLAN_REWARDS" ), "Placeholder Value", 260, 160 ) self:registerEventHandler( "update_clan_card", LUI.ClanCard.FeedContent ) LUI.ClanCard.FeedContent( self, f1_arg1 ) return self end LUI.ClanCard.AddClanStat = function ( f2_arg0, f2_arg1, f2_arg2, f2_arg3, f2_arg4, f2_arg5 ) local self = LUI.UIElement.new( CoD.CreateState( 0, 0, 0, 26, CoD.AnchorTypes.TopLeftRight ) ) self.id = f2_arg1 local f2_local1 = CoD.CreateState( 0, 0, -(f2_arg5 + 26), 0, CoD.AnchorTypes.All ) f2_local1.material = RegisterMaterial( "white" ) f2_local1.alpha = 0.15 CoD.ColorizeState( Colors.black, f2_local1 ) local f2_local2 = LUI.UIImage.new( f2_local1 ) f2_local2.id = "clan_card_stat_base_left_bg_id" self:addElement( f2_local2 ) f2_local1 = CoD.CreateState( -f2_arg5, 0, 0, 0, CoD.AnchorTypes.TopBottomRight ) f2_local1.material = RegisterMaterial( "white" ) f2_local1.alpha = 0.05 CoD.ColorizeState( Colors.white, f2_local1 ) local f2_local3 = LUI.UIImage.new( f2_local1 ) f2_local3.id = "clan_card_stat_base_right_bg_id" self:addElement( f2_local3 ) f2_local1 = CoD.CreateState( -(f2_arg5 + 26), 0, -f2_arg5, 0, CoD.AnchorTypes.TopBottomRight ) f2_local1.material = RegisterMaterial( "box_stat_cap" ) f2_local1.alpha = 0.15 f2_local1.zRot = 180 CoD.ColorizeState( Colors.black, f2_local1 ) local f2_local4 = LUI.UIImage.new( f2_local1 ) f2_local4.id = "clan_card_stat_base_left_cap_id" self:addElement( f2_local4 ) f2_local1 = CoD.CreateState( -(f2_arg5 + 26), 0, -f2_arg5, 0, CoD.AnchorTypes.TopBottomRight ) f2_local1.material = RegisterMaterial( "box_stat_cap" ) f2_local1.alpha = 0.05 CoD.ColorizeState( Colors.white, f2_local1 ) local f2_local5 = LUI.UIImage.new( f2_local1 ) f2_local5.id = "clan_card_stat_base_right_cap_id" self:addElement( f2_local5 ) f2_local1 = CoD.CreateState( 5, -CoD.TextSettings.NormalFont.Height * 0.5, f2_arg4, CoD.TextSettings.NormalFont.Height * 0.5, CoD.AnchorTypes.Left ) f2_local1.font = CoD.TextSettings.NormalFont.Font f2_local1.alignment = LUI.Alignment.Left CoD.ColorizeState( Colors.primary_text_color, f2_local1 ) local f2_local6 = LUI.UIText.new( f2_local1 ) f2_local6.id = "clan_card_stat_label_id" f2_local6:setText( f2_arg2 ) self:addElement( f2_local6 ) f2_local1 = CoD.CreateState( -f2_arg5, -CoD.TextSettings.NormalFont.Height * 0.5, -5, CoD.TextSettings.NormalFont.Height * 0.5, CoD.AnchorTypes.Right ) f2_local1.font = CoD.TextSettings.NormalFont.Font f2_local1.alignment = LUI.Alignment.Right CoD.ColorizeState( Colors.white, f2_local1 ) local f2_local7 = LUI.UIText.new( f2_local1 ) f2_local7.id = "clan_card_stat_value_id" f2_local7:setText( f2_arg3 ) self:addElement( f2_local7 ) f2_arg0:addElement( self ) return f2_local7 end LUI.ClanCard.AddLevelProgressBar = function ( f3_arg0, f3_arg1 ) local f3_local0 = 400 local f3_local1 = 10 local self = LUI.UIElement.new( CoD.CreateState( 0, 0, f3_local0, f3_local1 + CoD.TextSettings.SmallFont.Height + 3, CoD.AnchorTypes.TopLeft ) ) self.id = "ClanCard_level_bar_container_id" local f3_local3 = CoD.CreateState( 0, 0, 0, f3_local1, CoD.AnchorTypes.TopLeftRight ) CoD.ColorizeState( Colors.black, f3_local3 ) local f3_local4 = LUI.UIImage.new( f3_local3 ) f3_local4.id = "ClanCard_level_bar_bg_id" self:addElement( f3_local4 ) f3_local4:addElement( LUI.MenuGenerics.generic_border( {}, {} ) ) f3_local3 = CoD.CreateState( 0, 0, 0, 0, CoD.AnchorTypes.TopBottomLeft ) f3_local3.material = RegisterMaterial( "btn_cas_fill_f" ) local f3_local5 = LUI.UIImage.new( { f3_local3 } ) f3_local5.id = "ClanCard_level_bar_id" f3_local5.maxWidth = f3_local0 - 1 f3_local4:addElement( f3_local5 ) f3_local3 = CoD.CreateState( 0, -CoD.TextSettings.SmallFont.Height, 0, 0, CoD.AnchorTypes.BottomLeftRight ) f3_local3.font = CoD.TextSettings.SmallFont.Font f3_local3.alignment = LUI.Alignment.Right local f3_local6 = LUI.UIText.new( f3_local3 ) f3_local6.id = "clan_card_xp_to_next_id" self:addElement( f3_local6 ) f3_arg1.XPFillBar = f3_local5 f3_arg1.xpToNextText = f3_local6 f3_arg0:addElement( self ) end LUI.ClanCard.FeedContent = function ( f4_arg0, f4_arg1 ) if not f4_arg1 then f4_arg1 = {} end if f4_arg1.clan_background then f4_arg0.cardBG:setImage( RegisterMaterial( f4_arg1.clan_background ) ) end if f4_arg1.clan_name then f4_arg0.clanName:setText( f4_arg1.clan_name ) f4_arg0.clanName:setTextStyle( CoD.TextStyle.Shadowed ) end if f4_arg1.clan_tag then f4_arg0.clanTag:setText( f4_arg1.clan_tag ) f4_arg0.clanTag:setTextStyle( CoD.TextStyle.Shadowed ) end if f4_arg1.clan_level and f4_arg1.current_xp and f4_arg1.xp_to_next then f4_arg0.clanLevelText:setText( f4_arg1.clan_level ) if f4_arg1.xp_to_next > 0 then f4_arg0.xpToNextText:setText( Engine.Localize( "@CLANS_XP_TO_NEXT", f4_arg1.xp_to_next ) ) else f4_arg0.xpToNextText:setText( Engine.Localize( "@CLANS_MAX_LEVEL" ) ) end end if f4_arg1.next_level_progress then f4_arg0.XPFillBar:registerAnimationState( "default", { top = 1, bottom = -1, left = 1, right = f4_arg1.next_level_progress * f4_arg0.XPFillBar.maxWidth, topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = false, material = RegisterMaterial( "btn_cas_fill_f" ) } ) f4_arg0.XPFillBar:animateToState( "default", 0 ) end if f4_arg1.clan_motto then f4_arg0.clanMotto:setText( f4_arg1.clan_motto ) end if f4_arg1.kd_ratio then f4_arg0.kdRatio:setText( f4_arg1.kd_ratio ) end if f4_arg1.win_percent then f4_arg0.winPercent:setText( f4_arg1.win_percent ) end if f4_arg1.member_count then f4_arg0.memberCount:setText( f4_arg1.member_count ) end if f4_arg1.reward_count then f4_arg0.rewardsEarned:setText( f4_arg1.reward_count ) end if f4_arg1.hours_played then f4_arg0.hoursPlayed:setText( f4_arg1.hours_played ) end if f4_arg1.session_cxp then f4_arg0.sessionCXP:setText( f4_arg1.session_cxp ) end if f4_arg1.cxp_time and f4_arg1.cxp_time > 0 then local f4_local0 = f4_arg1.cxp_time local f4_local1 = math.floor( f4_local0 / 3600 ) f4_local0 = f4_local0 % 3600 f4_arg0.cxpText:setText( string.format( "%02d:%02d:%02d", f4_local1, math.floor( f4_local0 / 60 ), f4_local0 % 60 ) ) f4_arg0.cxpIcon:animateToState( "visible", 0 ) f4_arg0.cxpText:animateToState( "visible", 0 ) end end LUI.ClanMembersWindow.new = function ( f5_arg0, f5_arg1, f5_arg2 ) local self = LUI.UIElement.new() self.id = "ClanMembersWindow" if not f5_arg1 then f5_arg1 = {} end local f5_local1 = f5_arg1.char_window_dims if not f5_local1 then f5_local1 = { left = 0, top = 0, right = 0, bottom = 0 } end f5_arg1.char_window_dims = f5_local1 f5_local1 = f5_arg1.controller if not f5_local1 then DebugPrint( "WARNING: Using ClanMembersWindow without specifying controller. Defaulting to first active controller" ) f5_local1 = Engine.GetFirstActiveController() end self.controller = f5_local1 local charWindow = LUI.UICharacterWindow.new() charWindow.id = "clan_member_char_window_id" charWindow:registerAnimationState( "default", { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = false, top = f5_arg1.char_window_dims.top, bottom = f5_arg1.char_window_dims.bottom, left = f5_arg1.char_window_dims.left, right = f5_arg1.char_window_dims.right } ) charWindow:animateToState( "default" ) charWindow:registerEventHandler( "make_scene", LUI.ClanMembersWindow.InitCharacterWindow ) charWindow:registerEventHandler( "animLooped", function ( element, event ) LUI.ClanMembersWindow.DoAnimChange( element, event ) end ) charWindow:registerEventHandler( "animEnded", function ( element, event ) LUI.ClanMembersWindow.DoAnimChange( element, event ) end ) local f5_local3 = LUI.UITimer.new( 50, "make_scene" ) f5_local3.id = "createSceneTimer" charWindow:addElement( f5_local3 ) self:addElement( charWindow ) self.charWindow = charWindow LUI.ClanMembersWindow.AddLoadingWidget( charWindow, f5_arg1.loadingOffset ) self.close = function () LUI.ClanMembersWindow.Shutdown( self, event ) LUI.UIElement.close( self ) end self.closeTree = function () LUI.ClanMembersWindow.Shutdown( self, event ) LUI.UIElement.closeTree( self ) end self.characterHandles = {} return self end LUI.ClanMembersWindow.InitCharacterWindow = function ( f10_arg0, f10_arg1 ) if not CharacterScene.IsReady() then return end local f10_local0 = f10_arg0:getParent() if not f10_local0 or not f10_local0.modelData then return end f10_arg0:closeChildren() local f10_local1 = f10_local0.properties CharacterScene.SetVisionSet( "mp_character_room" ) CharacterScene.SetFOV( 43 ) CharacterScene.SetAmbient( 0, 0, 0 ) f10_arg0.anim_states = {} for f10_local2 = 1, 3, 1 do local f10_local5 = f10_local0.modelData[f10_local2] if f10_local5 and f10_local5.hasPlatformInfo then local f10_local6 = f10_local5.bodyModel if not f10_local6 then f10_local6 = Cac.GetDefaultBodyModel( f10_local0.controller ) end f10_local6 = string.sub( f10_local6, 0, -6 ) .. "elite" local f10_local7 = f10_local5.headModel if not f10_local7 then f10_local7 = Cac.GetDefaultHeadModel( f10_local0.controller ) end if Engine.TableLookup( "mp/cac/helmets.csv", 0, f10_local7, 4 ) == "1" and string.find( f10_local7, "alt", -4 ) ~= nil then f10_local7 = string.sub( f10_local7, 0, -4 ) .. "alt_f" end local f10_local8 = "iw6_kriss_mp" if f10_local5.weaponName and f10_local5.weaponName ~= "" then local f10_local9 = 0 if f10_local5.camoName then f10_local9 = tonumber( Cac.GetCamoWeaponIndex( f10_local5.camoName ) ) end f10_local8 = Cac.BuildWeaponName( f10_local5.weaponName, f10_local5.attachName1, f10_local5.attachName2, f10_local9, 0, f10_local5.attachName3 ) end local f10_local9 = CharacterScene.CreateCharacter( "clan_model_" .. f10_local2, f10_local6, f10_local7, f10_local8 ) CharacterScene.SetSpin( f10_local9, 0, 0, 0 ) CharacterScene.SetBlendedRotation( f10_local9, 0, 0, 0, 0 ) if f10_local1 and f10_local1.character_pos then CharacterScene.SetCharacterUVs( f10_local9, 0, 0, 1, 1 ) CharacterScene.PositionRelativeToCamera( f10_local9, f10_local1.character_pos[f10_local2][1], f10_local1.character_pos[f10_local2][2], f10_local1.character_pos[f10_local2][3] ) end f10_local0.characterHandles[f10_local2] = f10_local9 f10_arg0.anim_states[f10_local2] = { anim_name = Cac.GetRandomIdleAnim( f10_local8 ), weapon_name = f10_local8 } LUI.ClanMembersWindow.SetAnimation( f10_arg0:getParent(), f10_local0.characterHandles[f10_local2], f10_arg0.anim_states[f10_local2].anim_name, 0.2 ) else local f10_local7 = CharacterScene.CreateCharacter( "clan_model_" .. f10_local2, "prop_dogtags_friend_iw6" ) CharacterScene.SetSpin( f10_local7, 0, 5, 0 ) if f10_local1 and f10_local1.character_pos then CharacterScene.SetCharacterUVs( f10_local7, 0, 0, 1, 1 ) CharacterScene.PositionRelativeToCamera( f10_local7, f10_local1.character_pos[f10_local2][1], f10_local1.character_pos[f10_local2][2], f10_local1.character_pos[f10_local2][3] ) end f10_local0.characterHandles[f10_local2] = f10_local7 end f10_arg0:setCharacterHandle( f10_local0.characterHandles[f10_local2] ) end end LUI.ClanMembersWindow.Shutdown = function ( f11_arg0, f11_arg1 ) for f11_local0 = 1, #f11_arg0.characterHandles, 1 do CharacterScene.FreeCharacter( f11_arg0.characterHandles[f11_local0] ) end f11_arg0.characterHandles = {} f11_arg0.modelData = nil end LUI.ClanMembersWindow.SetAnimation = function ( f12_arg0, f12_arg1, f12_arg2, f12_arg3 ) if not CharacterScene.IsReady() then return elseif f12_arg1 then CharacterScene.PlayAnim( f12_arg1, f12_arg2, f12_arg3 ) end end LUI.ClanMembersWindow.AddLoadingWidget = function ( f13_arg0, f13_arg1 ) f13_arg0:addElement( LUI.MenuBuilder.buildItems( { type = "generic_loading_widget", id = "loading_widget_id", states = { default = { topAnchor = true, bottomAnchor = true, leftAnchor = true, rightAnchor = true, top = 0, bottom = 0, left = f13_arg1 or 0, right = f13_arg1 or 0 } }, properties = { message = Engine.Localize( "@MENU_LOADING_DOTS" ) } }, {}, f13_arg0 ) ) end LUI.ClanMembersWindow.DoAnimChange = function ( f14_arg0, f14_arg1 ) local f14_local0 = f14_arg0:getParent() local f14_local1 = nil for f14_local2 = 1, 3, 1 do if f14_local0.characterHandles[f14_local2] == f14_arg1.objectHandle then f14_local1 = f14_local2 break end end if f14_local1 and f14_arg0.anim_states[f14_local1] then local f14_local2 = f14_arg0.anim_states[f14_local1] f14_local2.anim_name = Cac.GetRandomIdleAnim( f14_local2.weapon_name, f14_local2.anim_name ) LUI.ClanMembersWindow.SetAnimation( f14_local0, f14_arg1.objectHandle, f14_local2.anim_name, 0.2 ) end end function clan_not_in_clan_popup() return { type = "generic_selectionList_popup", properties = { popup_title = Engine.Localize( "@CLANS_NOT_IN_CLAN_HEADER_CAPS" ), popup_childfeeder = function () return { { type = "UIElement", states = { default = { leftAnchor = true, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 0, right = 0, top = 0, height = 10 } } }, { type = "UIText", id = "clan_popup_desc_text_id", properties = { text = Engine.Localize( "@CLANS_NOT_IN_CLAN_TEXT" ) }, states = { default = { font = CoD.TextSettings.NormalFont.Font, alignment = LUI.Alignment.Center, leftAnchor = true, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 0, right = 0, top = 0, bottom = CoD.TextSettings.NormalFont.Height, red = 1, green = 1, blue = 1 } } }, { type = "UIElement", states = { default = { leftAnchor = true, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 0, right = 0, top = 0, height = 10 } } }, { type = "UIGenericButton", id = "create_clan_button_id", properties = { style = GenericButtonSettings.Styles.GlassButton, substyle = GenericButtonSettings.Styles.GlassButton.SubStyles.Popup, text = Engine.Localize( "@CLANS_CREATE_CLAN" ), button_action_func = function ( f17_arg0, f17_arg1 ) if CoDAnywhere.ShouldShowLinkCreatePopup( f17_arg1.controller, true ) == true then LUI.FlowManager.RequestPopupMenu( f17_arg0, "cod_anywhere_popup_menu", true, f17_arg1.controller ) elseif CoDAnywhere.ShouldShowLinkUCDPopup( f17_arg1.controller, true ) == true then LUI.FlowManager.RequestPopupMenu( f17_arg0, "cod_anywhere_link_ucd_popup_menu", true, f17_arg1.controller ) else Clan.Create( f17_arg1.controller ) end LUI.FlowManager.RequestLeaveMenu( f17_arg0 ) end } }, { type = "UIGenericButton", id = "cancel_button_id", properties = { style = GenericButtonSettings.Styles.GlassButton, substyle = GenericButtonSettings.Styles.GlassButton.SubStyles.Popup, text = Engine.Localize( "@LUA_MENU_CANCEL" ), button_action_func = function ( f18_arg0, f18_arg1 ) LUI.FlowManager.RequestLeaveMenu( f18_arg0 ) end } } } end } } end LUI.MenuBuilder.registerDef( "clan_not_in_clan_popup", clan_not_in_clan_popup ) LUI.MenuBuilder.registerType( "ClanCard", LUI.ClanCard.new ) LUI.MenuBuilder.registerType( "ClanMembersWindow", LUI.ClanMembersWindow.new )