984 lines
26 KiB
Lua
984 lines
26 KiB
Lua
local f0_local0 = module
|
|
local f0_local1, f0_local2 = ...
|
|
f0_local0( f0_local1, package.seeall )
|
|
CoD.PrintModuleLoad( _NAME )
|
|
f0_local0 = 1
|
|
f0_local1 = 64 * f0_local0
|
|
f0_local2 = 256 * f0_local0
|
|
local f0_local3 = 16 * f0_local0
|
|
local f0_local4 = 210 * f0_local0
|
|
local f0_local5 = 256 * f0_local0
|
|
local f0_local6 = 16 * f0_local0
|
|
local f0_local7 = 16 * f0_local0
|
|
local f0_local8 = false
|
|
local f0_local9 = function ( f1_arg0, f1_arg1 )
|
|
local f1_local0 = f1_arg0
|
|
local f1_local1 = f1_arg0:getFirstDescendentById( "capturing_bar" )
|
|
local f1_local2 = f1_arg0:getFirstDescendentById( "capturing_refresh_timer" )
|
|
local f1_local3 = f1_arg0:getFirstDescendentById( "capturing_text" )
|
|
local f1_local4 = f1_arg0:getFirstDescendentById( "capturing_bar_bg" )
|
|
local f1_local5 = f1_arg0:getFirstDescendentById( "capturing_bar_hl" )
|
|
local f1_local6 = f1_local5:getFirstDescendentById( "start_cap" )
|
|
local f1_local7 = f1_local5:getFirstDescendentById( "middle" )
|
|
local f1_local8 = f1_local5:getFirstDescendentById( "end_cap" )
|
|
f0_local8 = false
|
|
if Game.GetOmnvar( "ui_securing_progress" ) >= 1 and not f0_local8 then
|
|
f0_local8 = true
|
|
end
|
|
if f1_local4.current_state ~= "default" then
|
|
f1_local4:animateToState( "default", 0 )
|
|
f1_local4.current_state = "default"
|
|
end
|
|
if f0_local8 then
|
|
if f1_local1.current_state ~= "secured" then
|
|
local f1_local9 = MBh.AnimateSequence( {
|
|
{
|
|
"active",
|
|
500
|
|
},
|
|
{
|
|
"blink_off",
|
|
50
|
|
},
|
|
{
|
|
"blink_off",
|
|
50
|
|
},
|
|
{
|
|
"blink_on",
|
|
0
|
|
},
|
|
{
|
|
"blink_on",
|
|
50
|
|
},
|
|
{
|
|
"blink_off",
|
|
50
|
|
},
|
|
{
|
|
"blink_off",
|
|
50
|
|
},
|
|
{
|
|
"blink_on",
|
|
0
|
|
},
|
|
{
|
|
"blink_on",
|
|
50
|
|
},
|
|
{
|
|
"blink_off",
|
|
150
|
|
}
|
|
} )
|
|
f1_local9( f1_local1 )
|
|
f1_local1.current_state = "secured"
|
|
end
|
|
if f1_local3.current_state ~= "secured" then
|
|
local f1_local9 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
250
|
|
},
|
|
{
|
|
"secured",
|
|
0
|
|
}
|
|
} )
|
|
f1_local9( f1_local3 )
|
|
f1_local3.current_state = "secured"
|
|
end
|
|
if f1_local6.current_state ~= "secured" then
|
|
f1_local6:animateToState( "secured" )
|
|
f1_local6.current_state = "secured"
|
|
end
|
|
if f1_local7.current_state ~= "secured" then
|
|
f1_local7:animateToState( "secured" )
|
|
f1_local7.current_state = "secured"
|
|
end
|
|
if f1_local8.current_state ~= "secured" then
|
|
f1_local8:animateToState( "secured" )
|
|
f1_local8.current_state = "secured"
|
|
end
|
|
else
|
|
if f1_local1.current_state ~= "default" then
|
|
f1_local1:animateToState( "default", 0 )
|
|
f1_local1.current_state = "default"
|
|
end
|
|
if f1_local5.current_state ~= "default" then
|
|
f1_local5:animateToState( "default", 0 )
|
|
f1_local5.current_state = "default"
|
|
end
|
|
if f1_local3.current_state ~= "default" then
|
|
f1_local3:animateToState( "default", 0 )
|
|
f1_local3.current_state = "default"
|
|
end
|
|
if f1_local7.current_state ~= "default" then
|
|
f1_local7:animateToState( "default", 0 )
|
|
f1_local7.current_state = "default"
|
|
end
|
|
end
|
|
end
|
|
|
|
local f0_local10 = function ( f2_arg0, f2_arg1 )
|
|
local f2_local0 = f2_arg0
|
|
local f2_local1 = f2_arg0:getFirstDescendentById( "capturing_refresh_timer" )
|
|
local f2_local2 = f2_arg0:getFirstDescendentById( "capturing_text" )
|
|
local f2_local3 = f2_arg0:getFirstDescendentById( "capturing_bar_bg" )
|
|
local f2_local4 = f2_arg0:getFirstDescendentById( "capturing_bar_hl" )
|
|
local f2_local5 = f2_local4:getFirstDescendentById( "start_cap" )
|
|
local f2_local6 = f2_local4:getFirstDescendentById( "middle" )
|
|
local f2_local7 = f2_local4:getFirstDescendentById( "end_cap" )
|
|
local f2_local8 = f2_local1.value
|
|
local f2_local9 = ""
|
|
if f2_local8 == 0 then
|
|
LUI.UITimer.Stop( f2_local1 )
|
|
return
|
|
elseif f2_local8 == 1 then
|
|
f2_local9 = Engine.Localize( "@KILLSTREAKS_CAPTURING_CRATE" )
|
|
elseif f2_local8 == 2 then
|
|
f2_local9 = Engine.Localize( "@LUA_MENU_ACQUIRING_INTEL" )
|
|
elseif f2_local8 == 3 then
|
|
f2_local9 = Engine.Localize( "@KILLSTREAKS_BOX_GETTING_VEST" )
|
|
elseif f2_local8 == 4 then
|
|
f2_local9 = Engine.Localize( "@KILLSTREAKS_DEPLOYABLE_AMMO_TAKING" )
|
|
elseif f2_local8 == 5 then
|
|
f2_local9 = Engine.Localize( "@MPUI_REVIVING" )
|
|
elseif f2_local8 == 6 then
|
|
f2_local9 = Engine.Localize( "@MPUI_BEING_REVIVED" )
|
|
elseif f2_local8 == 7 then
|
|
f2_local9 = Engine.Localize( "@MP_BREACHING" )
|
|
elseif f2_local8 == 8 then
|
|
f2_local9 = Engine.Localize( "@MP_PATCH_USING" )
|
|
end
|
|
if f2_local0.current_state ~= "active" then
|
|
f2_local0:animateToState( "active", 250 )
|
|
f2_local0.current_state = "active"
|
|
end
|
|
if f2_local3.current_state ~= "active" then
|
|
f2_local3:animateToState( "active", 250 )
|
|
f2_local3.current_state = "active"
|
|
end
|
|
if f2_local4.current_state ~= "active" then
|
|
f2_local4:animateToState( "active", 250 )
|
|
f2_local4.current_state = "active"
|
|
end
|
|
if f2_local5.current_state ~= "default" then
|
|
f2_local5:animateToState( "default" )
|
|
f2_local5.current_state = "default"
|
|
end
|
|
if f2_local6.current_state ~= "default" then
|
|
f2_local6:animateToState( "default" )
|
|
f2_local6.current_state = "default"
|
|
end
|
|
if f2_local7.current_state ~= "default" then
|
|
f2_local7:animateToState( "default" )
|
|
f2_local7.current_state = "default"
|
|
end
|
|
if f2_local2.current_state ~= "securing" then
|
|
f2_local2:setText( f2_local9 )
|
|
local f2_local10 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
250
|
|
},
|
|
{
|
|
"active",
|
|
0
|
|
}
|
|
} )
|
|
f2_local10( f2_local2 )
|
|
f2_local2.current_state = "securing"
|
|
end
|
|
f2_local6:registerAnimationState( "move_bar", {
|
|
right = f2_local6.m_maxWidth * Game.GetOmnvar( "ui_securing_progress" )
|
|
} )
|
|
f2_local6:animateToState( "move_bar", 150 )
|
|
end
|
|
|
|
local f0_local11 = function ( f3_arg0, f3_arg1 )
|
|
local f3_local0 = f3_arg0:getFirstDescendentById( "capturing_refresh_timer" )
|
|
if f3_arg1.value > 0 then
|
|
LUI.UITimer.Reset( f3_local0 )
|
|
else
|
|
LUI.UITimer.Stop( f3_local0 )
|
|
f0_local9( f3_arg0, f3_arg1 )
|
|
end
|
|
f3_local0.value = f3_arg1.value
|
|
end
|
|
|
|
local f0_local12 = function ( f4_arg0, f4_arg1 )
|
|
local f4_local0 = f4_arg0
|
|
local f4_local1 = f4_arg0:getFirstDescendentById( "capturing_bar" )
|
|
local f4_local2 = f4_arg0:getFirstDescendentById( "capturing_refresh_timer" )
|
|
local f4_local3 = f4_arg0:getFirstDescendentById( "capturing_text" )
|
|
local f4_local4 = f4_arg0:getFirstDescendentById( "capturing_bar_bg" )
|
|
local f4_local5 = f4_arg0:getFirstDescendentById( "capturing_bar_hl" )
|
|
local f4_local6 = f4_local5:getFirstDescendentById( "start_cap" )
|
|
local f4_local7 = f4_local5:getFirstDescendentById( "middle" )
|
|
local f4_local8 = f4_local5:getFirstDescendentById( "end_cap" )
|
|
local f4_local9 = f4_local2.value
|
|
local f4_local10 = ""
|
|
if f4_local9 == 1 then
|
|
f4_local10 = Engine.Localize( "@LUA_MENU_SECURED_A" )
|
|
elseif f4_local9 == 2 then
|
|
f4_local10 = Engine.Localize( "@LUA_MENU_SECURED_B" )
|
|
elseif f4_local9 == 3 then
|
|
f4_local10 = Engine.Localize( "@LUA_MENU_SECURED_C" )
|
|
end
|
|
f0_local8 = false
|
|
if 1 <= Game.GetOmnvar( "ui_dom_progress" ) and not f0_local8 then
|
|
f0_local8 = true
|
|
end
|
|
if f4_local4.current_state ~= "default" then
|
|
f4_local4:animateToState( "default", 0 )
|
|
f4_local4.current_state = "default"
|
|
end
|
|
if f0_local8 and f4_arg1.name ~= "playerstate_client_changed" then
|
|
if f4_local1.current_state ~= "secured" then
|
|
local f4_local11 = MBh.AnimateSequence( {
|
|
{
|
|
"active",
|
|
500
|
|
},
|
|
{
|
|
"blink_off",
|
|
50
|
|
},
|
|
{
|
|
"blink_off",
|
|
50
|
|
},
|
|
{
|
|
"blink_on",
|
|
0
|
|
},
|
|
{
|
|
"blink_on",
|
|
50
|
|
},
|
|
{
|
|
"blink_off",
|
|
50
|
|
},
|
|
{
|
|
"blink_off",
|
|
50
|
|
},
|
|
{
|
|
"blink_on",
|
|
0
|
|
},
|
|
{
|
|
"blink_on",
|
|
50
|
|
},
|
|
{
|
|
"blink_off",
|
|
150
|
|
}
|
|
} )
|
|
f4_local11( f4_local1 )
|
|
f4_local1.current_state = "secured"
|
|
end
|
|
if f4_local3.current_text ~= f4_local10 and f4_local10 ~= "" then
|
|
f4_local3:setText( f4_local10 )
|
|
f4_local3.current_text = f4_local10
|
|
end
|
|
if f4_local3.current_state ~= "secured" then
|
|
local f4_local11 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
250
|
|
},
|
|
{
|
|
"secured",
|
|
0
|
|
}
|
|
} )
|
|
f4_local11( f4_local3 )
|
|
f4_local3.current_state = "secured"
|
|
end
|
|
if f4_local6.current_state ~= "secured" then
|
|
f4_local6:animateToState( "secured" )
|
|
f4_local6.current_state = "secured"
|
|
end
|
|
if f4_local7.current_state ~= "secured" then
|
|
f4_local7:animateToState( "secured" )
|
|
f4_local7.current_state = "secured"
|
|
end
|
|
if f4_local8.current_state ~= "secured" then
|
|
f4_local8:animateToState( "secured" )
|
|
f4_local8.current_state = "secured"
|
|
end
|
|
else
|
|
if f4_local1.current_state ~= "default" then
|
|
f4_local1:animateToState( "default", 0 )
|
|
f4_local1.current_state = "default"
|
|
end
|
|
if f4_local5.current_state ~= "default" then
|
|
f4_local5:animateToState( "default", 0 )
|
|
f4_local5.current_state = "default"
|
|
end
|
|
if f4_local3.current_state ~= "default" then
|
|
f4_local3:animateToState( "default", 0 )
|
|
f4_local3.current_state = "default"
|
|
end
|
|
if f4_local7.current_state ~= "default" then
|
|
f4_local7:animateToState( "default", 0 )
|
|
f4_local7.current_state = "default"
|
|
end
|
|
end
|
|
end
|
|
|
|
local f0_local13 = function ( f5_arg0, f5_arg1 )
|
|
local f5_local0 = f5_arg0
|
|
local f5_local1 = f5_arg0:getFirstDescendentById( "capturing_refresh_timer" )
|
|
local f5_local2 = f5_arg0:getFirstDescendentById( "capturing_text" )
|
|
local f5_local3 = f5_arg0:getFirstDescendentById( "capturing_bar_bg" )
|
|
local f5_local4 = f5_arg0:getFirstDescendentById( "capturing_bar_hl" )
|
|
local f5_local5 = f5_local4:getFirstDescendentById( "start_cap" )
|
|
local f5_local6 = f5_local4:getFirstDescendentById( "middle" )
|
|
local f5_local7 = f5_local4:getFirstDescendentById( "end_cap" )
|
|
local f5_local8 = f5_local1.value
|
|
local f5_local9 = ""
|
|
if f5_local8 == 0 then
|
|
LUI.UITimer.Stop( f5_local1 )
|
|
return
|
|
elseif f5_local8 == 1 then
|
|
f5_local9 = Engine.Localize( "@LUA_MENU_SECURING_A" )
|
|
elseif f5_local8 == 2 then
|
|
f5_local9 = Engine.Localize( "@LUA_MENU_SECURING_B" )
|
|
elseif f5_local8 == 3 then
|
|
f5_local9 = Engine.Localize( "@LUA_MENU_SECURING_C" )
|
|
end
|
|
if 0 < Game.GetOmnvar( "ui_dom_stalemate" ) then
|
|
if f5_local0.current_state ~= "active" then
|
|
f5_local0:animateToState( "active", 0 )
|
|
f5_local0.current_state = "active"
|
|
end
|
|
if f5_local2.current_state ~= "contested" then
|
|
local f5_local10 = Engine.Localize( "@LUA_MENU_CONTESTED" )
|
|
f5_local2:setText( f5_local10 )
|
|
local f5_local11 = MBh.AnimateLoop( {
|
|
{
|
|
"contested",
|
|
0
|
|
},
|
|
{
|
|
"contested_off_for_loop",
|
|
500
|
|
}
|
|
} )
|
|
f5_local11( f5_local2 )
|
|
f5_local2.current_state = "contested"
|
|
f5_local2.current_text = f5_local10
|
|
end
|
|
if f5_local5.current_state ~= "contested" then
|
|
f5_local5:animateToState( "contested" )
|
|
f5_local5.current_state = "contested"
|
|
end
|
|
if f5_local6.current_state ~= "contested" then
|
|
f5_local6:animateToState( "contested" )
|
|
f5_local6.current_state = "contested"
|
|
end
|
|
if f5_local7.current_state ~= "contested" then
|
|
f5_local7:animateToState( "contested" )
|
|
f5_local7.current_state = "contested"
|
|
end
|
|
else
|
|
if f5_local0.current_state ~= "active" then
|
|
f5_local0:animateToState( "active", 250 )
|
|
f5_local0.current_state = "active"
|
|
end
|
|
if f5_local3.current_state ~= "active" then
|
|
f5_local3:animateToState( "active", 250 )
|
|
f5_local3.current_state = "active"
|
|
end
|
|
if f5_local4.current_state ~= "active" then
|
|
f5_local4:animateToState( "active", 250 )
|
|
f5_local4.current_state = "active"
|
|
end
|
|
if f5_local5.current_state ~= "default" then
|
|
f5_local5:animateToState( "default" )
|
|
f5_local5.current_state = "default"
|
|
end
|
|
if f5_local6.current_state ~= "default" then
|
|
f5_local6:animateToState( "default" )
|
|
f5_local6.current_state = "default"
|
|
end
|
|
if f5_local7.current_state ~= "default" then
|
|
f5_local7:animateToState( "default" )
|
|
f5_local7.current_state = "default"
|
|
end
|
|
if f5_local2.current_text ~= f5_local9 then
|
|
f5_local2:setText( f5_local9 )
|
|
f5_local2.current_text = f5_local9
|
|
end
|
|
if f5_local2.current_state ~= "securing" then
|
|
local f5_local10 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
250
|
|
},
|
|
{
|
|
"active",
|
|
0
|
|
}
|
|
} )
|
|
f5_local10( f5_local2 )
|
|
f5_local2.current_state = "securing"
|
|
end
|
|
f5_local6:registerAnimationState( "move_bar", {
|
|
right = f5_local6.m_maxWidth * Game.GetOmnvar( "ui_dom_progress" )
|
|
} )
|
|
f5_local6:animateToState( "move_bar", 150 )
|
|
end
|
|
end
|
|
|
|
local f0_local14 = function ( f6_arg0, f6_arg1 )
|
|
local f6_local0 = f6_arg0:getFirstDescendentById( "capturing_refresh_timer" )
|
|
if f6_arg1.value > 0 then
|
|
LUI.UITimer.Reset( f6_local0 )
|
|
else
|
|
LUI.UITimer.Stop( f6_local0 )
|
|
f0_local12( f6_arg0, f6_arg1 )
|
|
end
|
|
f6_local0.value = f6_arg1.value
|
|
end
|
|
|
|
local f0_local15 = function ( f7_arg0, f7_arg1 )
|
|
local f7_local0 = f7_arg0
|
|
local f7_local1 = f7_arg0:getFirstDescendentById( "capturing_bar" )
|
|
local f7_local2 = f7_arg0:getFirstDescendentById( "capturing_refresh_timer" )
|
|
local f7_local3 = f7_arg0:getFirstDescendentById( "capturing_text" )
|
|
local f7_local4 = f7_arg0:getFirstDescendentById( "capturing_bar_bg" )
|
|
local f7_local5 = f7_arg0:getFirstDescendentById( "capturing_bar_hl" )
|
|
local f7_local6 = f7_local5:getFirstDescendentById( "start_cap" )
|
|
local f7_local7 = f7_local5:getFirstDescendentById( "middle" )
|
|
local f7_local8 = f7_local5:getFirstDescendentById( "end_cap" )
|
|
local f7_local9 = f7_local2.value
|
|
local f7_local10 = ""
|
|
if f7_local9 == 1 then
|
|
f7_local10 = Engine.Localize( "@SPLASHES_PLANT" )
|
|
elseif f7_local9 == 2 then
|
|
f7_local10 = Engine.Localize( "@SPLASHES_DEFUSE" )
|
|
end
|
|
f0_local8 = false
|
|
if 1 <= Game.GetOmnvar( "ui_planting_defusing_progress" ) and not f0_local8 then
|
|
f0_local8 = true
|
|
end
|
|
if f7_local4.current_state ~= "default" then
|
|
f7_local4:animateToState( "default", 0 )
|
|
f7_local4.current_state = "default"
|
|
end
|
|
if f0_local8 and f7_arg1.name ~= "playerstate_client_changed" then
|
|
if f7_local1.current_state ~= "secured" then
|
|
local f7_local11 = MBh.AnimateSequence( {
|
|
{
|
|
"active",
|
|
500
|
|
},
|
|
{
|
|
"blink_off",
|
|
50
|
|
},
|
|
{
|
|
"blink_off",
|
|
50
|
|
},
|
|
{
|
|
"blink_on",
|
|
0
|
|
},
|
|
{
|
|
"blink_on",
|
|
50
|
|
},
|
|
{
|
|
"blink_off",
|
|
50
|
|
},
|
|
{
|
|
"blink_off",
|
|
50
|
|
},
|
|
{
|
|
"blink_on",
|
|
0
|
|
},
|
|
{
|
|
"blink_on",
|
|
50
|
|
},
|
|
{
|
|
"blink_off",
|
|
150
|
|
}
|
|
} )
|
|
f7_local11( f7_local1 )
|
|
f7_local1.current_state = "secured"
|
|
end
|
|
if f7_local3.current_state ~= "secured" then
|
|
f7_local3:setText( f7_local10 )
|
|
local f7_local11 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
250
|
|
},
|
|
{
|
|
"secured",
|
|
0
|
|
}
|
|
} )
|
|
f7_local11( f7_local3 )
|
|
f7_local3.current_state = "secured"
|
|
end
|
|
if f7_local6.current_state ~= "secured" then
|
|
f7_local6:animateToState( "secured" )
|
|
f7_local6.current_state = "secured"
|
|
end
|
|
if f7_local7.current_state ~= "secured" then
|
|
f7_local7:animateToState( "secured" )
|
|
f7_local7.current_state = "secured"
|
|
end
|
|
if f7_local8.current_state ~= "secured" then
|
|
f7_local8:animateToState( "secured" )
|
|
f7_local8.current_state = "secured"
|
|
end
|
|
else
|
|
if f7_local1.current_state ~= "default" then
|
|
f7_local1:animateToState( "default", 0 )
|
|
f7_local1.current_state = "default"
|
|
end
|
|
if f7_local5.current_state ~= "default" then
|
|
f7_local5:animateToState( "default", 0 )
|
|
f7_local5.current_state = "default"
|
|
end
|
|
if f7_local3.current_state ~= "default" then
|
|
f7_local3:animateToState( "default", 0 )
|
|
f7_local3.current_state = "default"
|
|
end
|
|
f7_local7:animateToState( "default", 0 )
|
|
f7_local7.current_state = "default"
|
|
end
|
|
end
|
|
|
|
local f0_local16 = function ( f8_arg0, f8_arg1 )
|
|
local f8_local0 = f8_arg0
|
|
local f8_local1 = f8_arg0:getFirstDescendentById( "capturing_refresh_timer" )
|
|
local f8_local2 = f8_arg0:getFirstDescendentById( "capturing_text" )
|
|
local f8_local3 = f8_arg0:getFirstDescendentById( "capturing_bar_bg" )
|
|
local f8_local4 = f8_arg0:getFirstDescendentById( "capturing_bar_hl" )
|
|
local f8_local5 = f8_local4:getFirstDescendentById( "start_cap" )
|
|
local f8_local6 = f8_local4:getFirstDescendentById( "middle" )
|
|
local f8_local7 = f8_local4:getFirstDescendentById( "end_cap" )
|
|
local f8_local8 = f8_local1.value
|
|
local f8_local9 = ""
|
|
if isSecuring == 0 then
|
|
LUI.UITimer.Stop( f8_local1 )
|
|
return
|
|
elseif f8_local8 == 1 then
|
|
f8_local9 = Engine.Localize( "@MP_PLANTING_EXPLOSIVE" )
|
|
elseif f8_local8 == 2 then
|
|
f8_local9 = Engine.Localize( "@MP_DEFUSING_EXPLOSIVE" )
|
|
end
|
|
if f8_local0.current_state ~= "active" then
|
|
f8_local0:animateToState( "active", 250 )
|
|
f8_local0.current_state = "active"
|
|
end
|
|
if f8_local3.current_state ~= "active" then
|
|
f8_local3:animateToState( "active", 250 )
|
|
f8_local3.current_state = "active"
|
|
end
|
|
if f8_local4.current_state ~= "active" then
|
|
f8_local4:animateToState( "active", 250 )
|
|
f8_local4.current_state = "active"
|
|
end
|
|
if f8_local5.current_state ~= "default" then
|
|
f8_local5:animateToState( "default" )
|
|
f8_local5.current_state = "default"
|
|
end
|
|
if f8_local6.current_state ~= "default" then
|
|
f8_local6:animateToState( "default" )
|
|
f8_local6.current_state = "default"
|
|
end
|
|
if f8_local7.current_state ~= "default" then
|
|
f8_local7:animateToState( "default" )
|
|
f8_local7.current_state = "default"
|
|
end
|
|
if f8_local2.current_state ~= "securing" then
|
|
f8_local2:setText( f8_local9 )
|
|
local f8_local10 = MBh.AnimateSequence( {
|
|
{
|
|
"default",
|
|
0
|
|
},
|
|
{
|
|
"opening",
|
|
250
|
|
},
|
|
{
|
|
"active",
|
|
0
|
|
}
|
|
} )
|
|
f8_local10( f8_local2 )
|
|
f8_local2.current_state = "securing"
|
|
end
|
|
f8_local6:registerAnimationState( "move_bar", {
|
|
width = f8_local6.m_maxWidth * Game.GetOmnvar( "ui_planting_defusing_progress" )
|
|
} )
|
|
f8_local6:animateToState( "move_bar", 150 )
|
|
end
|
|
|
|
local f0_local17 = function ( f9_arg0, f9_arg1 )
|
|
local f9_local0 = f9_arg0:getFirstDescendentById( "capturing_refresh_timer" )
|
|
if f9_arg1.value > 0 then
|
|
LUI.UITimer.Reset( f9_local0 )
|
|
else
|
|
LUI.UITimer.Stop( f9_local0 )
|
|
f0_local15( f9_arg0, f9_arg1 )
|
|
end
|
|
f9_local0.value = f9_arg1.value
|
|
end
|
|
|
|
local f0_local18 = function ( f10_arg0 )
|
|
local f10_local0 = RegisterMaterial( "capturing_bg_mp" )
|
|
local f10_local1 = RegisterMaterial( "capturing_bar_end_mp" )
|
|
local f10_local2 = RegisterMaterial( "capturing_bar_mp" )
|
|
local f10_local3 = RegisterMaterial( "capturing_bar_start_mp" )
|
|
local self = LUI.UIElement.new()
|
|
self.id = "capturing_bar"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(f0_local1 / 2),
|
|
left = -(f0_local2 / 2),
|
|
height = f0_local1,
|
|
width = f0_local2,
|
|
alpha = 0
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
self:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
self:registerAnimationState( "blink_on", {
|
|
alpha = 1
|
|
} )
|
|
self:registerAnimationState( "blink_off", {
|
|
alpha = 0
|
|
} )
|
|
self:registerEventHandler( "capture_refresh", f10_arg0 )
|
|
local f10_local5 = LUI.UITimer.new( 100, "capture_refresh", nil, false, false, false, true )
|
|
f10_local5.id = "capturing_refresh_timer"
|
|
f10_local5.value = 0
|
|
local f10_local6 = LUI.UIImage.new()
|
|
f10_local6.id = "capturing_bar_bg"
|
|
f10_local6:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
material = f10_local0
|
|
} )
|
|
f10_local6:animateToState( "default", 0 )
|
|
local f10_local7 = LUI.UIHorizontalList.new()
|
|
f10_local7.id = "capturing_bar_hl"
|
|
f10_local7:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = -33,
|
|
left = 27,
|
|
height = f0_local3,
|
|
width = f0_local4,
|
|
alignment = LUI.Alignment.Left,
|
|
spacing = 0,
|
|
alpha = 0
|
|
} )
|
|
f10_local7:animateToState( "default", 0 )
|
|
f10_local7:registerAnimationState( "active", {
|
|
alpha = 1
|
|
} )
|
|
local f10_local8 = LUI.UIImage.new()
|
|
f10_local8.id = "start_cap"
|
|
f10_local8:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = 0,
|
|
height = f0_local3,
|
|
width = f0_local7,
|
|
red = Colors.white.r,
|
|
green = Colors.white.g,
|
|
blue = Colors.white.b,
|
|
material = f10_local3
|
|
} )
|
|
f10_local8:animateToState( "default", 0 )
|
|
f10_local8:registerAnimationState( "secured", {
|
|
red = Colors.cyan.r,
|
|
green = Colors.cyan.g,
|
|
blue = Colors.cyan.b
|
|
} )
|
|
f10_local8:registerAnimationState( "contested", {
|
|
red = Colors.yellow.r,
|
|
green = Colors.yellow.g,
|
|
blue = Colors.yellow.b
|
|
} )
|
|
local f10_local9 = LUI.UIImage.new()
|
|
f10_local9.id = "middle"
|
|
f10_local9.m_maxWidth = f0_local4 - f0_local7 - f0_local7
|
|
f10_local9:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = 0,
|
|
height = f0_local3,
|
|
width = 0,
|
|
red = Colors.white.r,
|
|
green = Colors.white.g,
|
|
blue = Colors.white.b,
|
|
material = f10_local2
|
|
} )
|
|
f10_local9:animateToState( "default", 0 )
|
|
f10_local9:registerAnimationState( "secured", {
|
|
red = Colors.cyan.r,
|
|
green = Colors.cyan.g,
|
|
blue = Colors.cyan.b
|
|
} )
|
|
f10_local9:registerAnimationState( "contested", {
|
|
red = Colors.yellow.r,
|
|
green = Colors.yellow.g,
|
|
blue = Colors.yellow.b
|
|
} )
|
|
local f10_local10 = LUI.UIImage.new()
|
|
f10_local10.id = "end_cap"
|
|
f10_local10:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
rightAnchor = true,
|
|
top = 0,
|
|
right = 0,
|
|
height = f0_local3,
|
|
width = f0_local7,
|
|
red = Colors.white.r,
|
|
green = Colors.white.g,
|
|
blue = Colors.white.b,
|
|
material = f10_local1
|
|
} )
|
|
f10_local10:animateToState( "default", 0 )
|
|
f10_local10:registerAnimationState( "secured", {
|
|
red = Colors.cyan.r,
|
|
green = Colors.cyan.g,
|
|
blue = Colors.cyan.b
|
|
} )
|
|
f10_local10:registerAnimationState( "contested", {
|
|
red = Colors.yellow.r,
|
|
green = Colors.yellow.g,
|
|
blue = Colors.yellow.b
|
|
} )
|
|
f10_local7:addElement( f10_local8 )
|
|
f10_local7:addElement( f10_local9 )
|
|
f10_local7:addElement( f10_local10 )
|
|
local f10_local11 = LUI.UIText.new()
|
|
f10_local11.id = "capturing_text"
|
|
f10_local11:setText( "" )
|
|
f10_local11:setTextStyle( CoD.TextStyle.Shadowed )
|
|
f10_local11:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = -400,
|
|
height = CoD.TextSettings.HudEuroMedTinyFont.Height,
|
|
width = f0_local5,
|
|
font = CoD.TextSettings.HudEuroMedTinyFont.Font,
|
|
alignment = LUI.Alignment.Right,
|
|
red = Colors.white.r,
|
|
green = Colors.white.g,
|
|
blue = Colors.white.b,
|
|
alpha = 0
|
|
} )
|
|
f10_local11:animateToState( "default", 0 )
|
|
local f10_local12 = -50
|
|
f10_local11:registerAnimationState( "opening", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = f10_local12,
|
|
height = CoD.TextSettings.HudEuroMedTinyFont.Height,
|
|
width = f0_local5,
|
|
red = Colors.white.r,
|
|
green = Colors.white.g,
|
|
blue = Colors.white.b,
|
|
alpha = 1
|
|
} )
|
|
f10_local11:registerAnimationState( "active", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = f10_local12,
|
|
height = CoD.TextSettings.HudEuroMedTinyFont.Height,
|
|
width = f0_local5,
|
|
red = Colors.white.r,
|
|
green = Colors.white.g,
|
|
blue = Colors.white.b,
|
|
alpha = 1
|
|
} )
|
|
f10_local11:registerAnimationState( "secured", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = f10_local12,
|
|
height = CoD.TextSettings.HudEuroMedTinyFont.Height,
|
|
width = f0_local5,
|
|
red = Colors.cyan.r,
|
|
green = Colors.cyan.g,
|
|
blue = Colors.cyan.b,
|
|
alpha = 1
|
|
} )
|
|
f10_local11:registerAnimationState( "contested", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = f10_local12,
|
|
height = CoD.TextSettings.HudEuroMedTinyFont.Height,
|
|
width = f0_local5,
|
|
red = Colors.yellow.r,
|
|
green = Colors.yellow.g,
|
|
blue = Colors.yellow.b,
|
|
alpha = 1
|
|
} )
|
|
f10_local11:registerAnimationState( "contested_off_for_loop", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = f10_local12,
|
|
height = CoD.TextSettings.HudEuroMedTinyFont.Height,
|
|
width = f0_local5,
|
|
red = Colors.yellow.r,
|
|
green = Colors.yellow.g,
|
|
blue = Colors.yellow.b,
|
|
alpha = 0
|
|
} )
|
|
f10_local6:addElement( f10_local7 )
|
|
f10_local6:addElement( f10_local11 )
|
|
self:addElement( f10_local5 )
|
|
self:addElement( f10_local6 )
|
|
return self
|
|
end
|
|
|
|
local f0_local19 = function ()
|
|
local self = LUI.UIElement.new()
|
|
self.id = "capture_hud"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 250,
|
|
left = -(f0_local2 / 2),
|
|
height = f0_local1,
|
|
width = f0_local2
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
self:registerOmnvarHandler( "ui_securing", f0_local11 )
|
|
self:addElement( f0_local18( f0_local10 ) )
|
|
return self
|
|
end
|
|
|
|
local f0_local20 = function ()
|
|
local self = LUI.UIElement.new()
|
|
self.id = "capture_dom_hud"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = GameX.IsSplitscreen() and 100 or 200,
|
|
left = -(f0_local2 / 2),
|
|
height = f0_local1,
|
|
width = f0_local2
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
self:registerEventHandler( "playerstate_client_changed", function ( element, event )
|
|
f0_local14( element, {
|
|
name = event.name,
|
|
value = Game.GetOmnvar( "ui_dom_securing" )
|
|
} )
|
|
end )
|
|
self:registerOmnvarHandler( "ui_dom_securing", f0_local14 )
|
|
self:addElement( f0_local18( f0_local13 ) )
|
|
return self
|
|
end
|
|
|
|
local f0_local21 = function ()
|
|
local self = LUI.UIElement.new()
|
|
self.id = "bomb_plant_defuse_hud"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 200,
|
|
left = -(f0_local2 / 2),
|
|
height = f0_local1,
|
|
width = f0_local2
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
self:registerEventHandler( "playerstate_client_changed", function ( element, event )
|
|
f0_local17( element, {
|
|
name = event.name,
|
|
value = Game.GetOmnvar( "ui_bomb_planting_defusing" )
|
|
} )
|
|
end )
|
|
self:registerOmnvarHandler( "ui_bomb_planting_defusing", f0_local17 )
|
|
self:addElement( f0_local18( f0_local16 ) )
|
|
return self
|
|
end
|
|
|
|
LUI.MenuBuilder.registerType( "captureHudDef", f0_local19 )
|
|
LUI.MenuBuilder.registerType( "captureDomHudDef", f0_local20 )
|
|
LUI.MenuBuilder.registerType( "bombPlantDefuseHudDef", f0_local21 )
|
|
LockTable( _M )
|