949 lines
25 KiB
Lua
949 lines
25 KiB
Lua
local f0_local0 = module
|
|
local f0_local1, f0_local2 = ...
|
|
f0_local0( f0_local1, package.seeall )
|
|
CoD.PrintModuleLoad( _NAME )
|
|
f0_local0 = Engine.Localize( "@LUA_MENU_KILLCAM_CAPS" )
|
|
f0_local1 = Engine.Localize( "@LUA_MENU_KILLED_BY_CAPS" )
|
|
f0_local2 = RegisterMaterial( "white" )
|
|
local f0_local3 = 4
|
|
local f0_local4 = 12
|
|
local f0_local5 = 0
|
|
local f0_local6 = 1
|
|
local f0_local7 = function ( f1_arg0, f1_arg1 )
|
|
if not f1_arg0.kcElems then
|
|
f1_arg0.kcElems = {}
|
|
local f1_local0 = {}
|
|
if GameX.GetGameMode() ~= "horde" then
|
|
f1_local0 = {
|
|
"killCamRespawnText",
|
|
"killCamWeaponImage",
|
|
"killCamWeaponHL",
|
|
"killCamWeaponNameText",
|
|
"killCamAbilitiesHL",
|
|
"killCamPlayerCard",
|
|
"playerCardBg",
|
|
"playerCardPatchBg",
|
|
"playerCardPatch",
|
|
"playerCardQuipText",
|
|
"playerCardClanTagText",
|
|
"playerCardRankIcon",
|
|
"playerCardRankText",
|
|
"playerCardNameText",
|
|
"killCamVictimAttacker",
|
|
"killCamVictimAttackerText",
|
|
"killCamCountDownBar",
|
|
"killCamCorners",
|
|
"killCamBottom",
|
|
"killCamTitleText"
|
|
}
|
|
else
|
|
f1_local0 = {
|
|
"killCamCorners"
|
|
}
|
|
end
|
|
for f1_local1 = 1, #f1_local0, 1 do
|
|
f1_arg0.kcElems[f1_local0[f1_local1]] = f1_arg0:getFirstDescendentById( f1_local0[f1_local1] )
|
|
end
|
|
end
|
|
end
|
|
|
|
local f0_local8 = function ( f2_arg0 )
|
|
local f2_local0 = f2_arg0.kcElems.killCamRespawnText
|
|
local f2_local1 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"active",
|
|
250
|
|
}
|
|
} )
|
|
f2_local1( f2_local0 )
|
|
f2_local1 = Game.GetOmnvar( "ui_killcam_text" )
|
|
if f2_local1 == "skip" then
|
|
f2_local0:setText( Engine.Localize( "@PLATFORM_PRESS_TO_SKIP" ) )
|
|
elseif f2_local1 == "respawn" then
|
|
f2_local0:setText( Engine.Localize( "@PLATFORM_PRESS_TO_RESPAWN" ) )
|
|
else
|
|
f2_local0:setText( "" )
|
|
end
|
|
end
|
|
|
|
local f0_local9 = function ( f3_arg0 )
|
|
local f3_local0 = f3_arg0.kcElems.killCamWeaponImage
|
|
local f3_local1 = f3_arg0.kcElems.killCamWeaponNameText
|
|
local f3_local2 = {}
|
|
for f3_local3 = 1, f0_local3, 1 do
|
|
f3_local2[f3_local3] = f3_arg0.kcElems.killCamWeaponHL:getChildById( "killCamAttachment" .. f3_local3 )
|
|
end
|
|
local f3_local3 = Game.GetOmnvar( "ui_killcam_killedby_killstreak" )
|
|
local f3_local4 = Game.GetOmnvar( "ui_killcam_killedby_weapon" )
|
|
local f3_local5 = ""
|
|
local f3_local6 = ""
|
|
local f3_local7 = ""
|
|
if f3_local4 ~= -1 then
|
|
f3_local7 = Engine.TableLookupByRow( StatsTable.File, f3_local4, StatsTable.Cols.WeaponImage )
|
|
f3_local6 = Engine.TableLookupByRow( StatsTable.File, f3_local4, StatsTable.Cols.WeaponName )
|
|
f3_local5 = Engine.TableLookupByRow( StatsTable.File, f3_local4, StatsTable.Cols.WeaponRef )
|
|
elseif f3_local3 ~= -1 then
|
|
f3_local7 = Engine.TableLookupByRow( KillstreakTable.File, f3_local3, KillstreakTable.Cols.UnearnedIcon )
|
|
f3_local6 = Engine.TableLookupByRow( KillstreakTable.File, f3_local3, KillstreakTable.Cols.Name )
|
|
end
|
|
if f3_local7 == nil or f3_local7 == "" then
|
|
f3_local0:animateToState( "inactive", 0 )
|
|
else
|
|
if CoD.WeaponListPrimary[f3_local5] ~= nil or CoD.WeaponListSecondary[f3_local5] ~= nil or string.find( f3_local5, "knifeonly" ) then
|
|
f3_local0:animateToState( "primaryWeapon", 0 )
|
|
else
|
|
f3_local0:animateToState( "otherWeapon", 0 )
|
|
end
|
|
CoD.SetMaterial( f3_local0, RegisterMaterial( f3_local7 ) )
|
|
end
|
|
local f3_local8 = f3_local1
|
|
local f3_local9 = f3_local1.setText
|
|
local f3_local10
|
|
if f3_local6 and f3_local6 ~= "" then
|
|
f3_local10 = Engine.Localize( f3_local6 )
|
|
if not f3_local10 then
|
|
|
|
else
|
|
f3_local9( f3_local8, f3_local10 )
|
|
for f3_local9 = 1, #f3_local2, 1 do
|
|
local f3_local11 = Game.GetOmnvar( "ui_killcam_killedby_attachment" .. f3_local9 )
|
|
local f3_local12 = ""
|
|
if f3_local11 ~= -1 then
|
|
f3_local12 = Engine.TableLookupByRow( AttachmentTable.File, f3_local11, AttachmentTable.Cols.Image )
|
|
end
|
|
if f3_local12 == nil or f3_local12 == "" then
|
|
f3_local2[f3_local9]:animateToState( "default", 0 )
|
|
else
|
|
CoD.SetMaterial( f3_local2[f3_local9], RegisterMaterial( f3_local12 ) )
|
|
f3_local2[f3_local9]:animateToState( "active", 0 )
|
|
end
|
|
end
|
|
end
|
|
end
|
|
f3_local10 = ""
|
|
end
|
|
|
|
local f0_local10 = function ( f4_arg0 )
|
|
local f4_local0 = f4_arg0.kcElems.killCamAbilitiesHL:getFirstChild()
|
|
while f4_local0 ~= nil do
|
|
local f4_local1 = f4_local0:getNextSibling()
|
|
f4_local0:close()
|
|
f4_local0 = f4_local1
|
|
end
|
|
if Game.GetOmnvar( "ui_killcam_killedby_killstreak" ) ~= -1 then
|
|
return
|
|
elseif GameX.UsesFakeLoadout() then
|
|
return
|
|
end
|
|
local f4_local2 = {}
|
|
local f4_local3 = Game.GetOmnvar( "ui_killcam_killedby_abilities1" )
|
|
local f4_local4 = Game.GetOmnvar( "ui_killcam_killedby_abilities2" )
|
|
for f4_local5 = 1, 24, 1 do
|
|
f4_local2[f4_local5] = hasbit( f4_local3, bit( f4_local5 ) )
|
|
f4_local2[f4_local5 + 24] = hasbit( f4_local4, bit( f4_local5 ) )
|
|
end
|
|
for f4_local5 = 1, #f4_local2, 1 do
|
|
if f4_local2[f4_local5] then
|
|
local f4_local8 = Engine.TableLookup( KillCamAbilitiesBitMaskTable.File, KillCamAbilitiesBitMaskTable.Cols.Index, f4_local5, KillCamAbilitiesBitMaskTable.Cols.Ref )
|
|
local f4_local9 = Engine.TableLookup( PerkTable.File, PerkTable.Cols.Ref, f4_local8, PerkTable.Cols.Cost )
|
|
local f4_local10 = RegisterMaterial( Engine.TableLookup( PerkTable.File, PerkTable.Cols.Ref, f4_local8, PerkTable.Cols.Image ) )
|
|
local self = LUI.UIImage.new()
|
|
self.id = "killCamAbility" .. f4_local5
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = 0,
|
|
left = 0,
|
|
height = 32,
|
|
width = 32,
|
|
material = f4_local10
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
f4_arg0.kcElems.killCamAbilitiesHL:addElement( self )
|
|
end
|
|
end
|
|
end
|
|
|
|
local f0_local11 = function ( f5_arg0 )
|
|
local f5_local0 = f5_arg0.kcElems.playerCardBg
|
|
local f5_local1 = f5_arg0.kcElems.playerCardPatchBg
|
|
local f5_local2 = f5_arg0.kcElems.playerCardPatch
|
|
local f5_local3 = f5_arg0.kcElems.playerCardQuipText
|
|
local f5_local4 = f5_arg0.kcElems.playerCardClanTagText
|
|
local f5_local5 = f5_arg0.kcElems.playerCardRankIcon
|
|
local f5_local6 = f5_arg0.kcElems.playerCardRankText
|
|
local f5_local7 = f5_arg0.kcElems.playerCardNameText
|
|
local f5_local8 = Game.GetOmnvar( "ui_killcam_killedby_id" )
|
|
if f5_local8 == -1 then
|
|
f5_arg0.kcElems.killCamPlayerCard:animateToState( "default", 0 )
|
|
return
|
|
end
|
|
f5_arg0.kcElems.killCamPlayerCard:animateToState( "default_regular_killcam", 0 )
|
|
local f5_local9 = Game.GetPlayerScoreInfo( f5_local8 )
|
|
f5_local6:setText( "" )
|
|
if f5_local9 and f5_local9.rank then
|
|
f5_local6:setText( f5_local9.rank + 1 )
|
|
end
|
|
local f5_local10
|
|
if f5_local9 then
|
|
f5_local10 = f5_local9.name
|
|
if not f5_local10 then
|
|
|
|
else
|
|
f5_local4:setText( "" )
|
|
if Engine.IsConsoleGame() and string.sub( f5_local10, 1, 1 ) == "[" then
|
|
local f5_local11 = string.find( f5_local10, "]" )
|
|
if f5_local11 then
|
|
f5_local4:setText( string.sub( f5_local10, 1, f5_local11 ) )
|
|
f5_local10 = string.sub( f5_local10, f5_local11 + 1 )
|
|
end
|
|
end
|
|
f5_local7:setText( f5_local10 )
|
|
if f5_local9 then
|
|
if f5_local9.rank and f5_local9.prestige and f5_local9.prestige > 0 then
|
|
CoD.SetMaterial( f5_local5, RegisterMaterial( Rank.GetRankIcon( f5_local9.rank, f5_local9.prestige or 0 ) ) )
|
|
elseif f5_local9.rankIcon then
|
|
CoD.SetMaterial( f5_local5, f5_local9.rankIcon )
|
|
end
|
|
end
|
|
local f5_local11 = Game.GetPlayerCard( f5_local8 )
|
|
CoD.SetMaterial( f5_local0, RegisterMaterial( Engine.TableLookup( BackgroundsTable.File, BackgroundsTable.Cols.Ref, f5_local11.background, BackgroundsTable.Cols.CardImage ) ) )
|
|
CoD.SetMaterial( f5_local1, RegisterMaterial( Engine.TableLookup( PatchBackingsTable.File, PatchBackingsTable.Cols.Ref, f5_local11.patchBacking, PatchBackingsTable.Cols.CardImage ) ) )
|
|
CoD.SetMaterial( f5_local2, RegisterMaterial( Engine.TableLookup( PatchesTable.File, PatchesTable.Cols.Ref, f5_local11.patch, PatchesTable.Cols.CardImage ) ) )
|
|
f5_local3:setText( Engine.Localize( Engine.TableLookup( PatchesTable.File, PatchesTable.Cols.Ref, f5_local11.patch, PatchesTable.Cols.Quip ) ) )
|
|
end
|
|
end
|
|
f5_local10 = ""
|
|
end
|
|
|
|
local f0_local12 = function ( f6_arg0 )
|
|
local f6_local0 = f6_arg0.kcElems.playerCardBg
|
|
local f6_local1 = f6_arg0.kcElems.playerCardPatchBg
|
|
local f6_local2 = f6_arg0.kcElems.playerCardPatch
|
|
local f6_local3 = f6_arg0.kcElems.playerCardQuipText
|
|
local f6_local4 = f6_arg0.kcElems.playerCardRankIcon
|
|
local f6_local5 = f6_arg0.kcElems.playerCardRankText
|
|
local f6_local6 = f6_arg0.kcElems.playerCardNameText
|
|
local f6_local7 = Game.GetOmnvar( "ui_killcam_victim_id" )
|
|
if f6_local7 == -1 then
|
|
f6_arg0.kcElems.killCamPlayerCard:animateToState( "default", 0 )
|
|
return
|
|
end
|
|
f6_arg0.kcElems.killCamPlayerCard:animateToState( "default_regular_killcam", 0 )
|
|
local f6_local8 = Game.GetPlayerScoreInfo( f6_local7 )
|
|
f6_local5:setText( "" )
|
|
if f6_local8 and f6_local8.rank then
|
|
f6_local5:setText( f6_local8.rank + 1 )
|
|
end
|
|
local f6_local9
|
|
if f6_local8 then
|
|
f6_local9 = f6_local8.name
|
|
if not f6_local9 then
|
|
|
|
else
|
|
f6_local6:setText( f6_local9 )
|
|
if f6_local8 then
|
|
if f6_local8.rank and f6_local8.prestige and f6_local8.prestige > 0 then
|
|
CoD.SetMaterial( f6_local4, RegisterMaterial( Rank.GetRankIcon( f6_local8.rank, f6_local8.prestige or 0 ) ) )
|
|
elseif f6_local8.rankIcon then
|
|
CoD.SetMaterial( f6_local4, f6_local8.rankIcon )
|
|
end
|
|
end
|
|
local f6_local10 = Game.GetPlayerCard( f6_local7 )
|
|
CoD.SetMaterial( f6_local0, RegisterMaterial( Engine.TableLookup( BackgroundsTable.File, BackgroundsTable.Cols.Ref, f6_local10.background, BackgroundsTable.Cols.CardImage ) ) )
|
|
CoD.SetMaterial( f6_local1, RegisterMaterial( Engine.TableLookup( PatchBackingsTable.File, PatchBackingsTable.Cols.Ref, f6_local10.patchBacking, PatchBackingsTable.Cols.CardImage ) ) )
|
|
CoD.SetMaterial( f6_local2, RegisterMaterial( Engine.TableLookup( PatchesTable.File, PatchesTable.Cols.Ref, f6_local10.patch, PatchesTable.Cols.CardImage ) ) )
|
|
end
|
|
end
|
|
f6_local9 = ""
|
|
end
|
|
|
|
local f0_local13 = function ( f7_arg0, f7_arg1 )
|
|
if f7_arg1.value <= 0 then
|
|
f7_arg0:processEvent( {
|
|
name = "killcam_off"
|
|
} )
|
|
return
|
|
elseif GameX.GetGameMode() ~= "horde" then
|
|
f0_local8( f7_arg0 )
|
|
f0_local9( f7_arg0 )
|
|
f0_local10( f7_arg0 )
|
|
f0_local11( f7_arg0 )
|
|
f7_arg0.kcElems.killCamBottom:animateToState( "active", 0 )
|
|
f7_arg0.kcElems.killCamCountDownBar:animateToState( "active", 0 )
|
|
f7_arg0.kcElems.killCamTitleText:animateToState( "active", 0 )
|
|
f7_arg0:dispatchEventToChildren( {
|
|
name = "killcam_on"
|
|
} )
|
|
end
|
|
f7_arg0:processEvent( {
|
|
name = "killcam_on"
|
|
} )
|
|
f7_arg0:animateToState( "active", 0 )
|
|
end
|
|
|
|
local f0_local14 = function ( f8_arg0, f8_arg1 )
|
|
local f8_local0 = f8_arg0.kcElems.killCamCountDownBar
|
|
local f8_local1 = f8_arg0.kcElems.killCamVictimAttacker
|
|
local f8_local2 = f8_arg0.kcElems.killCamVictimAttackerText
|
|
local f8_local3 = f8_arg0.kcElems.killCamPlayerCard
|
|
local f8_local4 = f8_arg0.kcElems.killCamBottom
|
|
local f8_local5 = f8_arg0.kcElems.killCamTitleText
|
|
f8_local0:animateToState( "inactive", 0 )
|
|
if f8_arg1.value == f0_local5 then
|
|
f0_local12( f8_arg0 )
|
|
f8_arg0:animateToState( "active", 0 )
|
|
f8_local4:animateToState( "default", 0 )
|
|
local f8_local6 = MBh.AnimateSequence( {
|
|
{
|
|
"default_final_killcam",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
250
|
|
},
|
|
{
|
|
"active",
|
|
1250
|
|
},
|
|
{
|
|
"leaving",
|
|
250
|
|
}
|
|
} )
|
|
f8_local6( f8_local3 )
|
|
f8_local2:setText( "" )
|
|
f8_local6 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
250
|
|
},
|
|
{
|
|
"active",
|
|
1250
|
|
},
|
|
{
|
|
"leaving",
|
|
250
|
|
}
|
|
} )
|
|
f8_local6( f8_local1 )
|
|
elseif f8_arg1.value == f0_local6 then
|
|
f0_local11( f8_arg0 )
|
|
f8_arg0:animateToState( "active", 0 )
|
|
f8_local5:animateToState( "inactive", 0 )
|
|
local f8_local6 = MBh.AnimateSequence( {
|
|
{
|
|
"default_final_killcam",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
250
|
|
},
|
|
{
|
|
"active",
|
|
4500
|
|
}
|
|
} )
|
|
f8_local6( f8_local3 )
|
|
f8_local2:setText( "" )
|
|
f8_local6 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
250
|
|
},
|
|
{
|
|
"active",
|
|
2000
|
|
},
|
|
{
|
|
"leaving",
|
|
250
|
|
}
|
|
} )
|
|
f8_local6( f8_local1 )
|
|
f8_local6 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
250
|
|
},
|
|
{
|
|
"active",
|
|
0
|
|
}
|
|
} )
|
|
f8_local6( f8_local4 )
|
|
else
|
|
f8_arg0:animateToState( "default", 0 )
|
|
end
|
|
end
|
|
|
|
local f0_local15 = function ()
|
|
local f9_local0 = RegisterMaterial( "hud_killcam_corner" )
|
|
local self = LUI.UIElement.new()
|
|
self.id = "killCamCorners"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
alpha = 1
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
self:registerAnimationState( "inactive", {
|
|
alpha = 0
|
|
} )
|
|
local f9_local2 = LUI.UIImage.new()
|
|
f9_local2.id = "topLeftCorner"
|
|
f9_local2:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = 0,
|
|
height = 512,
|
|
width = 512,
|
|
material = f9_local0,
|
|
alpha = 1,
|
|
zRot = 0
|
|
} )
|
|
f9_local2:animateToState( "default", 0 )
|
|
local f9_local3 = LUI.UIImage.new()
|
|
f9_local3.id = "bottomLeftCorner"
|
|
f9_local3:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = 0,
|
|
left = 0,
|
|
height = 512,
|
|
width = 512,
|
|
material = f9_local0,
|
|
alpha = 1,
|
|
zRot = 90
|
|
} )
|
|
f9_local3:animateToState( "default", 0 )
|
|
local f9_local4 = LUI.UIImage.new()
|
|
f9_local4.id = "bottomRightCorner"
|
|
f9_local4:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
bottom = 0,
|
|
right = 0,
|
|
height = 512,
|
|
width = 512,
|
|
material = f9_local0,
|
|
alpha = 1,
|
|
zRot = 180
|
|
} )
|
|
f9_local4:animateToState( "default", 0 )
|
|
local f9_local5 = LUI.UIImage.new()
|
|
f9_local5.id = "topRightCorner"
|
|
f9_local5:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = true,
|
|
top = 0,
|
|
right = 0,
|
|
height = 512,
|
|
width = 512,
|
|
material = f9_local0,
|
|
alpha = 1,
|
|
zRot = 270
|
|
} )
|
|
f9_local5:animateToState( "default", 0 )
|
|
self:addElement( f9_local2 )
|
|
self:addElement( f9_local3 )
|
|
self:addElement( f9_local4 )
|
|
self:addElement( f9_local5 )
|
|
return self
|
|
end
|
|
|
|
local f0_local16 = function ()
|
|
local self = LUI.UIElement.new()
|
|
self.id = "killCamPlayerCard"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 96,
|
|
left = 95,
|
|
height = 64,
|
|
width = 256,
|
|
alpha = 0
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
self:registerAnimationState( "default_regular_killcam", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 96,
|
|
left = 95,
|
|
height = 64,
|
|
width = 256,
|
|
alpha = 1
|
|
} )
|
|
self:registerAnimationState( "default_final_killcam", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 50,
|
|
left = 0,
|
|
height = 64,
|
|
width = 256,
|
|
alpha = 0
|
|
} )
|
|
self:registerAnimationState( "opening", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 50,
|
|
left = 470,
|
|
height = 64,
|
|
width = 256,
|
|
alpha = 1
|
|
} )
|
|
self:registerAnimationState( "active", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 50,
|
|
left = 500,
|
|
height = 64,
|
|
width = 256,
|
|
alpha = 1
|
|
} )
|
|
self:registerAnimationState( "leaving", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 50,
|
|
left = 1000,
|
|
height = 64,
|
|
width = 256,
|
|
alpha = 0
|
|
} )
|
|
self:addElement( LUI.mp_hud.PlayerCardHud.playerCardHudDef() )
|
|
return self
|
|
end
|
|
|
|
local f0_local17 = function ()
|
|
local f11_local0 = RegisterMaterial( "kk_label_orange" )
|
|
local self = LUI.UIElement.new()
|
|
self.id = "killCamCountDownBar"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = 0,
|
|
height = 200,
|
|
width = 634,
|
|
alpha = 1
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
self:registerAnimationState( "inactive", {
|
|
alpha = 0
|
|
} )
|
|
self:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
local f11_local2 = LUI.UIImage.new()
|
|
f11_local2.id = "killCamCountDownBarImage"
|
|
f11_local2:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
bottom = 0,
|
|
height = 32,
|
|
material = f11_local0
|
|
} )
|
|
f11_local2:animateToState( "default", 0 )
|
|
local f11_local3 = LUI.UICountdown.new( {} )
|
|
f11_local3.id = "killCamCounterDownTimer"
|
|
f11_local3:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = -5,
|
|
left = 180,
|
|
height = CoD.TextSettings.HudDigitalBigFont.Height,
|
|
width = 100,
|
|
font = CoD.TextSettings.HudDigitalBigFont.Font,
|
|
alignment = LUI.Alignment.Right
|
|
} )
|
|
f11_local3:animateToState( "default", 0 )
|
|
f11_local3:registerEventHandler( "killcam_on", function ( element, event )
|
|
element:setEndTime( Game.GetOmnvar( "ui_killcam_end_milliseconds" ) )
|
|
end )
|
|
local f11_local4 = LUI.UIText.new()
|
|
f11_local4.id = "killCamKilledByText"
|
|
f11_local4:setText( f0_local1 )
|
|
f11_local4:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = -8,
|
|
left = 300,
|
|
height = CoD.TextSettings.HudEuroMedSmallFont.Height,
|
|
width = 200,
|
|
font = CoD.TextSettings.HudEuroMedSmallFont.Font,
|
|
alignment = LUI.Alignment.Left
|
|
} )
|
|
f11_local4:animateToState( "default", 0 )
|
|
f11_local2:addElement( f11_local3 )
|
|
f11_local2:addElement( f11_local4 )
|
|
self:addElement( f11_local2 )
|
|
return self
|
|
end
|
|
|
|
local f0_local18 = function ()
|
|
local f13_local0 = RegisterMaterial( "kk_lowbar" )
|
|
local self = LUI.UIElement.new()
|
|
self.id = "killCamBottom"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
bottom = 500,
|
|
height = 128,
|
|
alpha = 0
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
self:registerAnimationState( "opening", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
bottom = -20,
|
|
height = 128,
|
|
alpha = 1
|
|
} )
|
|
self:registerAnimationState( "active", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
bottom = -20,
|
|
height = 128,
|
|
alpha = 1
|
|
} )
|
|
local f13_local2 = LUI.UIImage.new()
|
|
f13_local2.id = "killCamBottomBg"
|
|
f13_local2:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
material = f13_local0
|
|
} )
|
|
f13_local2:animateToState( "default", 0 )
|
|
local f13_local3 = LUI.UIText.new()
|
|
f13_local3.id = "killCamTitleText"
|
|
f13_local3:setText( f0_local0 )
|
|
f13_local3:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
bottom = -60,
|
|
right = -120,
|
|
height = CoD.TextSettings.HudEuroExtraBigFont.Height,
|
|
width = 512,
|
|
font = CoD.TextSettings.HudEuroExtraBigFont.Font,
|
|
alignment = LUI.Alignment.Right,
|
|
alpha = 1
|
|
} )
|
|
f13_local3:animateToState( "default", 0 )
|
|
f13_local3:registerAnimationState( "inactive", {
|
|
alpha = 0
|
|
} )
|
|
f13_local3:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
local f13_local4 = LUI.UIText.new()
|
|
f13_local4.id = "killCamRespawnText"
|
|
f13_local4:setText( "" )
|
|
f13_local4:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
bottom = -35,
|
|
right = -120,
|
|
height = CoD.TextSettings.HudEuroMedSmallFont.Height,
|
|
width = 512,
|
|
font = CoD.TextSettings.HudEuroMedSmallFont.Font,
|
|
alignment = LUI.Alignment.Right
|
|
} )
|
|
f13_local4:animateToState( "default", 0 )
|
|
local f13_local5 = LUI.UIHorizontalList.new()
|
|
f13_local5.id = "killCamWeaponHL"
|
|
f13_local5:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = -80,
|
|
left = 100,
|
|
height = 32,
|
|
width = 512,
|
|
alignment = LUI.Alignment.Left,
|
|
spacing = 15
|
|
} )
|
|
f13_local5:animateToState( "default", 0 )
|
|
local f13_local6 = LUI.UIText.new()
|
|
f13_local6.id = "killCamWeaponNameText"
|
|
f13_local6:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = -60,
|
|
left = 90,
|
|
height = CoD.TextSettings.HudEuroMedSmallFont.Height,
|
|
width = 256,
|
|
font = CoD.TextSettings.HudEuroMedSmallFont.Font,
|
|
alignment = LUI.Alignment.Left
|
|
} )
|
|
f13_local6:animateToState( "default", 0 )
|
|
local f13_local7 = LUI.UIImage.new()
|
|
f13_local7.id = "killCamWeaponImage"
|
|
f13_local7:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = 0,
|
|
left = 0,
|
|
height = 76,
|
|
width = 150,
|
|
material = f0_local2,
|
|
alpha = 1
|
|
} )
|
|
f13_local7:animateToState( "default", 0 )
|
|
f13_local7:registerAnimationState( "primaryWeapon", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = 0,
|
|
left = 0,
|
|
height = 76,
|
|
width = 150,
|
|
alpha = 1
|
|
} )
|
|
f13_local7:registerAnimationState( "killstreakWeapon", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = 0,
|
|
left = 0,
|
|
height = 64,
|
|
width = 64,
|
|
alpha = 1
|
|
} )
|
|
f13_local7:registerAnimationState( "otherWeapon", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = 0,
|
|
left = 0,
|
|
height = 64,
|
|
width = 64,
|
|
alpha = 1
|
|
} )
|
|
f13_local7:registerAnimationState( "inactive", {
|
|
alpha = 0
|
|
} )
|
|
f13_local5:addElement( f13_local7 )
|
|
for f13_local8 = 1, f0_local3, 1 do
|
|
local f13_local11 = LUI.UIImage.new()
|
|
f13_local11.id = "killCamAttachment" .. f13_local8
|
|
f13_local11:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = 0,
|
|
left = 0,
|
|
height = 32,
|
|
width = 32,
|
|
material = f0_local2,
|
|
alpha = 0
|
|
} )
|
|
f13_local11:animateToState( "default", 0 )
|
|
f13_local11:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
f13_local5:addElement( f13_local11 )
|
|
end
|
|
local f13_local8 = LUI.UIHorizontalList.new()
|
|
f13_local8.id = "killCamAbilitiesHL"
|
|
f13_local8:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = -26,
|
|
left = 90,
|
|
height = 32,
|
|
width = 512,
|
|
alignment = LUI.Alignment.Left,
|
|
spacing = 0
|
|
} )
|
|
f13_local8:animateToState( "default", 0 )
|
|
self:addElement( f13_local2 )
|
|
self:addElement( f13_local3 )
|
|
self:addElement( f13_local4 )
|
|
self:addElement( f13_local5 )
|
|
self:addElement( f13_local8 )
|
|
self:addElement( f13_local6 )
|
|
return self
|
|
end
|
|
|
|
local f0_local19 = function ()
|
|
local self = LUI.UIElement.new()
|
|
self.id = "killCamVictimAttacker"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnhor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = true,
|
|
top = 110,
|
|
right = 0,
|
|
height = CoD.TextSettings.HudEuroExtraBigFont.Height,
|
|
width = 512,
|
|
alpha = 0
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
self:registerAnimationState( "opening", {
|
|
topAnchor = true,
|
|
leftAnhor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = true,
|
|
top = 110,
|
|
right = -470,
|
|
height = CoD.TextSettings.HudEuroExtraBigFont.Height,
|
|
width = 512,
|
|
alpha = 1
|
|
} )
|
|
self:registerAnimationState( "active", {
|
|
topAnchor = true,
|
|
leftAnhor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = true,
|
|
top = 110,
|
|
right = -500,
|
|
height = CoD.TextSettings.HudEuroExtraBigFont.Height,
|
|
width = 512,
|
|
alpha = 1
|
|
} )
|
|
self:registerAnimationState( "leaving", {
|
|
topAnchor = true,
|
|
leftAnhor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = true,
|
|
top = 110,
|
|
right = -1000,
|
|
height = CoD.TextSettings.HudEuroExtraBigFont.Height,
|
|
width = 512,
|
|
alpha = 0
|
|
} )
|
|
local f14_local1 = LUI.UIText.new()
|
|
f14_local1.id = "killCamVictimAttackerText"
|
|
f14_local1:setText( "" )
|
|
f14_local1:setTextStyle( CoD.TextStyle.Shadowed )
|
|
f14_local1:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
font = CoD.TextSettings.HudEuroExtraBigFont.Font,
|
|
alignment = LUI.Alignment.Right
|
|
} )
|
|
f14_local1:animateToState( "default", 0 )
|
|
self:addElement( f14_local1 )
|
|
return self
|
|
end
|
|
|
|
LUI.MenuBuilder.registerType( "killCamHudDef", function ()
|
|
local self = LUI.UIElement.new()
|
|
self.id = "killCamHudId"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
alpha = 0
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
self:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
self:registerEventHandler( "menu_create", f0_local7 )
|
|
self:registerOmnvarHandler( "ui_killcam_end_milliseconds", f0_local13 )
|
|
if GameX.GetGameMode() ~= "horde" then
|
|
self:registerOmnvarHandler( "ui_killcam_victim_or_attacker", f0_local14 )
|
|
end
|
|
self:registerEventHandler( "killcam_on", MBh.AnimateToState( "active", 0 ) )
|
|
self:registerEventHandler( "killcam_off", function ( element, event )
|
|
local f16_local0 = MBh.DoMultiple
|
|
local f16_local1 = {}
|
|
local f16_local2 = MBh.AnimateToState( "default", 0 )
|
|
local f16_local3 = MBh.EmitOmnvarUpdateEventToRoot( "ui_predator_missile" )
|
|
f16_local0 = f16_local0( f16_local2 )
|
|
f16_local0( element, event )
|
|
end )
|
|
self:addElement( f0_local15() )
|
|
if GameX.GetGameMode() ~= "horde" then
|
|
self:addElement( f0_local17() )
|
|
self:addElement( f0_local16() )
|
|
self:addElement( f0_local18() )
|
|
self:addElement( f0_local19() )
|
|
end
|
|
self:addElement( LUI.MenuBuilder.buildItems( {
|
|
type = "talkerHudDef"
|
|
}, self.properties, self ) )
|
|
return self
|
|
end )
|
|
LockTable( _M )
|