iw6-lui/lui/mp_hud/odinoverlayhud.dec.lua
2024-09-12 17:25:45 +02:00

808 lines
23 KiB
Lua

local f0_local0 = module
local f0_local1, f0_local2 = ...
f0_local0( f0_local1, package.seeall )
CoD.PrintModuleLoad( _NAME )
f0_local0 = 512
f0_local1 = 512
f0_local2 = 1
local f0_local3 = 2
local f0_local4 = -1
local f0_local5 = -2
local f0_local6 = -2
local f0_local7 = -3
local f0_local8 = function ( f1_arg0, f1_arg1 )
local f1_local0 = "@KILLSTREAKS_ODIN_SUPPORT"
local f1_local1 = "@KILLSTREAKS_ODIN_ASSAULT"
local f1_local2 = "@PLATFORM_ODIN_SMOKE"
local f1_local3 = "@PLATFORM_ODIN_AIRDROP"
local f1_local4 = "@PLATFORM_ODIN_MARKING"
local f1_local5 = "@PLATFORM_ODIN_JUGGERNAUT"
local f1_local6 = "@PLATFORM_ODIN_LARGE_ROD"
local f1_local7 = "@PLATFORM_ODIN_SMALL_ROD"
local f1_local8 = "@LUA_MENU_RECHARGING"
if f1_arg1.value == f0_local2 or f1_arg1.value == f0_local3 then
f1_arg0:animateToState( "active", 0 )
if f1_arg1.value == f0_local2 then
local f1_local9 = f1_arg0:getChildById( "odin_text_bits" )
f1_local9 = f1_local9:getChildById( "name_text" )
f1_local9:setText( Engine.Localize( f1_local0 ) )
elseif f1_arg1.value == f0_local3 then
local f1_local9 = f1_arg0:getChildById( "odin_text_bits" )
f1_local9 = f1_local9:getChildById( "name_text" )
f1_local9:setText( Engine.Localize( f1_local1 ) )
end
local f1_local9 = f1_arg0:getChildById( "odinControlsLeftId" )
local f1_local10 = f1_local9:getChildById( "odinControlsLeftVLId" )
local f1_local11 = f1_arg0:getChildById( "odinControlsRightId" )
local f1_local12 = f1_local11:getChildById( "odinControlsRightVLId" )
local f1_local13 = f1_local10:getChildById( "smokeTextId" )
local f1_local14 = f1_local10:getChildById( "airdropTextId" )
local f1_local15 = f1_local12:getChildById( "markingTextId" )
local f1_local16 = f1_local12:getChildById( "juggernautTextId" )
local f1_local17 = Game.GetOmnvar( "ui_odin_smoke_ammo" )
local f1_local18 = Game.GetOmnvar( "ui_odin_airdrop_ammo" )
local f1_local19 = Game.GetOmnvar( "ui_odin_marking_ammo" )
local f1_local20 = Game.GetOmnvar( "ui_odin_juggernaut_ammo" )
if f1_arg1.value == f0_local2 then
f1_local13:setText( Engine.Localize( f1_local2 ) )
f1_local13.current_state = "smoke"
f1_local14:setText( Engine.Localize( f1_local3 ) )
f1_local14.current_state = "airdrop"
f1_local15:setText( Engine.Localize( f1_local4 ) )
f1_local15.current_state = "marking"
f1_local16:setText( Engine.Localize( f1_local5 ) )
f1_local16.current_state = "juggernaut"
if f1_arg1.name == "init_overlay" then
if f1_local17 == f0_local4 then
f1_local13:setText( Engine.Localize( f1_local8 ) )
f1_local13:processEvent( {
name = "flashing"
} )
f1_local13.current_state = "recharging"
end
if f1_local18 == f0_local4 then
f1_local14:setText( Engine.Localize( f1_local8 ) )
f1_local14:processEvent( {
name = "flashing"
} )
f1_local14.current_state = "recharging"
end
if f1_local19 == f0_local4 then
f1_local15:setText( Engine.Localize( f1_local8 ) )
f1_local15:processEvent( {
name = "flashing"
} )
f1_local15.current_state = "recharging"
end
if f1_local20 == f0_local4 then
f1_local16:setText( Engine.Localize( f1_local8 ) )
f1_local16:processEvent( {
name = "flashing"
} )
f1_local16.current_state = "recharging"
end
end
elseif f1_arg1.value == f0_local3 then
f1_local13:setText( Engine.Localize( f1_local7 ) )
f1_local13.current_state = "small_rod"
f1_local14:setText( Engine.Localize( f1_local3 ) )
f1_local14.current_state = "airdrop"
f1_local15:setText( Engine.Localize( f1_local6 ) )
f1_local15.current_state = "large_rod"
f1_local16:setText( Engine.Localize( f1_local5 ) )
f1_local16.current_state = "juggernaut"
if f1_arg1.name == "init_overlay" then
if f1_local17 == f0_local5 then
f1_local13:setText( Engine.Localize( f1_local8 ) )
f1_local13:processEvent( {
name = "flashing"
} )
f1_local13.current_state = "recharging"
end
if f1_local18 == f0_local4 then
f1_local14:setText( Engine.Localize( f1_local8 ) )
f1_local14:processEvent( {
name = "flashing"
} )
f1_local14.current_state = "recharging"
end
if f1_local19 == f0_local5 then
f1_local15:setText( Engine.Localize( f1_local8 ) )
f1_local15:processEvent( {
name = "flashing"
} )
f1_local15.current_state = "recharging"
end
if f1_local20 == f0_local4 then
f1_local16:setText( Engine.Localize( f1_local8 ) )
f1_local16:processEvent( {
name = "flashing"
} )
f1_local16.current_state = "recharging"
end
end
end
local f1_local21 = MBh.AnimateSequence( {
{
"default",
0
},
{
"active",
150
}
} )
f1_local21( f1_local9 )
f1_local21 = MBh.AnimateSequence( {
{
"default",
0
},
{
"active",
150
}
} )
f1_local21( f1_local11 )
f1_local21 = f1_arg0:getChildById( "odinOverlayGrainId" )
local f1_local22 = MBh.AnimateSequence( {
{
"default",
0
},
{
"active",
1000
}
} )
f1_local22( f1_local21 )
else
f1_arg0:animateToState( "default", 0 )
end
end
local f0_local9 = function ( f2_arg0, f2_arg1 )
local f2_local0 = "@PLATFORM_ODIN_SMOKE"
local f2_local1 = "@PLATFORM_ODIN_SMALL_ROD"
local f2_local2 = "@LUA_MENU_RECHARGING"
local f2_local3 = f2_arg0:getChildById( "odinControlsLeftId" )
local f2_local4 = f2_local3:getChildById( "odinControlsLeftVLId" )
local f2_local5 = f2_local4:getChildById( "smokeTextId" )
if f2_arg1.value == f0_local2 then
f2_local5:setText( Engine.Localize( f2_local0 ) )
f2_local5:processEvent( {
name = "stop_flashing"
} )
f2_local5.current_state = "smoke"
elseif f2_arg1.value == f0_local3 then
f2_local5:setText( Engine.Localize( f2_local1 ) )
f2_local5:processEvent( {
name = "stop_flashing"
} )
f2_local5.current_state = "small_rod"
else
f2_local5:setText( Engine.Localize( f2_local2 ) )
f2_local5:processEvent( {
name = "flashing"
} )
if f2_arg1.value == f0_local5 then
local f2_local6 = f2_arg0:getChildById( "odinOverlayGrainId" )
local f2_local7 = MBh.AnimateSequence( {
{
"fired",
0
},
{
"active",
250
}
} )
f2_local7( f2_local6 )
end
f2_local5.current_state = "recharging"
end
end
local f0_local10 = function ( f3_arg0, f3_arg1 )
local f3_local0 = "@PLATFORM_ODIN_AIRDROP"
local f3_local1 = "@LUA_MENU_RECHARGING"
local f3_local2 = f3_arg0:getChildById( "odinControlsLeftId" )
local f3_local3 = f3_local2:getChildById( "odinControlsLeftVLId" )
local f3_local4 = f3_local3:getChildById( "airdropTextId" )
if f3_arg1.value == f0_local2 or f3_arg1.value == f0_local3 then
f3_local4:setText( Engine.Localize( f3_local0 ) )
f3_local4:processEvent( {
name = "stop_flashing"
} )
f3_local4.current_state = "airdrop"
else
f3_local4:setText( Engine.Localize( f3_local1 ) )
f3_local4:processEvent( {
name = "flashing"
} )
f3_local4.current_state = "recharging"
end
end
local f0_local11 = function ( f4_arg0, f4_arg1 )
local f4_local0 = "@PLATFORM_ODIN_MARKING"
local f4_local1 = "@PLATFORM_ODIN_LARGE_ROD"
local f4_local2 = "@LUA_MENU_RECHARGING"
local f4_local3 = f4_arg0:getChildById( "odinControlsRightId" )
local f4_local4 = f4_local3:getChildById( "odinControlsRightVLId" )
local f4_local5 = f4_local4:getChildById( "markingTextId" )
if f4_arg1.value == f0_local2 then
f4_local5:setText( Engine.Localize( f4_local0 ) )
f4_local5:processEvent( {
name = "stop_flashing"
} )
f4_local5.current_state = "marking"
elseif f4_arg1.value == f0_local3 then
f4_local5:setText( Engine.Localize( f4_local1 ) )
f4_local5:processEvent( {
name = "stop_flashing"
} )
f4_local5.current_state = "large_rod"
else
f4_local5:setText( Engine.Localize( f4_local2 ) )
f4_local5:processEvent( {
name = "flashing"
} )
if f4_arg1.value == f0_local5 then
local f4_local6 = f4_arg0:getChildById( "odinOverlayGrainId" )
local f4_local7 = MBh.AnimateSequence( {
{
"fired",
0
},
{
"active",
250
}
} )
f4_local7( f4_local6 )
end
f4_local5.current_state = "recharging"
end
end
local f0_local12 = function ( f5_arg0, f5_arg1 )
local f5_local0 = "@PLATFORM_ODIN_JUGGERNAUT"
local f5_local1 = "@PLATFORM_ODIN_JUGGERNAUT_MOVE"
local f5_local2 = "@LUA_MENU_ODIN_JUGGERNAUT_DEAD"
local f5_local3 = "@LUA_MENU_RECHARGING"
local f5_local4 = f5_arg0:getChildById( "odinControlsRightId" )
local f5_local5 = f5_local4:getChildById( "odinControlsRightVLId" )
local f5_local6 = f5_local5:getChildById( "juggernautTextId" )
if f5_arg1.value == f0_local6 then
f5_local6:setText( Engine.Localize( f5_local1 ) )
f5_local6:processEvent( {
name = "stop_flashing"
} )
f5_local6.current_state = "move"
elseif f5_arg1.value == f0_local7 then
f5_local6:setText( Engine.Localize( f5_local2 ) )
f5_local6:processEvent( {
name = "stop_flashing"
} )
f5_local6.current_state = "dead"
elseif f5_arg1.value == f0_local2 or f5_arg1.value == f0_local3 then
f5_local6:setText( Engine.Localize( f5_local0 ) )
f5_local6:processEvent( {
name = "stop_flashing"
} )
f5_local6.current_state = "juggernaut"
else
f5_local6:setText( Engine.Localize( f5_local3 ) )
f5_local6:processEvent( {
name = "flashing"
} )
f5_local6.current_state = "recharging"
end
end
local f0_local13 = function ( f6_arg0, f6_arg1 )
local f6_local0 = 364.77
local f6_local1 = 397.52
if not f6_arg0.current_alt_dir then
f6_arg0.current_alt_dir = 0.01
end
if not f6_arg0.current_alt then
f6_arg0.current_alt = math.random( f6_local0, f6_local1 )
end
if f6_arg0.current_alt < f6_local1 then
f6_arg0.current_alt_dir = math.random( 1, 100 ) * 0.01
else
f6_arg0.current_alt_dir = -math.random( 1, 100 ) * 0.01
end
f6_arg0.current_alt = f6_arg0.current_alt + f6_arg0.current_alt_dir
local f6_local2 = f6_arg0:getChildById( "altitude_text" )
f6_local2:setText( string.format( "%.2f", f6_arg0.current_alt ) )
end
local f0_local14 = function ( f7_arg0, f7_arg1 )
local f7_local0 = f7_arg0:getChildById( "position_text" )
f7_local0:setText( "61911." .. Game.GetTime() )
end
local f0_local15 = function ()
local f8_local0 = "@PLATFORM_ODIN_AIRDROP"
local f8_local1 = "@PLATFORM_ODIN_SMOKE"
local self = LUI.UIElement.new()
self.id = "odinControlsLeftId"
self:registerAnimationState( "default", {
topAnchor = false,
leftAnchor = false,
bottomAnchor = false,
rightAnchor = false,
left = -750,
top = -32,
bottom = 32,
width = 512,
alpha = 0
} )
self:animateToState( "default", 0 )
self:registerAnimationState( "active", {
alpha = 1
} )
local f8_local3 = LUI.UIVerticalList.new()
f8_local3.id = "odinControlsLeftVLId"
f8_local3:registerAnimationState( "default", {
topAnchor = true,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true,
spacing = 20
} )
f8_local3:animateToState( "default", 0 )
local f8_local4 = LUI.UIText.new()
f8_local4.id = "airdropTextId"
f8_local4:setText( f8_local0 )
f8_local4:setTextStyle( CoD.TextStyle.Shadowed )
f8_local4:registerAnimationState( "default", {
topAnchor = false,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true,
bottom = 0,
left = 0,
right = 0,
height = CoD.TextSettings.HudEuroMedSmallFont.Height,
font = CoD.TextSettings.HudEuroMedSmallFont.Font,
red = 1,
green = 1,
blue = 1,
alignment = LUI.Alignment.Right,
alpha = 1
} )
f8_local4:animateToState( "default", 0 )
f8_local4:registerAnimationState( "flash1", {
red = 1,
green = 0,
blue = 0,
alpha = 0.5
} )
f8_local4:registerAnimationState( "flash2", {
red = 1,
green = 1,
blue = 1,
alpha = 0.25
} )
f8_local4:registerEventHandler( "flashing", MBh.AnimateLoop( {
{
"flash1",
250
},
{
"flash2",
250
}
} ) )
f8_local4:registerEventHandler( "stop_flashing", MBh.AnimateToState( "default", 0 ) )
local f8_local5 = LUI.UIText.new()
f8_local5.id = "smokeTextId"
f8_local5:setText( f8_local1 )
f8_local5:setTextStyle( CoD.TextStyle.Shadowed )
f8_local5:registerAnimationState( "default", {
topAnchor = false,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true,
bottom = 0,
left = 0,
right = 0,
height = CoD.TextSettings.HudEuroMedSmallFont.Height,
font = CoD.TextSettings.HudEuroMedSmallFont.Font,
red = 1,
green = 1,
blue = 1,
alignment = LUI.Alignment.Right,
alpha = 1
} )
f8_local5:animateToState( "default", 0 )
f8_local5:registerAnimationState( "flash1", {
red = 1,
green = 0,
blue = 0,
alpha = 0.5
} )
f8_local5:registerAnimationState( "flash2", {
red = 1,
green = 1,
blue = 1,
alpha = 0.25
} )
f8_local5:registerEventHandler( "flashing", MBh.AnimateLoop( {
{
"flash1",
250
},
{
"flash2",
250
}
} ) )
f8_local5:registerEventHandler( "stop_flashing", MBh.AnimateToState( "default", 0 ) )
if Engine.IsPS3() then
f8_local3:addElement( f8_local5 )
f8_local3:addElement( f8_local4 )
else
f8_local3:addElement( f8_local4 )
f8_local3:addElement( f8_local5 )
end
self:addElement( f8_local3 )
return self
end
local f0_local16 = function ()
local f9_local0 = "@PLATFORM_ODIN_JUGGERNAUT"
local f9_local1 = "@PLATFORM_ODIN_MARKING"
local self = LUI.UIElement.new()
self.id = "odinControlsRightId"
self:registerAnimationState( "default", {
topAnchor = false,
leftAnchor = false,
bottomAnchor = false,
rightAnchor = false,
right = 750,
top = -32,
bottom = 32,
width = 512,
alpha = 0
} )
self:animateToState( "default", 0 )
self:registerAnimationState( "active", {
alpha = 1
} )
local f9_local3 = LUI.UIVerticalList.new()
f9_local3.id = "odinControlsRightVLId"
f9_local3:registerAnimationState( "default", {
topAnchor = true,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true,
spacing = 20
} )
f9_local3:animateToState( "default", 0 )
local f9_local4 = LUI.UIText.new()
f9_local4.id = "juggernautTextId"
f9_local4:setText( f9_local0 )
f9_local4:setTextStyle( CoD.TextStyle.Shadowed )
f9_local4:registerAnimationState( "default", {
topAnchor = false,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true,
bottom = 0,
left = 0,
right = 0,
height = CoD.TextSettings.HudEuroMedSmallFont.Height,
font = CoD.TextSettings.HudEuroMedSmallFont.Font,
red = 1,
green = 1,
blue = 1,
alignment = LUI.Alignment.Left,
alpha = 1
} )
f9_local4:animateToState( "default", 0 )
f9_local4:registerAnimationState( "flash1", {
red = 1,
green = 0,
blue = 0,
alpha = 0.5
} )
f9_local4:registerAnimationState( "flash2", {
red = 1,
green = 1,
blue = 1,
alpha = 0.25
} )
f9_local4:registerEventHandler( "flashing", MBh.AnimateLoop( {
{
"flash1",
250
},
{
"flash2",
250
}
} ) )
f9_local4:registerEventHandler( "stop_flashing", MBh.AnimateToState( "default", 0 ) )
local f9_local5 = LUI.UIText.new()
f9_local5.id = "markingTextId"
f9_local5:setText( f9_local1 )
f9_local5:setTextStyle( CoD.TextStyle.Shadowed )
f9_local5:registerAnimationState( "default", {
topAnchor = false,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true,
bottom = 0,
left = 0,
right = 0,
height = CoD.TextSettings.HudEuroMedSmallFont.Height,
font = CoD.TextSettings.HudEuroMedSmallFont.Font,
red = 1,
green = 1,
blue = 1,
alignment = LUI.Alignment.Left,
alpha = 1
} )
f9_local5:animateToState( "default", 0 )
f9_local5:registerAnimationState( "flash1", {
red = 1,
green = 0,
blue = 0,
alpha = 0.5
} )
f9_local5:registerAnimationState( "flash2", {
red = 1,
green = 1,
blue = 1,
alpha = 0.25
} )
f9_local5:registerEventHandler( "flashing", MBh.AnimateLoop( {
{
"flash1",
250
},
{
"flash2",
250
}
} ) )
f9_local5:registerEventHandler( "stop_flashing", MBh.AnimateToState( "default", 0 ) )
if Engine.IsPS3() then
f9_local3:addElement( f9_local5 )
f9_local3:addElement( f9_local4 )
else
f9_local3:addElement( f9_local4 )
f9_local3:addElement( f9_local5 )
end
self:addElement( f9_local3 )
return self
end
local f0_local17 = function ()
local self = LUI.UIElement.new()
self.id = "odin_text_bits"
self:registerAnimationState( "default", {
topAnchor = true,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true
} )
self:animateToState( "default", 0 )
self:registerEventHandler( "altitude_refresh", f0_local13 )
self:registerEventHandler( "position_refresh", f0_local14 )
local f10_local1 = LUI.UITimer.new( 1000, "altitude_refresh" )
f10_local1.id = "altitude_timer"
local f10_local2 = LUI.UITimer.new( 500, "position_refresh" )
f10_local2.id = "position_timer"
local f10_local3 = LUI.UIText.new()
f10_local3.id = "name_text"
f10_local3:setText( "" )
f10_local3:setTextStyle( CoD.TextStyle.Shadowed )
f10_local3:registerAnimationState( "default", {
topAnchor = true,
leftAnchor = false,
bottomAnchor = false,
rightAnchor = true,
top = 80,
right = -225,
height = CoD.TextSettings.HudEuroMedSmallFont.Height,
width = 256,
font = CoD.TextSettings.HudEuroMedSmallFont.Font,
red = 1,
green = 1,
blue = 1,
alignment = LUI.Alignment.Right,
alpha = 1
} )
f10_local3:animateToState( "default", 0 )
local f10_local4 = LUI.UIText.new()
f10_local4.id = "location_text"
f10_local4:setText( Engine.Localize( "@MENU_LOCATION" ) .. Engine.Localize( "@" .. Engine.TableLookup( "mp/mapNames.csv", 0, Engine.GetDvarString( "ui_mapname" ), 1 ) ) )
f10_local4:setTextStyle( CoD.TextStyle.Shadowed )
f10_local4:registerAnimationState( "default", {
topAnchor = false,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = false,
bottom = -82,
left = 225,
height = CoD.TextSettings.HudEuroMedSmallFont.Height,
width = 256,
font = CoD.TextSettings.HudEuroMedSmallFont.Font,
red = 1,
green = 1,
blue = 1,
alignment = LUI.Alignment.Left,
alpha = 1
} )
f10_local4:animateToState( "default", 0 )
local f10_local5 = LUI.UIText.new()
f10_local5.id = "altitude_text"
f10_local5:setText( "" )
f10_local5:setTextStyle( CoD.TextStyle.Shadowed )
f10_local5:registerAnimationState( "default", {
topAnchor = false,
leftAnchor = false,
bottomAnchor = true,
rightAnchor = true,
bottom = -97,
right = -225,
height = CoD.TextSettings.HudDigitalSmallFont.Height,
width = 256,
font = CoD.TextSettings.HudDigitalSmallFont.Font,
red = 1,
green = 1,
blue = 1,
alignment = LUI.Alignment.Right,
alpha = 1
} )
f10_local5:animateToState( "default", 0 )
local f10_local6 = LUI.UIText.new()
f10_local6.id = "position_text"
f10_local6:setText( "8041.5679" )
f10_local6:setTextStyle( CoD.TextStyle.Shadowed )
f10_local6:registerAnimationState( "default", {
topAnchor = false,
leftAnchor = false,
bottomAnchor = true,
rightAnchor = true,
bottom = -82,
right = -225,
height = CoD.TextSettings.HudDigitalSmallFont.Height,
width = 256,
font = CoD.TextSettings.HudDigitalSmallFont.Font,
red = 1,
green = 1,
blue = 1,
alignment = LUI.Alignment.Right,
alpha = 1
} )
f10_local6:animateToState( "default", 0 )
self:addElement( f10_local1 )
self:addElement( f10_local2 )
self:addElement( f10_local3 )
self:addElement( f10_local5 )
self:addElement( f10_local4 )
self:addElement( f10_local6 )
return self
end
local f0_local18 = function ()
local f11_local0 = RegisterMaterial( "odin_overlay_grain" )
local self = LUI.UIElement.new()
self.id = "odinOverlayGrainId"
self:registerAnimationState( "default", {
topAnchor = true,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true,
top = 0,
left = 0,
bottom = 0,
right = 0,
alpha = 1
} )
self:animateToState( "default", 0 )
self:registerAnimationState( "active", {
alpha = 0.1
} )
self:registerAnimationState( "fired", {
alpha = 0.5
} )
local f11_local2 = LUI.UIImage.new()
f11_local2.id = "odinOverlayGrainImageId"
f11_local2:registerAnimationState( "default", {
topAnchor = true,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true,
material = f11_local0,
red = 0.9,
green = 1,
blue = 1
} )
f11_local2:animateToState( "default", 0 )
self:addElement( f11_local2 )
return self
end
local f0_local19 = function ( f12_arg0, f12_arg1 )
local f12_local0 = "@PLATFORM_ODIN_SMOKE"
local f12_local1 = "@PLATFORM_ODIN_AIRDROP"
local f12_local2 = "@PLATFORM_ODIN_MARKING"
local f12_local3 = "@PLATFORM_ODIN_JUGGERNAUT"
local f12_local4 = "@PLATFORM_ODIN_JUGGERNAUT_MOVE"
local f12_local5 = "@PLATFORM_ODIN_LARGE_ROD"
local f12_local6 = "@PLATFORM_ODIN_SMALL_ROD"
local f12_local7 = f12_arg0:getChildById( "odinControlsLeftId" )
local f12_local8 = f12_local7:getChildById( "odinControlsLeftVLId" )
local f12_local9 = f12_local8:getChildById( "airdropTextId" )
local f12_local10 = f12_local8:getChildById( "smokeTextId" )
if f12_local9.current_state and f12_local9.current_state == "airdrop" then
f12_local9:setText( Engine.Localize( f12_local1 ) )
end
if f12_local10.current_state then
if f12_local10.current_state == "smoke" then
f12_local10:setText( Engine.Localize( f12_local0 ) )
elseif f12_local10.current_state == "small_rod" then
f12_local10:setText( Engine.Localize( f12_local6 ) )
end
end
local f12_local11 = f12_arg0:getChildById( "odinControlsRightId" )
local f12_local12 = f12_local11:getChildById( "odinControlsRightVLId" )
local f12_local13 = f12_local12:getChildById( "juggernautTextId" )
local f12_local14 = f12_local12:getChildById( "markingTextId" )
if f12_local13.current_state then
if f12_local13.current_state == "juggernaut" then
f12_local13:setText( Engine.Localize( f12_local3 ) )
elseif f12_local13.current_state == "move" then
f12_local13:setText( Engine.Localize( f12_local4 ) )
end
end
if f12_local14.current_state then
if f12_local14.current_state == "marking" then
f12_local14:setText( Engine.Localize( f12_local2 ) )
elseif f12_local14.current_state == "large_rod" then
f12_local14:setText( Engine.Localize( f12_local5 ) )
end
end
end
LUI.MenuBuilder.registerType( "odinOverlayDef", function ()
local self = LUI.UIElement.new()
self.id = "odinOverlayContainerId"
self:registerAnimationState( "default", {
topAnchor = true,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true,
top = 0,
left = 0,
bottom = 0,
right = 0,
alpha = 0
} )
self:animateToState( "default", 0 )
self:registerAnimationState( "active", {
alpha = 1
} )
self:registerEventHandler( "init_overlay", f0_local8 )
self:registerEventHandler( "refresh_controls", f0_local19 )
self:registerOmnvarHandler( "ui_odin", f0_local8 )
self:registerOmnvarHandler( "ui_odin_smoke_ammo", f0_local9 )
self:registerOmnvarHandler( "ui_odin_airdrop_ammo", f0_local10 )
self:registerOmnvarHandler( "ui_odin_marking_ammo", f0_local11 )
self:registerOmnvarHandler( "ui_odin_juggernaut_ammo", f0_local12 )
self:addElement( f0_local15() )
self:addElement( f0_local16() )
self:addElement( f0_local17() )
self:addElement( f0_local18() )
return self
end )
LockTable( _M )