1288 lines
30 KiB
Lua
1288 lines
30 KiB
Lua
local f0_local0 = module
|
|
local f0_local1, f0_local2 = ...
|
|
f0_local0( f0_local1, package.seeall )
|
|
CoD.PrintModuleLoad( _NAME )
|
|
function GetTeamBasedReasonString( f1_arg0, f1_arg1 )
|
|
return Engine.Localize( f1_arg1, GameX.GetLocalizedTeamNameMixedCase( f1_arg0 ) )
|
|
end
|
|
|
|
f0_local0 = {
|
|
"@MP_DRAW",
|
|
"@MP_ROUND_DRAW",
|
|
"@MP_ROUND_WIN",
|
|
"@MP_ROUND_LOSS",
|
|
"@MP_VICTORY",
|
|
"@MP_DEFEAT",
|
|
"@MP_HALFTIME",
|
|
"@MP_OVERTIME",
|
|
"@MP_ROUNDEND",
|
|
"@MP_INTERMISSION",
|
|
"@MP_SWITCHING_SIDES",
|
|
"@MP_MATCH_BONUS_IS",
|
|
"@MP_MATCH_TIE",
|
|
"@MP_ROUNDEND"
|
|
}
|
|
f0_local1 = {
|
|
"@MP_SCORE_LIMIT_REACHED",
|
|
"@MP_TIME_LIMIT_REACHED",
|
|
"@MP_PLAYERS_FORFEITED",
|
|
"@MP_TARGET_DESTROYED",
|
|
"@MP_BOMB_DEFUSED",
|
|
function ()
|
|
return GetTeamBasedReasonString( Teams.allies, "@LUA_MENU_MP_TEAM_ELIMINATED" )
|
|
end,
|
|
function ()
|
|
return GetTeamBasedReasonString( Teams.axis, "@LUA_MENU_MP_TEAM_ELIMINATED" )
|
|
end,
|
|
function ()
|
|
return GetTeamBasedReasonString( Teams.allies, "@LUA_MENU_MP_TEAM_FORFEITED" )
|
|
end,
|
|
function ()
|
|
return GetTeamBasedReasonString( Teams.axis, "@LUA_MENU_MP_TEAM_FORFEITED" )
|
|
end,
|
|
"@MP_ENEMIES_ELIMINATED",
|
|
"@MP_MATCH_TIE",
|
|
"@GAME_OBJECTIVECOMPLETED",
|
|
"@GAME_OBJECTIVEFAILED",
|
|
"@MP_SWITCHING_SIDES",
|
|
"@MP_ROUND_LIMIT_REACHED",
|
|
"@MP_ENDED_GAME",
|
|
"@MP_HOST_ENDED_GAME"
|
|
}
|
|
f0_local2 = {
|
|
"@MP_FIRSTPLACE_NAME",
|
|
"@MP_SECONDPLACE_NAME",
|
|
"@MP_THIRDPLACE_NAME"
|
|
}
|
|
local f0_local3 = function ( f6_arg0 )
|
|
local f6_local0 = f0_local1[f6_arg0]
|
|
if type( f6_local0 ) == "function" then
|
|
return f6_local0()
|
|
else
|
|
return Engine.Localize( f6_local0 )
|
|
end
|
|
end
|
|
|
|
local f0_local4 = function ( f7_arg0 )
|
|
local f7_local0 = f7_arg0 or 0
|
|
if not Engine.UsingSplitscreenUpscaling() then
|
|
return {
|
|
top = -225 + f7_local0,
|
|
height = 128,
|
|
width = 512,
|
|
alpha = 0
|
|
}
|
|
else
|
|
local f7_local1 = {}
|
|
f7_local1 = GameX.GetSafeZoneSize()
|
|
return {
|
|
topAnchor = true,
|
|
top = f7_local1[2] + 10 + f7_local0,
|
|
height = 128,
|
|
width = 512,
|
|
alpha = 0
|
|
}
|
|
end
|
|
end
|
|
|
|
local f0_local5 = function ( f8_arg0, f8_arg1 )
|
|
local f8_local0 = Engine.GetLuiRoot()
|
|
f8_local0.hudManager:closeRoundEndScreen()
|
|
end
|
|
|
|
local f0_local6 = function ( f9_arg0, f9_arg1 )
|
|
if f9_arg1.value == 0 then
|
|
return
|
|
end
|
|
local f9_local0 = RegisterMaterial( "hud_round_end_fed" )
|
|
local f9_local1 = RegisterMaterial( "hud_round_end_ghost" )
|
|
local f9_local2 = f9_arg0:getChildById( "round_end_center" )
|
|
local f9_local3 = f9_local2:getChildById( "round_end_text" )
|
|
local f9_local4 = f9_local2:getChildById( "round_end_reason_text" )
|
|
local f9_local5 = f9_local2:getChildById( "round_end_match_bonus_text" )
|
|
local f9_local6 = f9_arg0:getChildById( "round_end_left_icon" )
|
|
local f9_local7 = f9_local6:getChildById( "round_end_left_icon_faction" )
|
|
local f9_local8 = f9_arg0:getChildById( "round_end_right_icon" )
|
|
local f9_local9 = f9_local8:getChildById( "round_end_right_icon_faction" )
|
|
local f9_local10 = f9_arg0:getChildById( "left_score_bg" )
|
|
local f9_local11 = f9_local10:getChildById( "left_score" )
|
|
local f9_local12 = f9_arg0:getChildById( "right_score_bg" )
|
|
local f9_local13 = f9_local12:getChildById( "right_score" )
|
|
local f9_local14 = Game.GetOmnvar( "ui_round_end_title" )
|
|
local f9_local15 = Game.GetOmnvar( "ui_round_end_reason" )
|
|
f9_local3:setText( Engine.Localize( f0_local0[f9_local14] ) )
|
|
local f9_local16 = ""
|
|
if f9_local15 > 0 then
|
|
f9_local16 = f0_local3( f9_local15 )
|
|
end
|
|
f9_local4:setText( f9_local16 )
|
|
if 0 < Game.GetOmnvar( "ui_round_end_match_bonus" ) then
|
|
f9_local5:setText( Engine.Localize( "@MP_MATCH_BONUS_IS", Game.GetOmnvar( "ui_round_end_match_bonus" ) ) )
|
|
else
|
|
f9_local5:setText( "" )
|
|
end
|
|
local f9_local17 = Game.GetPlayerTeam()
|
|
if MLG.IsMLGSpectator() then
|
|
f9_local17 = Game.GetLastMLGSpectateTeam()
|
|
end
|
|
if GameX.GetTeamName( f9_local17 ) == "allies" or f9_local17 == Teams.spectator then
|
|
CoD.SetMaterial( f9_local7, f9_local1 )
|
|
CoD.SetMaterial( f9_local9, f9_local0 )
|
|
else
|
|
CoD.SetMaterial( f9_local7, f9_local0 )
|
|
CoD.SetMaterial( f9_local9, f9_local1 )
|
|
end
|
|
f9_local11:setText( Game.GetOmnvar( "ui_round_end_friendly_score" ) )
|
|
f9_local13:setText( Game.GetOmnvar( "ui_round_end_enemy_score" ) )
|
|
f9_arg0:animateToState( "active", 0 )
|
|
local f9_local18 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
150
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f9_local18( f9_local6 )
|
|
f9_local18 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
150
|
|
},
|
|
{
|
|
"opening",
|
|
150
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f9_local18( f9_local8 )
|
|
f9_local18 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
300
|
|
},
|
|
{
|
|
"opening",
|
|
150
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f9_local18( f9_local10 )
|
|
f9_local18 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
500
|
|
},
|
|
{
|
|
"opening",
|
|
150
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f9_local18( f9_local12 )
|
|
f9_local18 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
750
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f9_local18( f9_local3 )
|
|
f9_local18 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
950
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f9_local18( f9_local4 )
|
|
f9_local18 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
1050
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f9_local18( f9_local5 )
|
|
end
|
|
|
|
local f0_local7 = function ( f10_arg0, f10_arg1 )
|
|
if f10_arg1.value == 0 then
|
|
return
|
|
end
|
|
local f10_local0 = f10_arg0:getChildById( "round_end_center" )
|
|
local f10_local1 = f10_local0:getChildById( "round_end_text" )
|
|
local f10_local2 = f10_local0:getChildById( "round_end_reason_text" )
|
|
local f10_local3 = f10_local0:getChildById( "round_end_match_bonus_text" )
|
|
local f10_local4 = f10_arg0:getChildById( "first_place_image" )
|
|
local f10_local5 = f10_arg0:getChildById( "second_place_image" )
|
|
local f10_local6 = f10_arg0:getChildById( "third_place_image" )
|
|
local f10_local7 = f10_local4:getChildById( "first_place_name" )
|
|
local f10_local8 = f10_local5:getChildById( "second_place_name" )
|
|
local f10_local9 = f10_local6:getChildById( "third_place_name" )
|
|
local f10_local10 = Game.GetOmnvar( "ui_round_end_title" )
|
|
local f10_local11 = Game.GetOmnvar( "ui_round_end_reason" )
|
|
f10_local1:setText( Engine.Localize( f0_local0[f10_local10] ) )
|
|
f10_local2:setText( f0_local3( f10_local11 ) )
|
|
if 0 < Game.GetOmnvar( "ui_round_end_match_bonus" ) then
|
|
f10_local3:setText( Engine.Localize( "@MP_MATCH_BONUS_IS", Game.GetOmnvar( "ui_round_end_match_bonus" ) ) )
|
|
else
|
|
f10_local3:setText( "" )
|
|
end
|
|
local f10_local12 = Game.GetPlayerTeam()
|
|
local f10_local13 = Game.GetPlayerScoreInfoAtRank( f10_local12, 1 )
|
|
local f10_local14 = Game.GetPlayerScoreInfoAtRank( f10_local12, 2 )
|
|
local f10_local15 = Game.GetPlayerScoreInfoAtRank( f10_local12, 3 )
|
|
if f10_local13 then
|
|
f10_local7:setText( f10_local13.name )
|
|
end
|
|
if f10_local14 then
|
|
f10_local8:setText( f10_local14.name )
|
|
end
|
|
if f10_local15 then
|
|
f10_local9:setText( f10_local15.name )
|
|
end
|
|
f10_arg0:animateToState( "active", 0 )
|
|
local f10_local16 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
150
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f10_local16( f10_local0 )
|
|
if f10_local13 then
|
|
f10_local16 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
150
|
|
},
|
|
{
|
|
"opening",
|
|
150
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f10_local16( f10_local4 )
|
|
end
|
|
if f10_local14 then
|
|
f10_local16 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
300
|
|
},
|
|
{
|
|
"opening",
|
|
150
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f10_local16( f10_local5 )
|
|
end
|
|
if f10_local15 then
|
|
f10_local16 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
500
|
|
},
|
|
{
|
|
"opening",
|
|
150
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f10_local16( f10_local6 )
|
|
end
|
|
f10_local16 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
750
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f10_local16( f10_local1 )
|
|
f10_local16 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
950
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f10_local16( f10_local2 )
|
|
f10_local16 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
1050
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f10_local16( f10_local3 )
|
|
end
|
|
|
|
local f0_local8 = function ( f11_arg0, f11_arg1 )
|
|
if f11_arg1.value == 0 then
|
|
return
|
|
end
|
|
local f11_local0 = f11_arg0:getChildById( "round_end_center" )
|
|
local f11_local1 = f11_local0:getChildById( "round_end_text" )
|
|
local f11_local2 = f11_local0:getChildById( "round_end_reason_text" )
|
|
local f11_local3 = f11_local0:getChildById( "round_end_match_bonus_text" )
|
|
local f11_local4 = Game.GetOmnvar( "ui_round_end_title" )
|
|
local f11_local5 = Game.GetOmnvar( "ui_round_end_reason" )
|
|
f11_local1:setText( Engine.Localize( f0_local0[f11_local4] ) )
|
|
f11_local2:setText( f0_local3( f11_local5 ) )
|
|
if 0 < Game.GetOmnvar( "ui_round_end_match_bonus" ) then
|
|
f11_local3:setText( Engine.Localize( "@MP_MATCH_BONUS_IS", Game.GetOmnvar( "ui_round_end_match_bonus" ) ) )
|
|
else
|
|
f11_local3:setText( "" )
|
|
end
|
|
f11_arg0:animateToState( "active", 0 )
|
|
local f11_local6 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
150
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f11_local6( f11_local0 )
|
|
f11_local6 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
750
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f11_local6( f11_local1 )
|
|
f11_local6 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
950
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f11_local6( f11_local2 )
|
|
f11_local6 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"default",
|
|
1050
|
|
},
|
|
{
|
|
"active",
|
|
150
|
|
}
|
|
} )
|
|
f11_local6( f11_local3 )
|
|
end
|
|
|
|
local f0_local9 = function ()
|
|
local f12_local0 = RegisterMaterial( "white" )
|
|
local f12_local1 = RegisterMaterial( "hud_round_end_center" )
|
|
local f12_local2 = RegisterMaterial( "hud_round_end_score_bg" )
|
|
local f12_local3 = RegisterMaterial( "hud_round_end_blue" )
|
|
local f12_local4 = RegisterMaterial( "hud_round_end_orange" )
|
|
local self = LUI.UIElement.new( f0_local4() )
|
|
self.id = "round_end_hud"
|
|
self:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
self:registerOmnvarHandler( "ui_round_end_update_data", f0_local6 )
|
|
self:registerEventHandler( "post_game_end", f0_local5 )
|
|
self:registerEventHandler( "intermission_began", f0_local5 )
|
|
self:registerOmnvarHandler( "ui_killcam_end_milliseconds", f0_local5 )
|
|
local f12_local6 = LUI.UIImage.new()
|
|
f12_local6.id = "round_end_center"
|
|
f12_local6:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
material = f12_local1
|
|
} )
|
|
f12_local6:animateToState( "default", 0 )
|
|
local f12_local7 = LUI.UIText.new()
|
|
f12_local7.id = "round_end_text"
|
|
f12_local7:setText( "" )
|
|
f12_local7:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.ExtraBigFont.Height / 2) + 25,
|
|
left = -256,
|
|
height = CoD.TextSettings.ExtraBigFont.Height,
|
|
width = 512,
|
|
alignment = LUI.Alignment.Center,
|
|
font = CoD.TextSettings.ExtraBigFont.Font,
|
|
red = Colors.white.r,
|
|
green = Colors.white.g,
|
|
blue = Colors.white.b,
|
|
alpha = 0
|
|
} )
|
|
f12_local7:animateToState( "default", 0 )
|
|
f12_local7:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
local f12_local8 = LUI.UIText.new()
|
|
f12_local8.id = "round_end_reason_text"
|
|
f12_local8:setText( "" )
|
|
f12_local8:setTextStyle( CoD.TextStyle.Outlined )
|
|
f12_local8:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.BigFont.Height / 2) + 70,
|
|
left = -256,
|
|
height = CoD.TextSettings.BigFont.Height,
|
|
width = 512,
|
|
alignment = LUI.Alignment.Center,
|
|
font = CoD.TextSettings.BigFont.Font,
|
|
alpha = 0
|
|
} )
|
|
f12_local8:animateToState( "default", 0 )
|
|
f12_local8:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
local f12_local9 = LUI.UIText.new()
|
|
f12_local9.id = "round_end_match_bonus_text"
|
|
f12_local9:setText( "" )
|
|
f12_local9:setTextStyle( CoD.TextStyle.Shadowed )
|
|
f12_local9:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.BigFont.Height / 2) - 60,
|
|
left = -256,
|
|
height = CoD.TextSettings.BigFont.Height,
|
|
width = 512,
|
|
alignment = LUI.Alignment.Center,
|
|
font = CoD.TextSettings.BigFont.Font,
|
|
red = Colors.yellow.r,
|
|
green = Colors.yellow.g,
|
|
blue = Colors.yellow.b,
|
|
alpha = 0
|
|
} )
|
|
f12_local9:animateToState( "default", 0 )
|
|
f12_local9:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
f12_local6:addElement( f12_local7 )
|
|
f12_local6:addElement( f12_local8 )
|
|
f12_local6:addElement( f12_local9 )
|
|
local f12_local10 = LUI.UIImage.new()
|
|
f12_local10.id = "round_end_left_icon"
|
|
f12_local10:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -564,
|
|
left = -564,
|
|
height = 256,
|
|
width = 256,
|
|
material = f12_local3,
|
|
alpha = 0
|
|
} )
|
|
f12_local10:animateToState( "default", 0 )
|
|
f12_local10:registerAnimationState( "opening", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -54,
|
|
left = -237,
|
|
height = 128,
|
|
width = 128,
|
|
alpha = 1
|
|
} )
|
|
f12_local10:registerAnimationState( "active", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -64,
|
|
left = -247,
|
|
height = 128,
|
|
width = 128,
|
|
alpha = 1
|
|
} )
|
|
local f12_local11 = LUI.UIImage.new()
|
|
f12_local11.id = "round_end_left_icon_faction"
|
|
f12_local11:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -64,
|
|
left = -64,
|
|
height = 128,
|
|
width = 128,
|
|
material = f12_local0
|
|
} )
|
|
f12_local11:animateToState( "default", 0 )
|
|
f12_local10:addElement( f12_local11 )
|
|
local f12_local12 = LUI.UIImage.new()
|
|
f12_local12.id = "round_end_right_icon"
|
|
f12_local12:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 436,
|
|
left = 436,
|
|
height = 256,
|
|
width = 256,
|
|
material = f12_local4,
|
|
alpha = 0
|
|
} )
|
|
f12_local12:animateToState( "default", 0 )
|
|
f12_local12:registerAnimationState( "opening", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -74,
|
|
left = 109,
|
|
height = 128,
|
|
width = 128,
|
|
alpha = 1
|
|
} )
|
|
f12_local12:registerAnimationState( "active", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -64,
|
|
left = 119,
|
|
height = 128,
|
|
width = 128,
|
|
alpha = 1
|
|
} )
|
|
local f12_local13 = LUI.UIImage.new()
|
|
f12_local13.id = "round_end_right_icon_faction"
|
|
f12_local13:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -64,
|
|
left = -64,
|
|
height = 128,
|
|
width = 128,
|
|
material = f12_local0
|
|
} )
|
|
f12_local13:animateToState( "default", 0 )
|
|
f12_local12:addElement( f12_local13 )
|
|
local f12_local14 = LUI.UIImage.new()
|
|
f12_local14.id = "left_score_bg"
|
|
f12_local14:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = -728,
|
|
height = 64,
|
|
width = 256,
|
|
material = f12_local2,
|
|
alpha = 0
|
|
} )
|
|
f12_local14:animateToState( "default", 0 )
|
|
f12_local14:registerAnimationState( "opening", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = -421,
|
|
height = 64,
|
|
width = 256,
|
|
alpha = 1
|
|
} )
|
|
f12_local14:registerAnimationState( "active", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = -431,
|
|
height = 64,
|
|
width = 256,
|
|
alpha = 1
|
|
} )
|
|
local f12_local15 = LUI.UIText.new()
|
|
f12_local15.id = "left_score"
|
|
f12_local15:setText( "" )
|
|
f12_local15:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.HudDigitalExtraBigFont.Height / 2) - 5,
|
|
left = -64,
|
|
height = CoD.TextSettings.HudDigitalExtraBigFont.Height,
|
|
width = 128,
|
|
alignment = LUI.Alignment.Center,
|
|
font = CoD.TextSettings.HudDigitalExtraBigFont.Font,
|
|
red = Colors.cyan.r,
|
|
green = Colors.cyan.g,
|
|
blue = Colors.cyan.b
|
|
} )
|
|
f12_local15:animateToState( "default", 0 )
|
|
f12_local14:addElement( f12_local15 )
|
|
local f12_local16 = LUI.UIImage.new()
|
|
f12_local16.id = "right_score_bg"
|
|
f12_local16:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = 728,
|
|
height = 64,
|
|
width = -256,
|
|
material = f12_local2,
|
|
alpha = 0
|
|
} )
|
|
f12_local16:animateToState( "default", 0 )
|
|
f12_local16:registerAnimationState( "opening", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = 421,
|
|
height = 64,
|
|
width = -256,
|
|
alpha = 1
|
|
} )
|
|
f12_local16:registerAnimationState( "active", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = 431,
|
|
height = 64,
|
|
width = -256,
|
|
alpha = 1
|
|
} )
|
|
local f12_local17 = LUI.UIText.new()
|
|
f12_local17.id = "right_score"
|
|
f12_local17:setText( "" )
|
|
f12_local17:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.HudDigitalExtraBigFont.Height / 2) - 5,
|
|
left = -64,
|
|
height = CoD.TextSettings.HudDigitalExtraBigFont.Height,
|
|
width = 128,
|
|
alignment = LUI.Alignment.Center,
|
|
font = CoD.TextSettings.HudDigitalExtraBigFont.Font,
|
|
red = Colors.orange.r,
|
|
green = Colors.orange.g,
|
|
blue = Colors.orange.b
|
|
} )
|
|
f12_local17:animateToState( "default", 0 )
|
|
f12_local16:addElement( f12_local17 )
|
|
self:addElement( f12_local6 )
|
|
self:addElement( f12_local10 )
|
|
self:addElement( f12_local12 )
|
|
self:addElement( f12_local14 )
|
|
self:addElement( f12_local16 )
|
|
return self
|
|
end
|
|
|
|
local f0_local10 = function ()
|
|
local f13_local0 = RegisterMaterial( "hud_round_end_ffa_top" )
|
|
local f13_local1 = RegisterMaterial( "hud_round_end_ffa_first" )
|
|
local f13_local2 = RegisterMaterial( "hud_round_end_ffa_second" )
|
|
local f13_local3 = RegisterMaterial( "hud_round_end_ffa_third" )
|
|
local self = LUI.UIElement.new( f0_local4( 25 ) )
|
|
self.id = "round_end_hud"
|
|
self:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
self:registerOmnvarHandler( "ui_round_end_update_data", f0_local7 )
|
|
self:registerEventHandler( "post_game_end", f0_local5 )
|
|
self:registerEventHandler( "intermission_began", f0_local5 )
|
|
self:registerOmnvarHandler( "ui_killcam_end_milliseconds", f0_local5 )
|
|
local f13_local5 = LUI.UIImage.new()
|
|
f13_local5.id = "round_end_center"
|
|
f13_local5:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -70,
|
|
left = -856,
|
|
height = 128,
|
|
width = 512,
|
|
material = f13_local0,
|
|
alpha = 0
|
|
} )
|
|
f13_local5:animateToState( "default", 0 )
|
|
f13_local5:registerAnimationState( "opening", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -70,
|
|
left = -246,
|
|
height = 128,
|
|
width = 512,
|
|
alpha = 1
|
|
} )
|
|
f13_local5:registerAnimationState( "active", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -70,
|
|
left = -256,
|
|
height = 128,
|
|
width = 512,
|
|
alpha = 1
|
|
} )
|
|
local f13_local6 = LUI.UIText.new()
|
|
f13_local6.id = "round_end_text"
|
|
f13_local6:setText( "" )
|
|
f13_local6:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.ExtraBigFont.Height / 2) - 20,
|
|
left = -256,
|
|
height = CoD.TextSettings.ExtraBigFont.Height,
|
|
width = 512,
|
|
alignment = LUI.Alignment.Center,
|
|
font = CoD.TextSettings.ExtraBigFont.Font,
|
|
alpha = 0
|
|
} )
|
|
f13_local6:animateToState( "default", 0 )
|
|
f13_local6:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
local f13_local7 = LUI.UIText.new()
|
|
f13_local7.id = "round_end_reason_text"
|
|
f13_local7:setText( "" )
|
|
f13_local7:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.BigFont.Height / 2) + 20,
|
|
left = -256,
|
|
height = CoD.TextSettings.BigFont.Height,
|
|
width = 512,
|
|
alignment = LUI.Alignment.Center,
|
|
font = CoD.TextSettings.BigFont.Font,
|
|
alpha = 0
|
|
} )
|
|
f13_local7:animateToState( "default", 0 )
|
|
f13_local7:registerAnimationState( "active", {
|
|
alpha = 0.5
|
|
} )
|
|
local f13_local8 = LUI.UIText.new()
|
|
f13_local8.id = "round_end_match_bonus_text"
|
|
f13_local8:setText( "" )
|
|
f13_local8:setTextStyle( CoD.TextStyle.Shadowed )
|
|
f13_local8:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.BigFont.Height / 2) - 60,
|
|
left = -256,
|
|
height = CoD.TextSettings.BigFont.Height,
|
|
width = 512,
|
|
alignment = LUI.Alignment.Center,
|
|
font = CoD.TextSettings.BigFont.Font,
|
|
red = Colors.yellow.r,
|
|
green = Colors.yellow.g,
|
|
blue = Colors.yellow.b,
|
|
alpha = 0
|
|
} )
|
|
f13_local8:animateToState( "default", 0 )
|
|
f13_local8:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
f13_local5:addElement( f13_local6 )
|
|
f13_local5:addElement( f13_local7 )
|
|
f13_local5:addElement( f13_local8 )
|
|
local f13_local9 = LUI.UIImage.new()
|
|
f13_local9.id = "first_place_image"
|
|
f13_local9:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 15,
|
|
left = 370,
|
|
height = 128,
|
|
width = 512,
|
|
material = f13_local1,
|
|
alpha = 0
|
|
} )
|
|
f13_local9:animateToState( "default", 0 )
|
|
f13_local9:registerAnimationState( "opening", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 15,
|
|
left = -240,
|
|
height = 128,
|
|
width = 512,
|
|
alpha = 1
|
|
} )
|
|
f13_local9:registerAnimationState( "active", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 15,
|
|
left = -230,
|
|
height = 128,
|
|
width = 512,
|
|
alpha = 1
|
|
} )
|
|
local f13_local10 = LUI.UIText.new()
|
|
f13_local10.id = "first_place_text"
|
|
f13_local10:setText( Engine.Localize( "@LUA_MENU_1ST" ) )
|
|
f13_local10:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.BigFont.Height / 2),
|
|
left = 100,
|
|
height = CoD.TextSettings.BigFont.Height,
|
|
width = 256,
|
|
alignment = LUI.Alignment.Left,
|
|
font = CoD.TextSettings.BigFont.Font
|
|
} )
|
|
f13_local10:animateToState( "default", 0 )
|
|
local f13_local11 = LUI.UIText.new()
|
|
f13_local11.id = "first_place_name"
|
|
f13_local11:setText( "" )
|
|
f13_local11:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.BigFont.Height / 2),
|
|
left = 170,
|
|
height = CoD.TextSettings.BigFont.Height,
|
|
width = 256,
|
|
alignment = LUI.Alignment.Left,
|
|
font = CoD.TextSettings.BigFont.Font
|
|
} )
|
|
f13_local11:animateToState( "default", 0 )
|
|
f13_local9:addElement( f13_local10 )
|
|
f13_local9:addElement( f13_local11 )
|
|
local f13_local12 = LUI.UIImage.new()
|
|
f13_local12.id = "second_place_image"
|
|
f13_local12:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 80,
|
|
left = 390,
|
|
height = 128,
|
|
width = 512,
|
|
material = f13_local2,
|
|
alpha = 0
|
|
} )
|
|
f13_local12:animateToState( "default", 0 )
|
|
f13_local12:registerAnimationState( "opening", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 80,
|
|
left = -220,
|
|
height = 128,
|
|
width = 512,
|
|
alpha = 1
|
|
} )
|
|
f13_local12:registerAnimationState( "active", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 80,
|
|
left = -210,
|
|
height = 128,
|
|
width = 512,
|
|
alpha = 1
|
|
} )
|
|
local f13_local13 = LUI.UIText.new()
|
|
f13_local13.id = "second_place_text"
|
|
f13_local13:setText( Engine.Localize( "@LUA_MENU_2ND" ) )
|
|
f13_local13:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.NormalFont.Height / 2),
|
|
left = 90,
|
|
height = CoD.TextSettings.NormalFont.Height,
|
|
width = 256,
|
|
alignment = LUI.Alignment.Left,
|
|
font = CoD.TextSettings.NormalFont.Font
|
|
} )
|
|
f13_local13:animateToState( "default", 0 )
|
|
local f13_local14 = LUI.UIText.new()
|
|
f13_local14.id = "second_place_name"
|
|
f13_local14:setText( "" )
|
|
f13_local14:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.NormalFont.Height / 2),
|
|
left = 155,
|
|
height = CoD.TextSettings.NormalFont.Height,
|
|
width = 256,
|
|
alignment = LUI.Alignment.Left,
|
|
font = CoD.TextSettings.NormalFont.Font
|
|
} )
|
|
f13_local14:animateToState( "default", 0 )
|
|
f13_local12:addElement( f13_local13 )
|
|
f13_local12:addElement( f13_local14 )
|
|
local f13_local15 = LUI.UIImage.new()
|
|
f13_local15.id = "third_place_image"
|
|
f13_local15:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 138,
|
|
left = 423,
|
|
height = 128,
|
|
width = 512,
|
|
material = f13_local3,
|
|
alpha = 0
|
|
} )
|
|
f13_local15:animateToState( "default", 0 )
|
|
f13_local15:registerAnimationState( "opening", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 138,
|
|
left = -187,
|
|
height = 128,
|
|
width = 512,
|
|
alpha = 1
|
|
} )
|
|
f13_local15:registerAnimationState( "active", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 138,
|
|
left = -177,
|
|
height = 128,
|
|
width = 512,
|
|
alpha = 1
|
|
} )
|
|
local f13_local16 = LUI.UIText.new()
|
|
f13_local16.id = "third_place_text"
|
|
f13_local16:setText( Engine.Localize( "@LUA_MENU_3RD" ) )
|
|
f13_local16:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.NormalFont.Height / 2),
|
|
left = 80,
|
|
height = CoD.TextSettings.NormalFont.Height,
|
|
width = 256,
|
|
alignment = LUI.Alignment.Left,
|
|
font = CoD.TextSettings.NormalFont.Font
|
|
} )
|
|
f13_local16:animateToState( "default", 0 )
|
|
local f13_local17 = LUI.UIText.new()
|
|
f13_local17.id = "third_place_name"
|
|
f13_local17:setText( "" )
|
|
f13_local17:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.NormalFont.Height / 2),
|
|
left = 145,
|
|
height = CoD.TextSettings.NormalFont.Height,
|
|
width = 256,
|
|
alignment = LUI.Alignment.Left,
|
|
font = CoD.TextSettings.NormalFont.Font
|
|
} )
|
|
f13_local17:animateToState( "default", 0 )
|
|
f13_local15:addElement( f13_local16 )
|
|
f13_local15:addElement( f13_local17 )
|
|
self:addElement( f13_local5 )
|
|
self:addElement( f13_local15 )
|
|
self:addElement( f13_local12 )
|
|
self:addElement( f13_local9 )
|
|
return self
|
|
end
|
|
|
|
local f0_local11 = function ()
|
|
local f14_local0 = RegisterMaterial( "hud_round_end_ffa_top" )
|
|
local self = LUI.UIElement.new( f0_local4( 25 ) )
|
|
self.id = "round_end_hud"
|
|
self:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
self:registerOmnvarHandler( "ui_round_end_update_data", f0_local8 )
|
|
self:registerEventHandler( "post_game_end", f0_local5 )
|
|
self:registerEventHandler( "intermission_began", f0_local5 )
|
|
self:registerOmnvarHandler( "ui_killcam_end_milliseconds", f0_local5 )
|
|
local f14_local2 = LUI.UIImage.new()
|
|
f14_local2.id = "round_end_center"
|
|
f14_local2:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -70,
|
|
left = -856,
|
|
height = 128,
|
|
width = 512,
|
|
material = f14_local0,
|
|
alpha = 0
|
|
} )
|
|
f14_local2:animateToState( "default", 0 )
|
|
f14_local2:registerAnimationState( "opening", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -70,
|
|
left = -246,
|
|
height = 128,
|
|
width = 512,
|
|
alpha = 1
|
|
} )
|
|
f14_local2:registerAnimationState( "active", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -70,
|
|
left = -256,
|
|
height = 128,
|
|
width = 512,
|
|
alpha = 1
|
|
} )
|
|
local f14_local3 = LUI.UIText.new()
|
|
f14_local3.id = "round_end_text"
|
|
f14_local3:setText( "" )
|
|
f14_local3:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.ExtraBigFont.Height / 2) - 20,
|
|
left = -256,
|
|
height = CoD.TextSettings.ExtraBigFont.Height,
|
|
width = 512,
|
|
alignment = LUI.Alignment.Center,
|
|
font = CoD.TextSettings.ExtraBigFont.Font,
|
|
alpha = 0
|
|
} )
|
|
f14_local3:animateToState( "default", 0 )
|
|
f14_local3:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
local f14_local4 = LUI.UIText.new()
|
|
f14_local4.id = "round_end_reason_text"
|
|
f14_local4:setText( "" )
|
|
f14_local4:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.BigFont.Height / 2) + 20,
|
|
left = -256,
|
|
height = CoD.TextSettings.BigFont.Height,
|
|
width = 512,
|
|
alignment = LUI.Alignment.Center,
|
|
font = CoD.TextSettings.BigFont.Font,
|
|
alpha = 0
|
|
} )
|
|
f14_local4:animateToState( "default", 0 )
|
|
f14_local4:registerAnimationState( "active", {
|
|
alpha = 0.5
|
|
} )
|
|
local f14_local5 = LUI.UIText.new()
|
|
f14_local5.id = "round_end_match_bonus_text"
|
|
f14_local5:setText( "" )
|
|
f14_local5:setTextStyle( CoD.TextStyle.Shadowed )
|
|
f14_local5:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(CoD.TextSettings.BigFont.Height / 2) - 60,
|
|
left = -256,
|
|
height = CoD.TextSettings.BigFont.Height,
|
|
width = 512,
|
|
alignment = LUI.Alignment.Center,
|
|
font = CoD.TextSettings.BigFont.Font,
|
|
red = Colors.yellow.r,
|
|
green = Colors.yellow.g,
|
|
blue = Colors.yellow.b,
|
|
alpha = 0
|
|
} )
|
|
f14_local5:animateToState( "default", 0 )
|
|
f14_local5:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
f14_local2:addElement( f14_local3 )
|
|
f14_local2:addElement( f14_local4 )
|
|
f14_local2:addElement( f14_local5 )
|
|
self:addElement( f14_local2 )
|
|
return self
|
|
end
|
|
|
|
LUI.MenuBuilder.registerType( "roundEndHudDef", function ()
|
|
if GameX.GetGameMode() == "horde" then
|
|
return f0_local11()
|
|
elseif GameX.gameModeIsFFA() then
|
|
return f0_local10()
|
|
else
|
|
return f0_local9()
|
|
end
|
|
end )
|
|
LockTable( _M )
|