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

3700 lines
99 KiB
Lua

local f0_local0 = module
local f0_local1, f0_local2 = ...
f0_local0( f0_local1, package.seeall )
CoD.PrintModuleLoad( _NAME )
debugPlaystation = false
function GetSticksConfig()
return Engine.GetProfileData( "gpadSticksConfig" )
end
function SetSticksConfig( f2_arg0, f2_arg1 )
Engine.ExecNow( "profile_setSticksConfig " .. f2_arg0.properties.layout_name, f2_arg1.controller )
end
function GetButtonsConfig()
return Engine.GetProfileData( "gpadButtonsConfig" )
end
function SetButtonsConfig( f4_arg0, f4_arg1 )
Engine.ExecNow( "profile_setButtonsConfig " .. f4_arg0.properties.layout_name, f4_arg1.controller )
end
function layoutMenuClose( f5_arg0, f5_arg1 )
if not Engine.InFrontend() and Engine.IsMultiplayer() and not f5_arg1.value then
LUI.FlowManager.RequestCloseAllMenus( f5_arg0 )
end
end
function layout_buttons_vlist( f6_arg0, f6_arg1, f6_arg2 )
local f6_local0 = {
type = "UIStencil",
states = {
default = {
leftAnchor = true,
rightAnchor = false,
topAnchor = true,
bottomAnchor = false,
left = GenericMenuDims.menu_left,
right = GenericMenuDims.menu_right_narrow,
top = GenericMenuDims.menu_top,
bottom = GenericMenuDims.menu_bottom
}
},
children = {}
}
local f6_local1 = {
type = "UIVerticalList",
id = "layouts_vlist_id",
states = {
default = {
leftAnchor = true,
rightAnchor = true,
topAnchor = true,
bottomAnchor = true
}
},
children = {}
}
for f6_local5, f6_local6 in ipairs( f6_arg2 ) do
local f6_local7 = f6_local1.children
local f6_local8 = #f6_local1.children + 1
local f6_local9 = {
type = "UIGenericButton",
id = f6_local6.name .. "_layout_button_id",
listDefaultFocus = f6_local6.name == f6_arg0()
}
local f6_local10 = {
layout_name = f6_local6.name,
button_text = Engine.Localize( f6_local6.display_name )
}
local f6_local11 = MBh.DoMultiple
local f6_local12 = {}
local f6_local13 = f6_arg1
local f6_local14 = MBh.LeaveMenu()
f6_local10.button_action_func = f6_local11( f6_local13 )
f6_local11 = MBh.DoMultiple
f6_local12 = {}
f6_local13 = MBh.EmitEventToRoot( "hide_texts" )
f6_local14 = MBh.EmitEventToRoot( "show_" .. f6_local6.name )
f6_local10.button_over_func = f6_local11( f6_local13 )
f6_local9.properties = f6_local10
f6_local7[f6_local8] = f6_local9
end
f6_local0.children[#f6_local0.children + 1] = f6_local1
return f6_local0
end
stickBoxW = 190
stickBoxH = 140
function stick_box_line( f7_arg0, f7_arg1 )
return {
type = "UIElement",
id = "stick_text_box_line" .. f7_arg1,
states = {
default = {
leftAnchor = true,
rightAnchor = true,
topAnchor = true,
bottomAnchor = false,
left = 0,
right = 0,
top = 0,
bottom = 32
}
},
children = {
{
type = "UIImage",
id = "arrow",
states = {
default = {
topAnchor = true,
bottomAnchor = false,
leftAnchor = true,
rightAnchor = false,
top = 0,
bottom = 32,
left = 0,
right = 32,
material = RegisterMaterial( f7_arg0 )
}
}
},
{
type = "UIText",
id = "text",
properties = {
text = Engine.Localize( f7_arg1 )
},
states = {
default = {
font = CoD.TextSettings.NormalFont.Font,
alignment = LUI.Alignment.Left,
leftAnchor = true,
rightAnchor = true,
topAnchor = true,
bottomAnchor = false,
left = 37,
right = 0,
top = 4,
bottom = 4 + CoD.TextSettings.NormalFont.Height
}
}
}
}
}
end
function stick_box_content( f8_arg0, f8_arg1 )
local f8_local0 = {
type = "UIVerticalList",
id = "vlist_" .. f8_arg0,
states = {
default = {
leftAnchor = true,
rightAnchor = true,
topAnchor = true,
bottomAnchor = true,
left = 5,
right = 5,
top = 5,
bottom = 5,
alpha = 0,
spacing = 0
},
visible = {
alpha = 1
}
},
handlers = {
hide_texts = MBh.AnimateToState( "default", 0 )
},
children = {},
handlers = MBh.AnimateToState( "visible", 0 )
}
local f8_local1 = {
"cont_arrow_up",
"cont_arrow_down",
"cont_arrow_rt",
"cont_arrow_lt"
}
for f8_local5, f8_local6 in ipairs( f8_arg1 ) do
f8_local0.children[#f8_local0.children + 1] = stick_box_line( f8_local1[f8_local5], f8_local6 )
end
return f8_local0
end
function stick_box( f9_arg0, f9_arg1 )
local f9_local0 = {
type = "UIElement",
id = f9_arg0,
states = {
default = {
leftAnchor = true,
rightAnchor = true,
topAnchor = true,
bottomAnchor = true,
left = 0,
right = 0,
top = 0,
bottom = 0
}
},
children = {
{
type = "UIImage",
id = "sticks_texts_bg",
states = {
default = {
material = RegisterMaterial( "white" ),
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = 0,
bottom = 0,
left = 0,
right = 0,
red = 0,
green = 0,
blue = 0,
alpha = 0.5
}
}
}
}
}
for f9_local4, f9_local5 in ipairs( f9_arg1 ) do
f9_local0.children[#f9_local0.children + 1] = stick_box_content( f9_local5.name, f9_local5.controls )
end
return f9_local0
end
function left_stick_box( f10_arg0 )
local f10_local0 = stick_box( "left_stick_box", f10_arg0 )
f10_local0.states.default = {
leftAnchor = true,
rightAnchor = false,
topAnchor = true,
bottomAnchor = false
}
if Engine.IsVita() then
f10_local0.states.default.top = 40
f10_local0.states.default.left = -190
elseif debugPlaystation then
f10_local0.states.default.top = 30
f10_local0.states.default.left = -175
elseif Engine.IsPS4() then
f10_local0.states.default.top = 30
f10_local0.states.default.left = -175
elseif Engine.IsPS3() then
f10_local0.states.default.top = 30
f10_local0.states.default.left = -175
elseif Engine.IsWiiU() then
f10_local0.states.default.top = -150
f10_local0.states.default.left = -15
elseif Engine.IsXB3() then
f10_local0.states.default.top = 15
f10_local0.states.default.left = -195
else
f10_local0.states.default.top = -15
f10_local0.states.default.left = -195
end
f10_local0.states.default.bottom = f10_local0.states.default.top + stickBoxH
f10_local0.states.default.right = f10_local0.states.default.left + stickBoxW
return f10_local0
end
function right_stick_box( f11_arg0 )
local f11_local0 = stick_box( "right_stick_box", f11_arg0 )
f11_local0.states.default = {
leftAnchor = false,
rightAnchor = true,
topAnchor = false,
bottomAnchor = true
}
if Engine.IsVita() then
f11_local0.states.default.top = -96
f11_local0.states.default.left = 0
elseif debugPlaystation then
f11_local0.states.default.top = -150
f11_local0.states.default.left = -15
elseif Engine.IsPS4() then
f11_local0.states.default.top = -150
f11_local0.states.default.left = -15
elseif Engine.IsPS3() then
f11_local0.states.default.top = -150
f11_local0.states.default.left = -15
elseif Engine.IsWiiU() then
f11_local0.states.default.top = -150
f11_local0.states.default.left = -15
elseif Engine.IsXB3() then
f11_local0.states.default.top = -95
f11_local0.states.default.left = 5
else
f11_local0.states.default.top = -70
f11_local0.states.default.left = 5
end
f11_local0.states.default.bottom = f11_local0.states.default.top + stickBoxH
f11_local0.states.default.right = f11_local0.states.default.left + stickBoxW
return f11_local0
end
function sticks_texts_overlay()
local f12_local0 = LUI.FlowManager.GetMenuScopedDataByMenuName( "thumbstick" )
local f12_local1 = {
type = "UIElement",
id = "sticks_texts_overlay",
states = {
default = {
leftAnchor = true,
rightAnchor = true,
topAnchor = true,
bottomAnchor = true,
left = 0,
right = 0,
top = 0,
bottom = 0
}
},
children = {}
}
local f12_local2 = "@MENU_LOOK_UP"
local f12_local3 = "@MENU_LOOK_DOWN"
if not f12_local0.exclusiveControllerIndex then
DebugPrint( "WARNING: OptionsLayout opened without exclusiveControllerIndex, this should only happen on LUI Reload" )
f12_local0.exclusiveControllerIndex = 0
end
if Engine.IsPitchInverted and Engine.IsPitchInverted( f12_local0.exclusiveControllerIndex ) then
local f12_local4 = f12_local2
f12_local2 = f12_local3
f12_local3 = f12_local4
end
f12_local1.children[#f12_local1.children + 1] = left_stick_box( {
{
name = "thumbstick_default",
controls = {
"@MENU_MOVE_FORWARD",
"@MENU_MOVE_BACK",
"@LUA_MENU_STRAFE_RIGHT",
"@LUA_MENU_STRAFE_LEFT"
}
},
{
name = "thumbstick_southpaw",
controls = {
f12_local2,
f12_local3,
"@LUA_MENU_ROTATE_RIGHT",
"@LUA_MENU_ROTATE_LEFT"
}
},
{
name = "thumbstick_legacy",
controls = {
"@MENU_MOVE_FORWARD",
"@MENU_MOVE_BACK",
"@LUA_MENU_ROTATE_RIGHT",
"@LUA_MENU_ROTATE_LEFT"
}
},
{
name = "thumbstick_legacysouthpaw",
controls = {
f12_local2,
f12_local3,
"@LUA_MENU_STRAFE_RIGHT",
"@LUA_MENU_STRAFE_LEFT"
}
},
{
name = "thumbstick_southpaw_ns",
controls = {
f12_local2,
f12_local3,
"@LUA_MENU_ROTATE_RIGHT",
"@LUA_MENU_ROTATE_LEFT"
}
},
{
name = "thumbstick_legacysouthpaw_ns",
controls = {
f12_local2,
f12_local3,
"@LUA_MENU_STRAFE_RIGHT",
"@LUA_MENU_STRAFE_LEFT"
}
}
} )
f12_local1.children[#f12_local1.children + 1] = right_stick_box( {
{
name = "thumbstick_default",
controls = {
f12_local2,
f12_local3,
"@LUA_MENU_ROTATE_RIGHT",
"@LUA_MENU_ROTATE_LEFT"
}
},
{
name = "thumbstick_southpaw",
controls = {
"@MENU_MOVE_FORWARD",
"@MENU_MOVE_BACK",
"@LUA_MENU_STRAFE_RIGHT",
"@LUA_MENU_STRAFE_LEFT"
}
},
{
name = "thumbstick_legacy",
controls = {
f12_local2,
f12_local3,
"@LUA_MENU_STRAFE_RIGHT",
"@LUA_MENU_STRAFE_LEFT"
}
},
{
name = "thumbstick_legacysouthpaw",
controls = {
"@MENU_MOVE_FORWARD",
"@MENU_MOVE_BACK",
"@LUA_MENU_ROTATE_RIGHT",
"@LUA_MENU_ROTATE_LEFT"
}
},
{
name = "thumbstick_southpaw_ns",
controls = {
"@MENU_MOVE_FORWARD",
"@MENU_MOVE_BACK",
"@LUA_MENU_STRAFE_RIGHT",
"@LUA_MENU_STRAFE_LEFT"
}
},
{
name = "thumbstick_legacysouthpaw_ns",
controls = {
"@MENU_MOVE_FORWARD",
"@MENU_MOVE_BACK",
"@LUA_MENU_ROTATE_RIGHT",
"@LUA_MENU_ROTATE_LEFT"
}
}
} )
return f12_local1
end
function sticks_overlay()
local f13_local0 = nil
if Engine.IsVita() then
f13_local0 = RegisterMaterial( "cont_lines_stick_vita" )
else
f13_local0 = RegisterMaterial( "cont_lines_stick" )
end
local f13_local1 = {
type = "UIImage",
id = "controller_lines",
states = {
default = {
topAnchor = true,
bottomAnchor = false,
leftAnchor = true,
rightAnchor = false,
material = f13_local0
}
}
}
local f13_local2 = {}
f13_local1.children = sticks_texts_overlay()
if Engine.IsVita() then
f13_local1.states.default.top = 240
f13_local1.states.default.left = 24
elseif debugPlaystation then
f13_local1.states.default.top = 280
f13_local1.states.default.left = 25
elseif Engine.IsPS4() then
f13_local1.states.default.top = 280
f13_local1.states.default.left = 25
elseif Engine.IsPS3() then
f13_local1.states.default.top = 280
f13_local1.states.default.left = 25
elseif Engine.IsWiiU() then
f13_local1.states.default.top = 280
f13_local1.states.default.left = 25
elseif Engine.IsXB3() then
f13_local1.states.default.top = 255
f13_local1.states.default.left = 0
else
f13_local1.states.default.top = 220
f13_local1.states.default.left = 5
end
if Engine.IsVita() then
f13_local1.states.default.bottom = f13_local1.states.default.top + 140
f13_local1.states.default.right = f13_local1.states.default.left + 558
else
f13_local1.states.default.bottom = f13_local1.states.default.top + 188
f13_local1.states.default.right = f13_local1.states.default.left + 512
end
return f13_local1
end
function button_text_overlay( f14_arg0, f14_arg1, f14_arg2 )
if Engine.IsVita() then
f14_arg2 = f14_arg2.vita
elseif debugPlaystation then
f14_arg2 = f14_arg2.ps3
elseif Engine.IsPS3() then
f14_arg2 = f14_arg2.ps3
elseif Engine.IsPS4() then
f14_arg2 = f14_arg2.ps4
elseif Engine.IsXB3() then
f14_arg2 = f14_arg2.xb3
elseif Engine.IsWiiU() then
f14_arg2 = f14_arg2.wiiu
else
f14_arg2 = f14_arg2.xbox
end
local f14_local0 = {
type = "UIText",
id = f14_arg0,
properties = {
text = ""
},
states = {
default = {
font = CoD.TextSettings.NormalFont.Font,
alignment = f14_arg2.alignment,
leftAnchor = true,
rightAnchor = false,
topAnchor = true,
bottomAnchor = false,
left = f14_arg2.left,
right = f14_arg2.right,
top = f14_arg2.top,
bottom = f14_arg2.bottom,
red = 1,
green = 1,
blue = 1
}
},
handlers = {}
}
for f14_local4, f14_local5 in ipairs( f14_arg1 ) do
f14_local0.handlers["show_" .. f14_local5.name] = function ( f15_arg0, f15_arg1 )
f15_arg0:setText( Engine.Localize( f14_local5.text ) )
end
end
return f14_local0
end
function buttons_texts_overlay()
local f16_local0 = not Engine.IsMultiplayer()
local f16_local1 = Engine.IsAliensMode()
local f16_local2
if f16_local0 then
f16_local2 = "@MENU_THROW_FRAG_GRENADE"
if not f16_local2 then
else
local f16_local3
if f16_local0 then
f16_local3 = "@LUA_MENU_NOT_USED"
if not f16_local3 then
if f16_local1 then
f16_local3 = "@ALIENS_UPGRADE_ABILITIES"
if not f16_local3 then
else
local f16_local4
if f16_local1 then
f16_local4 = "@LUA_MENU_SCOREBOARD_MENU"
if not f16_local4 then
else
local f16_local5 = {
type = "UIElement",
id = "buttons_texts_overlay",
states = {
default = {
leftAnchor = true,
rightAnchor = true,
topAnchor = true,
bottomAnchor = true,
left = 0,
right = 0,
top = 0,
bottom = 0
}
},
children = {}
}
local f16_local6 = {
{
name = "buttons_default",
text = "@MENU_SPRINT_HOLD_BREATH"
},
{
name = "buttons_tactical",
text = "@MENU_SPRINT_HOLD_BREATH"
},
{
name = "buttons_lefty",
text = "@MENU_MELEE_HOLD_BREATH"
},
{
name = "buttons_nomad",
text = "@MENU_SPRINT_CHANGE_ZOOM"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_SPRINT_CHANGE_ZOOM"
}
}
local f16_local7 = {
{
name = "buttons_default",
text = "@MENU_THROW_SPECIAL_GRENADE"
},
{
name = "buttons_tactical",
text = "@MENU_THROW_SPECIAL_GRENADE"
},
{
name = "buttons_lefty",
text = f16_local2
},
{
name = "buttons_nomad",
text = "@MENU_THROW_SPECIAL_GRENADE"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_THROW_SPECIAL_GRENADE"
}
}
local f16_local8 = {
{
name = "buttons_default",
text = "@MENU_AIM_DOWN_SIGHT"
},
{
name = "buttons_tactical",
text = "@MENU_AIM_DOWN_SIGHT"
},
{
name = "buttons_lefty",
text = "@MENU_FIRE_WEAPON"
},
{
name = "buttons_nomad",
text = f16_local2
},
{
name = "buttons_nomad_tactical",
text = f16_local2
}
}
local f16_local9 = {
{
name = "buttons_default",
text = "@MENU_MELEE_CHANGE_ZOOM"
},
{
name = "buttons_tactical",
text = "@MENU_CROUCH_PRONE"
},
{
name = "buttons_lefty",
text = "@MENU_SPRINT_CHANGE_ZOOM"
},
{
name = "buttons_nomad",
text = "@MENU_MELEE_HOLD_BREATH"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_CROUCH_PRONE"
}
}
local f16_local10 = {
{
name = "buttons_default",
text = f16_local2
},
{
name = "buttons_tactical",
text = f16_local2
},
{
name = "buttons_lefty",
text = "@MENU_THROW_SPECIAL_GRENADE"
},
{
name = "buttons_nomad",
text = "@MENU_TOGGLE_AIM_DOWN_SIGHT"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_TOGGLE_AIM_DOWN_SIGHT"
}
}
local f16_local11 = {
{
name = "buttons_default",
text = "@MENU_FIRE_WEAPON"
},
{
name = "buttons_tactical",
text = "@MENU_FIRE_WEAPON"
},
{
name = "buttons_lefty",
text = "@MENU_AIM_DOWN_SIGHT"
},
{
name = "buttons_nomad",
text = "@MENU_FIRE_WEAPON"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_FIRE_WEAPON"
}
}
local f16_local12 = {
{
name = "buttons_default",
text = "@MENU_SWITCH_WEAPON"
},
{
name = "buttons_tactical",
text = "@MENU_SWITCH_WEAPON"
},
{
name = "buttons_lefty",
text = "@MENU_SWITCH_WEAPON"
},
{
name = "buttons_nomad",
text = "@MENU_SWITCH_WEAPON"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_SWITCH_WEAPON"
}
}
local f16_local13 = {
{
name = "buttons_default",
text = "@MENU_CROUCH_PRONE"
},
{
name = "buttons_tactical",
text = "@MENU_MELEE_CHANGE_ZOOM"
},
{
name = "buttons_lefty",
text = "@MENU_CROUCH_PRONE"
},
{
name = "buttons_nomad",
text = "@MENU_CROUCH_PRONE"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_MELEE_HOLD_BREATH"
}
}
local f16_local14 = {
{
name = "buttons_default",
text = "@MENU_USE_RELOAD"
},
{
name = "buttons_tactical",
text = "@MENU_USE_RELOAD"
},
{
name = "buttons_lefty",
text = "@MENU_USE_RELOAD"
},
{
name = "buttons_nomad",
text = "@MENU_USE_RELOAD"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_USE_RELOAD"
}
}
local f16_local15 = {
{
name = "buttons_default",
text = "@MENU_JUMP"
},
{
name = "buttons_tactical",
text = "@MENU_JUMP"
},
{
name = "buttons_lefty",
text = "@MENU_JUMP"
},
{
name = "buttons_nomad",
text = "@MENU_JUMP"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_JUMP"
}
}
local f16_local16 = {
{
name = "buttons_default",
text = "@MENU_INVENTORY"
},
{
name = "buttons_tactical",
text = "@MENU_INVENTORY"
},
{
name = "buttons_lefty",
text = "@MENU_INVENTORY"
},
{
name = "buttons_nomad",
text = "@MENU_INVENTORY"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_INVENTORY"
}
}
local f16_local17 = {
{
name = "buttons_default",
text = f16_local3
},
{
name = "buttons_tactical",
text = f16_local3
},
{
name = "buttons_lefty",
text = f16_local3
},
{
name = "buttons_nomad",
text = f16_local3
},
{
name = "buttons_nomad_tactical",
text = f16_local3
}
}
local f16_local18 = {
{
name = "buttons_default",
text = f16_local4
},
{
name = "buttons_tactical",
text = f16_local4
},
{
name = "buttons_lefty",
text = f16_local4
},
{
name = "buttons_nomad",
text = f16_local4
},
{
name = "buttons_nomad_tactical",
text = f16_local4
}
}
for f16_local30, f16_local29 in ipairs( {
f16_local6,
f16_local7,
f16_local8,
f16_local9,
f16_local10,
f16_local11,
f16_local12,
f16_local13,
f16_local14,
f16_local15,
f16_local16,
f16_local17,
f16_local18
} ) do
local f16_local22 = f16_local29
if f16_local29 == f16_local8 then
f16_local22 = f16_local7
elseif f16_local29 == f16_local11 then
f16_local22 = f16_local10
elseif f16_local29 == f16_local7 then
f16_local22 = f16_local8
elseif f16_local29 == f16_local10 then
f16_local22 = f16_local11
end
local f16_local23 = {}
for f16_local27, f16_local28 in ipairs( f16_local22 ) do
table.insert( f16_local23, {
name = f16_local28.name .. "_alt",
text = f16_local28.text
} )
end
f16_local29 = LUI.ConcatenateToTable( f16_local29, f16_local23 )
end
if Engine.IsPS3() or debugPlaystation then
f16_local19 = f16_local11
f16_local11 = f16_local10
f16_local10 = f16_local19
f16_local20 = f16_local8
f16_local8 = f16_local7
f16_local7 = f16_local20
end
if IsCurrentSticksLayoutSouthpaw() or IsCurrentSticksLayoutLegacySouthpaw() then
f16_local19 = f16_local9
f16_local9 = f16_local6
f16_local6 = f16_local19
end
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "LS", f16_local6, {
xbox = {
left = -200,
right = -5,
top = 294,
bottom = 294 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
xb3 = {
left = -200,
right = -5,
top = 300,
bottom = 300 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps3 = {
left = -100,
right = 200,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps4 = {
left = -100,
right = 200,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
vita = {
left = 230,
right = 400,
top = 438,
bottom = 438 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
wiiu = {
left = -100,
right = 200,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "LB", f16_local7, {
xbox = {
left = -23,
right = 87,
top = 105 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 105 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
xb3 = {
left = -10,
right = 100,
top = 105 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 105 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps3 = {
left = -17,
right = 93,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps4 = {
left = -17,
right = 93,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
vita = {
left = 360,
right = 470,
top = 282 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 282 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
wiiu = {
left = -17,
right = 93,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "LT", f16_local8, {
xbox = {
left = -155,
right = 145,
top = 43 - CoD.TextSettings.NormalFont.Height,
bottom = 43,
alignment = LUI.Alignment.Right
},
xb3 = {
left = -167,
right = 133,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Right
},
ps3 = {
left = -158,
right = 142,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Right
},
ps4 = {
left = -158,
right = 142,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Right
},
vita = {
left = -250,
right = 50,
top = 70 - CoD.TextSettings.NormalFont.Height,
bottom = 70,
alignment = LUI.Alignment.Right
},
wiiu = {
left = -158,
right = 142,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Right
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "RS", f16_local9, {
xbox = {
left = 223,
right = 523,
top = 467,
bottom = 467 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
xb3 = {
left = 223,
right = 523,
top = 472,
bottom = 472 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
ps3 = {
left = 381,
right = 681,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 381,
right = 681,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
vita = {
left = -164,
right = 672,
top = 250,
bottom = 250 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
wiiu = {
left = 381,
right = 681,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "RT", f16_local11, {
xbox = {
left = 437,
right = 737,
top = 43 - CoD.TextSettings.NormalFont.Height,
bottom = 43,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 456,
right = 756,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 437,
right = 737,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 437,
right = 737,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Left
},
vita = {
left = 520,
right = 820,
top = 70 - CoD.TextSettings.NormalFont.Height,
bottom = 70,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 437,
right = 737,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "RB", f16_local10, {
xbox = {
left = 495,
right = 605,
top = 105 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 105 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 489,
right = 599,
top = 105 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 105 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 484,
right = 594,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 484,
right = 594,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
vita = {
left = 360,
right = 470,
top = 230 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 230 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
wiiu = {
left = 484,
right = 594,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "Y", f16_local12, {
xbox = {
left = 578,
right = 733,
top = 260 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 260 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 578,
right = 733,
top = 270 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 270 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 572,
right = 782,
top = 285 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 285 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 572,
right = 782,
top = 285 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 285 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
vita = {
left = 572,
right = 782,
top = 114 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 114 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 572,
right = 782,
top = 285 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 285 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "B", f16_local13, {
xbox = {
left = 578,
right = 733,
top = 300 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 300 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 578,
right = 733,
top = 310 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 310 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 572,
right = 727,
top = 325 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 325 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 572,
right = 727,
top = 325 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 325 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
vita = {
left = 572,
right = 727,
top = 200 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 200 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 572,
right = 727,
top = 325 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 325 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "X", f16_local14, {
xbox = {
left = 578,
right = 733,
top = 344 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 344 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 578,
right = 733,
top = 354 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 354 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 572,
right = 782,
top = 369 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 369 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 572,
right = 782,
top = 369 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 369 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
vita = {
left = 572,
right = 782,
top = 254 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 254 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 572,
right = 782,
top = 369 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 369 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "A", f16_local15, {
xbox = {
left = 578,
right = 733,
top = 380 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 380 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 578,
right = 733,
top = 390 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 390 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 572,
right = 782,
top = 405 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 405 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 572,
right = 782,
top = 405 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 405 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
vita = {
left = 572,
right = 782,
top = 306 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 306 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 572,
right = 782,
top = 405 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 405 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "DPAD", f16_local16, {
xbox = {
left = 56,
right = 356,
top = 467,
bottom = 467 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
xb3 = {
left = 56,
right = 356,
top = 472,
bottom = 472 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
ps3 = {
left = -278,
right = 22,
top = 340,
bottom = 340 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps4 = {
left = -300,
right = 0,
top = 295,
bottom = 295 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
vita = {
left = -300,
right = 0,
top = 200,
bottom = 200 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
wiiu = {
left = -300,
right = 0,
top = 295,
bottom = 295 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "back", f16_local17, {
xbox = {
left = 84,
right = 384,
top = 75 - CoD.TextSettings.NormalFont.Height,
bottom = 75,
alignment = LUI.Alignment.Center
},
xb3 = {
left = 92,
right = 392,
top = 80 - CoD.TextSettings.NormalFont.Height,
bottom = 80,
alignment = LUI.Alignment.Center
},
ps3 = {
left = 90,
right = 390,
top = 78 - CoD.TextSettings.NormalFont.Height,
bottom = 78,
alignment = LUI.Alignment.Center
},
ps4 = {
left = 90,
right = 390,
top = 78 - CoD.TextSettings.NormalFont.Height,
bottom = 78,
alignment = LUI.Alignment.Center
},
vita = {
left = -164,
right = 672,
top = 154,
bottom = 154 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
wiiu = {
left = 90,
right = 390,
top = 78 - CoD.TextSettings.NormalFont.Height,
bottom = 78,
alignment = LUI.Alignment.Center
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "start", f16_local18, {
xbox = {
left = 194,
right = 494,
top = 107 - CoD.TextSettings.NormalFont.Height,
bottom = 107,
alignment = LUI.Alignment.Center
},
xb3 = {
left = 195,
right = 495,
top = 112 - CoD.TextSettings.NormalFont.Height,
bottom = 112,
alignment = LUI.Alignment.Center
},
ps3 = {
left = 197,
right = 497,
top = 112 - CoD.TextSettings.NormalFont.Height,
bottom = 112,
alignment = LUI.Alignment.Center
},
ps4 = {
left = 197,
right = 497,
top = 112 - CoD.TextSettings.NormalFont.Height,
bottom = 112,
alignment = LUI.Alignment.Center
},
vita = {
left = 520,
right = 670,
top = 452 - CoD.TextSettings.NormalFont.Height,
bottom = 452,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 197,
right = 497,
top = 112 - CoD.TextSettings.NormalFont.Height,
bottom = 112,
alignment = LUI.Alignment.Center
}
} )
return f16_local5
end
end
f16_local4 = "@MENU_OBJECTIVES_MENU"
end
end
f16_local3 = "@MENU_SCOREBOARD"
end
else
if f16_local1 then
f16_local3 = "@ALIENS_UPGRADE_ABILITIES"
if not f16_local3 then
else
local f16_local4
if f16_local1 then
f16_local4 = "@LUA_MENU_SCOREBOARD_MENU"
if not f16_local4 then
else
local f16_local5 = {
type = "UIElement",
id = "buttons_texts_overlay",
states = {
default = {
leftAnchor = true,
rightAnchor = true,
topAnchor = true,
bottomAnchor = true,
left = 0,
right = 0,
top = 0,
bottom = 0
}
},
children = {}
}
local f16_local6 = {
{
name = "buttons_default",
text = "@MENU_SPRINT_HOLD_BREATH"
},
{
name = "buttons_tactical",
text = "@MENU_SPRINT_HOLD_BREATH"
},
{
name = "buttons_lefty",
text = "@MENU_MELEE_HOLD_BREATH"
},
{
name = "buttons_nomad",
text = "@MENU_SPRINT_CHANGE_ZOOM"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_SPRINT_CHANGE_ZOOM"
}
}
local f16_local7 = {
{
name = "buttons_default",
text = "@MENU_THROW_SPECIAL_GRENADE"
},
{
name = "buttons_tactical",
text = "@MENU_THROW_SPECIAL_GRENADE"
},
{
name = "buttons_lefty",
text = f16_local2
},
{
name = "buttons_nomad",
text = "@MENU_THROW_SPECIAL_GRENADE"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_THROW_SPECIAL_GRENADE"
}
}
local f16_local8 = {
{
name = "buttons_default",
text = "@MENU_AIM_DOWN_SIGHT"
},
{
name = "buttons_tactical",
text = "@MENU_AIM_DOWN_SIGHT"
},
{
name = "buttons_lefty",
text = "@MENU_FIRE_WEAPON"
},
{
name = "buttons_nomad",
text = f16_local2
},
{
name = "buttons_nomad_tactical",
text = f16_local2
}
}
local f16_local9 = {
{
name = "buttons_default",
text = "@MENU_MELEE_CHANGE_ZOOM"
},
{
name = "buttons_tactical",
text = "@MENU_CROUCH_PRONE"
},
{
name = "buttons_lefty",
text = "@MENU_SPRINT_CHANGE_ZOOM"
},
{
name = "buttons_nomad",
text = "@MENU_MELEE_HOLD_BREATH"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_CROUCH_PRONE"
}
}
local f16_local10 = {
{
name = "buttons_default",
text = f16_local2
},
{
name = "buttons_tactical",
text = f16_local2
},
{
name = "buttons_lefty",
text = "@MENU_THROW_SPECIAL_GRENADE"
},
{
name = "buttons_nomad",
text = "@MENU_TOGGLE_AIM_DOWN_SIGHT"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_TOGGLE_AIM_DOWN_SIGHT"
}
}
local f16_local11 = {
{
name = "buttons_default",
text = "@MENU_FIRE_WEAPON"
},
{
name = "buttons_tactical",
text = "@MENU_FIRE_WEAPON"
},
{
name = "buttons_lefty",
text = "@MENU_AIM_DOWN_SIGHT"
},
{
name = "buttons_nomad",
text = "@MENU_FIRE_WEAPON"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_FIRE_WEAPON"
}
}
local f16_local12 = {
{
name = "buttons_default",
text = "@MENU_SWITCH_WEAPON"
},
{
name = "buttons_tactical",
text = "@MENU_SWITCH_WEAPON"
},
{
name = "buttons_lefty",
text = "@MENU_SWITCH_WEAPON"
},
{
name = "buttons_nomad",
text = "@MENU_SWITCH_WEAPON"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_SWITCH_WEAPON"
}
}
local f16_local13 = {
{
name = "buttons_default",
text = "@MENU_CROUCH_PRONE"
},
{
name = "buttons_tactical",
text = "@MENU_MELEE_CHANGE_ZOOM"
},
{
name = "buttons_lefty",
text = "@MENU_CROUCH_PRONE"
},
{
name = "buttons_nomad",
text = "@MENU_CROUCH_PRONE"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_MELEE_HOLD_BREATH"
}
}
local f16_local14 = {
{
name = "buttons_default",
text = "@MENU_USE_RELOAD"
},
{
name = "buttons_tactical",
text = "@MENU_USE_RELOAD"
},
{
name = "buttons_lefty",
text = "@MENU_USE_RELOAD"
},
{
name = "buttons_nomad",
text = "@MENU_USE_RELOAD"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_USE_RELOAD"
}
}
local f16_local15 = {
{
name = "buttons_default",
text = "@MENU_JUMP"
},
{
name = "buttons_tactical",
text = "@MENU_JUMP"
},
{
name = "buttons_lefty",
text = "@MENU_JUMP"
},
{
name = "buttons_nomad",
text = "@MENU_JUMP"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_JUMP"
}
}
local f16_local16 = {
{
name = "buttons_default",
text = "@MENU_INVENTORY"
},
{
name = "buttons_tactical",
text = "@MENU_INVENTORY"
},
{
name = "buttons_lefty",
text = "@MENU_INVENTORY"
},
{
name = "buttons_nomad",
text = "@MENU_INVENTORY"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_INVENTORY"
}
}
local f16_local17 = {
{
name = "buttons_default",
text = f16_local3
},
{
name = "buttons_tactical",
text = f16_local3
},
{
name = "buttons_lefty",
text = f16_local3
},
{
name = "buttons_nomad",
text = f16_local3
},
{
name = "buttons_nomad_tactical",
text = f16_local3
}
}
local f16_local18 = {
{
name = "buttons_default",
text = f16_local4
},
{
name = "buttons_tactical",
text = f16_local4
},
{
name = "buttons_lefty",
text = f16_local4
},
{
name = "buttons_nomad",
text = f16_local4
},
{
name = "buttons_nomad_tactical",
text = f16_local4
}
}
for f16_local30, f16_local29 in ipairs( {
f16_local6,
f16_local7,
f16_local8,
f16_local9,
f16_local10,
f16_local11,
f16_local12,
f16_local13,
f16_local14,
f16_local15,
f16_local16,
f16_local17,
f16_local18
} ) do
local f16_local22 = f16_local29
if f16_local29 == f16_local8 then
f16_local22 = f16_local7
elseif f16_local29 == f16_local11 then
f16_local22 = f16_local10
elseif f16_local29 == f16_local7 then
f16_local22 = f16_local8
elseif f16_local29 == f16_local10 then
f16_local22 = f16_local11
end
local f16_local23 = {}
for f16_local27, f16_local28 in ipairs( f16_local22 ) do
table.insert( f16_local23, {
name = f16_local28.name .. "_alt",
text = f16_local28.text
} )
end
f16_local29 = LUI.ConcatenateToTable( f16_local29, f16_local23 )
end
if Engine.IsPS3() or debugPlaystation then
f16_local19 = f16_local11
f16_local11 = f16_local10
f16_local10 = f16_local19
f16_local20 = f16_local8
f16_local8 = f16_local7
f16_local7 = f16_local20
end
if IsCurrentSticksLayoutSouthpaw() or IsCurrentSticksLayoutLegacySouthpaw() then
f16_local19 = f16_local9
f16_local9 = f16_local6
f16_local6 = f16_local19
end
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "LS", f16_local6, {
xbox = {
left = -200,
right = -5,
top = 294,
bottom = 294 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
xb3 = {
left = -200,
right = -5,
top = 300,
bottom = 300 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps3 = {
left = -100,
right = 200,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps4 = {
left = -100,
right = 200,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
vita = {
left = 230,
right = 400,
top = 438,
bottom = 438 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
wiiu = {
left = -100,
right = 200,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "LB", f16_local7, {
xbox = {
left = -23,
right = 87,
top = 105 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 105 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
xb3 = {
left = -10,
right = 100,
top = 105 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 105 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps3 = {
left = -17,
right = 93,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps4 = {
left = -17,
right = 93,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
vita = {
left = 360,
right = 470,
top = 282 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 282 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
wiiu = {
left = -17,
right = 93,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "LT", f16_local8, {
xbox = {
left = -155,
right = 145,
top = 43 - CoD.TextSettings.NormalFont.Height,
bottom = 43,
alignment = LUI.Alignment.Right
},
xb3 = {
left = -167,
right = 133,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Right
},
ps3 = {
left = -158,
right = 142,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Right
},
ps4 = {
left = -158,
right = 142,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Right
},
vita = {
left = -250,
right = 50,
top = 70 - CoD.TextSettings.NormalFont.Height,
bottom = 70,
alignment = LUI.Alignment.Right
},
wiiu = {
left = -158,
right = 142,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Right
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "RS", f16_local9, {
xbox = {
left = 223,
right = 523,
top = 467,
bottom = 467 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
xb3 = {
left = 223,
right = 523,
top = 472,
bottom = 472 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
ps3 = {
left = 381,
right = 681,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 381,
right = 681,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
vita = {
left = -164,
right = 672,
top = 250,
bottom = 250 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
wiiu = {
left = 381,
right = 681,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "RT", f16_local11, {
xbox = {
left = 437,
right = 737,
top = 43 - CoD.TextSettings.NormalFont.Height,
bottom = 43,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 456,
right = 756,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 437,
right = 737,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 437,
right = 737,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Left
},
vita = {
left = 520,
right = 820,
top = 70 - CoD.TextSettings.NormalFont.Height,
bottom = 70,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 437,
right = 737,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "RB", f16_local10, {
xbox = {
left = 495,
right = 605,
top = 105 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 105 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 489,
right = 599,
top = 105 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 105 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 484,
right = 594,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 484,
right = 594,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
vita = {
left = 360,
right = 470,
top = 230 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 230 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
wiiu = {
left = 484,
right = 594,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "Y", f16_local12, {
xbox = {
left = 578,
right = 733,
top = 260 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 260 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 578,
right = 733,
top = 270 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 270 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 572,
right = 782,
top = 285 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 285 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 572,
right = 782,
top = 285 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 285 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
vita = {
left = 572,
right = 782,
top = 114 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 114 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 572,
right = 782,
top = 285 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 285 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "B", f16_local13, {
xbox = {
left = 578,
right = 733,
top = 300 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 300 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 578,
right = 733,
top = 310 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 310 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 572,
right = 727,
top = 325 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 325 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 572,
right = 727,
top = 325 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 325 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
vita = {
left = 572,
right = 727,
top = 200 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 200 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 572,
right = 727,
top = 325 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 325 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "X", f16_local14, {
xbox = {
left = 578,
right = 733,
top = 344 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 344 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 578,
right = 733,
top = 354 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 354 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 572,
right = 782,
top = 369 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 369 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 572,
right = 782,
top = 369 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 369 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
vita = {
left = 572,
right = 782,
top = 254 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 254 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 572,
right = 782,
top = 369 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 369 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "A", f16_local15, {
xbox = {
left = 578,
right = 733,
top = 380 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 380 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 578,
right = 733,
top = 390 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 390 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 572,
right = 782,
top = 405 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 405 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 572,
right = 782,
top = 405 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 405 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
vita = {
left = 572,
right = 782,
top = 306 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 306 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 572,
right = 782,
top = 405 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 405 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "DPAD", f16_local16, {
xbox = {
left = 56,
right = 356,
top = 467,
bottom = 467 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
xb3 = {
left = 56,
right = 356,
top = 472,
bottom = 472 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
ps3 = {
left = -278,
right = 22,
top = 340,
bottom = 340 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps4 = {
left = -300,
right = 0,
top = 295,
bottom = 295 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
vita = {
left = -300,
right = 0,
top = 200,
bottom = 200 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
wiiu = {
left = -300,
right = 0,
top = 295,
bottom = 295 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "back", f16_local17, {
xbox = {
left = 84,
right = 384,
top = 75 - CoD.TextSettings.NormalFont.Height,
bottom = 75,
alignment = LUI.Alignment.Center
},
xb3 = {
left = 92,
right = 392,
top = 80 - CoD.TextSettings.NormalFont.Height,
bottom = 80,
alignment = LUI.Alignment.Center
},
ps3 = {
left = 90,
right = 390,
top = 78 - CoD.TextSettings.NormalFont.Height,
bottom = 78,
alignment = LUI.Alignment.Center
},
ps4 = {
left = 90,
right = 390,
top = 78 - CoD.TextSettings.NormalFont.Height,
bottom = 78,
alignment = LUI.Alignment.Center
},
vita = {
left = -164,
right = 672,
top = 154,
bottom = 154 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
wiiu = {
left = 90,
right = 390,
top = 78 - CoD.TextSettings.NormalFont.Height,
bottom = 78,
alignment = LUI.Alignment.Center
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "start", f16_local18, {
xbox = {
left = 194,
right = 494,
top = 107 - CoD.TextSettings.NormalFont.Height,
bottom = 107,
alignment = LUI.Alignment.Center
},
xb3 = {
left = 195,
right = 495,
top = 112 - CoD.TextSettings.NormalFont.Height,
bottom = 112,
alignment = LUI.Alignment.Center
},
ps3 = {
left = 197,
right = 497,
top = 112 - CoD.TextSettings.NormalFont.Height,
bottom = 112,
alignment = LUI.Alignment.Center
},
ps4 = {
left = 197,
right = 497,
top = 112 - CoD.TextSettings.NormalFont.Height,
bottom = 112,
alignment = LUI.Alignment.Center
},
vita = {
left = 520,
right = 670,
top = 452 - CoD.TextSettings.NormalFont.Height,
bottom = 452,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 197,
right = 497,
top = 112 - CoD.TextSettings.NormalFont.Height,
bottom = 112,
alignment = LUI.Alignment.Center
}
} )
return f16_local5
end
end
f16_local4 = "@MENU_OBJECTIVES_MENU"
end
end
f16_local3 = "@MENU_SCOREBOARD"
end
local f16_local4
if f16_local1 then
f16_local4 = "@LUA_MENU_SCOREBOARD_MENU"
if not f16_local4 then
else
local f16_local5 = {
type = "UIElement",
id = "buttons_texts_overlay",
states = {
default = {
leftAnchor = true,
rightAnchor = true,
topAnchor = true,
bottomAnchor = true,
left = 0,
right = 0,
top = 0,
bottom = 0
}
},
children = {}
}
local f16_local6 = {
{
name = "buttons_default",
text = "@MENU_SPRINT_HOLD_BREATH"
},
{
name = "buttons_tactical",
text = "@MENU_SPRINT_HOLD_BREATH"
},
{
name = "buttons_lefty",
text = "@MENU_MELEE_HOLD_BREATH"
},
{
name = "buttons_nomad",
text = "@MENU_SPRINT_CHANGE_ZOOM"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_SPRINT_CHANGE_ZOOM"
}
}
local f16_local7 = {
{
name = "buttons_default",
text = "@MENU_THROW_SPECIAL_GRENADE"
},
{
name = "buttons_tactical",
text = "@MENU_THROW_SPECIAL_GRENADE"
},
{
name = "buttons_lefty",
text = f16_local2
},
{
name = "buttons_nomad",
text = "@MENU_THROW_SPECIAL_GRENADE"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_THROW_SPECIAL_GRENADE"
}
}
local f16_local8 = {
{
name = "buttons_default",
text = "@MENU_AIM_DOWN_SIGHT"
},
{
name = "buttons_tactical",
text = "@MENU_AIM_DOWN_SIGHT"
},
{
name = "buttons_lefty",
text = "@MENU_FIRE_WEAPON"
},
{
name = "buttons_nomad",
text = f16_local2
},
{
name = "buttons_nomad_tactical",
text = f16_local2
}
}
local f16_local9 = {
{
name = "buttons_default",
text = "@MENU_MELEE_CHANGE_ZOOM"
},
{
name = "buttons_tactical",
text = "@MENU_CROUCH_PRONE"
},
{
name = "buttons_lefty",
text = "@MENU_SPRINT_CHANGE_ZOOM"
},
{
name = "buttons_nomad",
text = "@MENU_MELEE_HOLD_BREATH"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_CROUCH_PRONE"
}
}
local f16_local10 = {
{
name = "buttons_default",
text = f16_local2
},
{
name = "buttons_tactical",
text = f16_local2
},
{
name = "buttons_lefty",
text = "@MENU_THROW_SPECIAL_GRENADE"
},
{
name = "buttons_nomad",
text = "@MENU_TOGGLE_AIM_DOWN_SIGHT"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_TOGGLE_AIM_DOWN_SIGHT"
}
}
local f16_local11 = {
{
name = "buttons_default",
text = "@MENU_FIRE_WEAPON"
},
{
name = "buttons_tactical",
text = "@MENU_FIRE_WEAPON"
},
{
name = "buttons_lefty",
text = "@MENU_AIM_DOWN_SIGHT"
},
{
name = "buttons_nomad",
text = "@MENU_FIRE_WEAPON"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_FIRE_WEAPON"
}
}
local f16_local12 = {
{
name = "buttons_default",
text = "@MENU_SWITCH_WEAPON"
},
{
name = "buttons_tactical",
text = "@MENU_SWITCH_WEAPON"
},
{
name = "buttons_lefty",
text = "@MENU_SWITCH_WEAPON"
},
{
name = "buttons_nomad",
text = "@MENU_SWITCH_WEAPON"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_SWITCH_WEAPON"
}
}
local f16_local13 = {
{
name = "buttons_default",
text = "@MENU_CROUCH_PRONE"
},
{
name = "buttons_tactical",
text = "@MENU_MELEE_CHANGE_ZOOM"
},
{
name = "buttons_lefty",
text = "@MENU_CROUCH_PRONE"
},
{
name = "buttons_nomad",
text = "@MENU_CROUCH_PRONE"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_MELEE_HOLD_BREATH"
}
}
local f16_local14 = {
{
name = "buttons_default",
text = "@MENU_USE_RELOAD"
},
{
name = "buttons_tactical",
text = "@MENU_USE_RELOAD"
},
{
name = "buttons_lefty",
text = "@MENU_USE_RELOAD"
},
{
name = "buttons_nomad",
text = "@MENU_USE_RELOAD"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_USE_RELOAD"
}
}
local f16_local15 = {
{
name = "buttons_default",
text = "@MENU_JUMP"
},
{
name = "buttons_tactical",
text = "@MENU_JUMP"
},
{
name = "buttons_lefty",
text = "@MENU_JUMP"
},
{
name = "buttons_nomad",
text = "@MENU_JUMP"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_JUMP"
}
}
local f16_local16 = {
{
name = "buttons_default",
text = "@MENU_INVENTORY"
},
{
name = "buttons_tactical",
text = "@MENU_INVENTORY"
},
{
name = "buttons_lefty",
text = "@MENU_INVENTORY"
},
{
name = "buttons_nomad",
text = "@MENU_INVENTORY"
},
{
name = "buttons_nomad_tactical",
text = "@MENU_INVENTORY"
}
}
local f16_local17 = {
{
name = "buttons_default",
text = f16_local3
},
{
name = "buttons_tactical",
text = f16_local3
},
{
name = "buttons_lefty",
text = f16_local3
},
{
name = "buttons_nomad",
text = f16_local3
},
{
name = "buttons_nomad_tactical",
text = f16_local3
}
}
local f16_local18 = {
{
name = "buttons_default",
text = f16_local4
},
{
name = "buttons_tactical",
text = f16_local4
},
{
name = "buttons_lefty",
text = f16_local4
},
{
name = "buttons_nomad",
text = f16_local4
},
{
name = "buttons_nomad_tactical",
text = f16_local4
}
}
for f16_local30, f16_local29 in ipairs( {
f16_local6,
f16_local7,
f16_local8,
f16_local9,
f16_local10,
f16_local11,
f16_local12,
f16_local13,
f16_local14,
f16_local15,
f16_local16,
f16_local17,
f16_local18
} ) do
local f16_local22 = f16_local29
if f16_local29 == f16_local8 then
f16_local22 = f16_local7
elseif f16_local29 == f16_local11 then
f16_local22 = f16_local10
elseif f16_local29 == f16_local7 then
f16_local22 = f16_local8
elseif f16_local29 == f16_local10 then
f16_local22 = f16_local11
end
local f16_local23 = {}
for f16_local27, f16_local28 in ipairs( f16_local22 ) do
table.insert( f16_local23, {
name = f16_local28.name .. "_alt",
text = f16_local28.text
} )
end
f16_local29 = LUI.ConcatenateToTable( f16_local29, f16_local23 )
end
if Engine.IsPS3() or debugPlaystation then
f16_local19 = f16_local11
f16_local11 = f16_local10
f16_local10 = f16_local19
f16_local20 = f16_local8
f16_local8 = f16_local7
f16_local7 = f16_local20
end
if IsCurrentSticksLayoutSouthpaw() or IsCurrentSticksLayoutLegacySouthpaw() then
f16_local19 = f16_local9
f16_local9 = f16_local6
f16_local6 = f16_local19
end
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "LS", f16_local6, {
xbox = {
left = -200,
right = -5,
top = 294,
bottom = 294 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
xb3 = {
left = -200,
right = -5,
top = 300,
bottom = 300 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps3 = {
left = -100,
right = 200,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps4 = {
left = -100,
right = 200,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
vita = {
left = 230,
right = 400,
top = 438,
bottom = 438 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
wiiu = {
left = -100,
right = 200,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "LB", f16_local7, {
xbox = {
left = -23,
right = 87,
top = 105 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 105 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
xb3 = {
left = -10,
right = 100,
top = 105 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 105 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps3 = {
left = -17,
right = 93,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps4 = {
left = -17,
right = 93,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
vita = {
left = 360,
right = 470,
top = 282 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 282 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
wiiu = {
left = -17,
right = 93,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "LT", f16_local8, {
xbox = {
left = -155,
right = 145,
top = 43 - CoD.TextSettings.NormalFont.Height,
bottom = 43,
alignment = LUI.Alignment.Right
},
xb3 = {
left = -167,
right = 133,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Right
},
ps3 = {
left = -158,
right = 142,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Right
},
ps4 = {
left = -158,
right = 142,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Right
},
vita = {
left = -250,
right = 50,
top = 70 - CoD.TextSettings.NormalFont.Height,
bottom = 70,
alignment = LUI.Alignment.Right
},
wiiu = {
left = -158,
right = 142,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Right
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "RS", f16_local9, {
xbox = {
left = 223,
right = 523,
top = 467,
bottom = 467 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
xb3 = {
left = 223,
right = 523,
top = 472,
bottom = 472 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
ps3 = {
left = 381,
right = 681,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 381,
right = 681,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
vita = {
left = -164,
right = 672,
top = 250,
bottom = 250 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
wiiu = {
left = 381,
right = 681,
top = 473,
bottom = 473 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "RT", f16_local11, {
xbox = {
left = 437,
right = 737,
top = 43 - CoD.TextSettings.NormalFont.Height,
bottom = 43,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 456,
right = 756,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 437,
right = 737,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 437,
right = 737,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Left
},
vita = {
left = 520,
right = 820,
top = 70 - CoD.TextSettings.NormalFont.Height,
bottom = 70,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 437,
right = 737,
top = 40 - CoD.TextSettings.NormalFont.Height,
bottom = 40,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "RB", f16_local10, {
xbox = {
left = 495,
right = 605,
top = 105 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 105 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 489,
right = 599,
top = 105 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 105 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 484,
right = 594,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 484,
right = 594,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
},
vita = {
left = 360,
right = 470,
top = 230 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 230 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
wiiu = {
left = 484,
right = 594,
top = 86 - 2 * CoD.TextSettings.NormalFont.Height,
bottom = 86 - CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "Y", f16_local12, {
xbox = {
left = 578,
right = 733,
top = 260 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 260 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 578,
right = 733,
top = 270 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 270 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 572,
right = 782,
top = 285 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 285 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 572,
right = 782,
top = 285 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 285 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
vita = {
left = 572,
right = 782,
top = 114 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 114 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 572,
right = 782,
top = 285 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 285 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "B", f16_local13, {
xbox = {
left = 578,
right = 733,
top = 300 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 300 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 578,
right = 733,
top = 310 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 310 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 572,
right = 727,
top = 325 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 325 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 572,
right = 727,
top = 325 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 325 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
vita = {
left = 572,
right = 727,
top = 200 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 200 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 572,
right = 727,
top = 325 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 325 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "X", f16_local14, {
xbox = {
left = 578,
right = 733,
top = 344 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 344 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 578,
right = 733,
top = 354 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 354 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 572,
right = 782,
top = 369 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 369 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 572,
right = 782,
top = 369 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 369 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
vita = {
left = 572,
right = 782,
top = 254 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 254 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 572,
right = 782,
top = 369 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 369 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "A", f16_local15, {
xbox = {
left = 578,
right = 733,
top = 380 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 380 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
xb3 = {
left = 578,
right = 733,
top = 390 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 390 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps3 = {
left = 572,
right = 782,
top = 405 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 405 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
ps4 = {
left = 572,
right = 782,
top = 405 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 405 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
vita = {
left = 572,
right = 782,
top = 306 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 306 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 572,
right = 782,
top = 405 - CoD.TextSettings.NormalFont.Height / 2,
bottom = 405 + CoD.TextSettings.NormalFont.Height / 2,
alignment = LUI.Alignment.Left
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "DPAD", f16_local16, {
xbox = {
left = 56,
right = 356,
top = 467,
bottom = 467 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
xb3 = {
left = 56,
right = 356,
top = 472,
bottom = 472 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
ps3 = {
left = -278,
right = 22,
top = 340,
bottom = 340 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
ps4 = {
left = -300,
right = 0,
top = 295,
bottom = 295 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
vita = {
left = -300,
right = 0,
top = 200,
bottom = 200 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
},
wiiu = {
left = -300,
right = 0,
top = 295,
bottom = 295 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Right
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "back", f16_local17, {
xbox = {
left = 84,
right = 384,
top = 75 - CoD.TextSettings.NormalFont.Height,
bottom = 75,
alignment = LUI.Alignment.Center
},
xb3 = {
left = 92,
right = 392,
top = 80 - CoD.TextSettings.NormalFont.Height,
bottom = 80,
alignment = LUI.Alignment.Center
},
ps3 = {
left = 90,
right = 390,
top = 78 - CoD.TextSettings.NormalFont.Height,
bottom = 78,
alignment = LUI.Alignment.Center
},
ps4 = {
left = 90,
right = 390,
top = 78 - CoD.TextSettings.NormalFont.Height,
bottom = 78,
alignment = LUI.Alignment.Center
},
vita = {
left = -164,
right = 672,
top = 154,
bottom = 154 + CoD.TextSettings.NormalFont.Height,
alignment = LUI.Alignment.Center
},
wiiu = {
left = 90,
right = 390,
top = 78 - CoD.TextSettings.NormalFont.Height,
bottom = 78,
alignment = LUI.Alignment.Center
}
} )
f16_local5.children[#f16_local5.children + 1] = button_text_overlay( "start", f16_local18, {
xbox = {
left = 194,
right = 494,
top = 107 - CoD.TextSettings.NormalFont.Height,
bottom = 107,
alignment = LUI.Alignment.Center
},
xb3 = {
left = 195,
right = 495,
top = 112 - CoD.TextSettings.NormalFont.Height,
bottom = 112,
alignment = LUI.Alignment.Center
},
ps3 = {
left = 197,
right = 497,
top = 112 - CoD.TextSettings.NormalFont.Height,
bottom = 112,
alignment = LUI.Alignment.Center
},
ps4 = {
left = 197,
right = 497,
top = 112 - CoD.TextSettings.NormalFont.Height,
bottom = 112,
alignment = LUI.Alignment.Center
},
vita = {
left = 520,
right = 670,
top = 452 - CoD.TextSettings.NormalFont.Height,
bottom = 452,
alignment = LUI.Alignment.Left
},
wiiu = {
left = 197,
right = 497,
top = 112 - CoD.TextSettings.NormalFont.Height,
bottom = 112,
alignment = LUI.Alignment.Center
}
} )
return f16_local5
end
end
f16_local4 = "@MENU_OBJECTIVES_MENU"
end
end
f16_local2 = "@MENU_USE_EQUIPMENT"
end
function buttons_overlay()
local f17_local0 = nil
if Engine.IsVita() then
f17_local0 = RegisterMaterial( "cont_lines_btn_vita" )
else
f17_local0 = RegisterMaterial( "cont_lines_btn" )
end
local f17_local1 = {
type = "UIImage",
id = "controller_lines",
states = {
default = {
topAnchor = true,
bottomAnchor = false,
leftAnchor = true,
rightAnchor = false,
material = f17_local0
}
}
}
local f17_local2 = {}
f17_local1.children = buttons_texts_overlay()
if Engine.IsVita() then
f17_local1.states.default.top = 0
f17_local1.states.default.left = 13
elseif debugPlaystation then
f17_local1.states.default.top = -38
f17_local1.states.default.left = 13
elseif Engine.IsPS4() then
f17_local1.states.default.top = -38
f17_local1.states.default.left = 13
elseif Engine.IsPS3() then
f17_local1.states.default.top = -38
f17_local1.states.default.left = 13
elseif Engine.IsWiiU() then
f17_local1.states.default.top = -38
f17_local1.states.default.left = 55
elseif Engine.IsXB3() then
f17_local1.states.default.top = -30
f17_local1.states.default.left = 9
else
f17_local1.states.default.top = -40
f17_local1.states.default.left = 12
end
f17_local1.states.default.bottom = f17_local1.states.default.top + 512
f17_local1.states.default.right = f17_local1.states.default.left + 572
return f17_local1
end
function menu_base( f18_arg0, f18_arg1, f18_arg2 )
local f18_local0 = {
type = "UIElement",
id = f18_arg0 .. "_layout_root_id",
states = {
default = {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = 0,
bottom = 0,
left = 0,
right = 0
}
},
handlers = {
menu_create = MainCreate,
omnvar_update = {
ui_pause_menu_show = layoutMenuClose
}
},
children = {}
}
if Engine.InFrontend() then
f18_local0.children[#f18_local0.children + 1] = {
type = "UIImage",
id = "stick_button_darken_overlay",
states = {
default = CoD.ColorizeState( Swatches.Overlay.Color, {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = 0,
bottom = 0,
left = 0,
right = 0,
alpha = Swatches.Overlay.AlphaMore,
material = RegisterMaterial( "white" )
} )
}
}
end
if not Engine.InFrontend() then
f18_local0.children[#f18_local0.children + 1] = {
type = "UIWorldBlur",
id = "world_blur_id",
states = {
default = {
worldBlur = 5
}
}
}
f18_local0.children[#f18_local0.children + 1] = {
type = "UIImage",
id = "pause_background",
states = {
default = {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = 0,
bottom = 0,
left = 0,
right = 0,
alpha = 0.5,
material = RegisterMaterial( "black" )
}
}
}
end
f18_local0.children[#f18_local0.children + 1] = {
type = "generic_menu_title",
properties = {
menu_title = Engine.Localize( f18_arg1 )
}
}
f18_local0.children[#f18_local0.children + 1] = {
type = "button_helper_text_main",
id = "button_helper_text_id"
}
f18_local0.children[#f18_local0.children + 1] = {
type = "generic_back_button",
id = "back_button_id"
}
local f18_local1 = nil
if Engine.IsVita() then
f18_local1 = RegisterMaterial( "cont_vita" )
else
f18_local1 = RegisterMaterial( "cont" )
end
local f18_local2, f18_local3 = nil
if Engine.UsingSplitscreenUpscaling() then
f18_local3 = 0.65
local f18_local4 = 606 * f18_local3
local f18_local5 = {}
f18_local5 = GameX.GetSafeZoneSize()
f18_local2 = {
leftAnchor = false,
rightAnchor = true,
topAnchor = false,
bottomAnchor = false,
top = (f18_local5[4] + f18_local5[2]) / 2,
right = f18_local5[3] - f18_local4 / 2 - 130,
height = 0,
width = 0
}
else
f18_local3 = 1
f18_local2 = {
leftAnchor = true,
rightAnchor = false,
topAnchor = true,
bottomAnchor = false,
left = 728,
top = 406,
height = 0,
width = 0
}
end
local f18_local6 = Engine.UsingSplitscreenUpscaling()
local f18_local7 = Engine.IsPS3()
local f18_local8 = f18_local0.children
f18_local8[#f18_local0.children + 1] = {
type = "UIElement",
states = {
default = f18_local2
},
children = {
{
type = "UIElement",
id = "controller_container",
states = {
default = {
leftAnchor = false,
rightAnchor = false,
topAnchor = false,
bottomAnchor = false,
width = 606,
height = 512,
scale = f18_local3 - 1
}
},
children = {
{
type = "UIImage",
id = "controller",
states = {
default = {
topAnchor = true,
bottomAnchor = false,
leftAnchor = true,
rightAnchor = false,
top = 0,
bottom = 512,
left = 0,
width = 606,
material = f18_local1
}
}
},
f18_arg2
}
}
}
}
local f18_local4 = f18_local6 and f18_local7 or f18_local8
return f18_local0
end
function sticks_layout()
local f19_local0 = menu_base( "sticks", "@MENU_STICK_LAYOUT_CAP", sticks_overlay() )
f19_local0.children[#f19_local0.children + 1] = layout_buttons_vlist( GetSticksConfig, SetSticksConfig, {
{
name = "thumbstick_default",
display_name = "MENU_DEFAULT"
},
{
name = "thumbstick_southpaw",
display_name = "MENU_SOUTHPAW"
},
{
name = "thumbstick_legacy",
display_name = "MENU_LEGACY"
},
{
name = "thumbstick_legacysouthpaw",
display_name = "MENU_LEGACY_SOUTHPAW"
},
{
name = "thumbstick_southpaw_ns",
display_name = "MENU_SOUTHPAW_NS"
},
{
name = "thumbstick_legacysouthpaw_ns",
display_name = "MENU_LEGACY_SOUTHPAW_NS"
}
} )
return f19_local0
end
function buttons_layout()
local f20_local0 = menu_base( "buttons", "@MENU_BUTTON_LAYOUT_CAP", buttons_overlay() )
local f20_local1 = {
{
name = "buttons_default",
display_name = "MENU_DEFAULT"
},
{
name = "buttons_tactical",
display_name = "MENU_TACTICAL"
},
{
name = "buttons_lefty",
display_name = "MENU_LEFTY"
},
{
name = "buttons_nomad",
display_name = "MENU_NOMAD"
},
{
name = "buttons_nomad_tactical",
display_name = "MENU_NOMAD_TACTICAL"
}
}
if Engine.IsPS3() or Engine.IsPS4() or debugPlaystation then
f20_local1[#f20_local1 + 1] = {
name = "buttons_default_alt",
display_name = "MENU_DEFAULT_ALT"
}
f20_local1[#f20_local1 + 1] = {
name = "buttons_tactical_alt",
display_name = "MENU_TACTICAL_ALT"
}
f20_local1[#f20_local1 + 1] = {
name = "buttons_lefty_alt",
display_name = "MENU_LEFTY_ALT"
}
f20_local1[#f20_local1 + 1] = {
name = "buttons_nomad_alt",
display_name = "MENU_NOMAD_ALT"
}
f20_local1[#f20_local1 + 1] = {
name = "buttons_nomad_tactical_alt",
display_name = "MENU_NOMAD_TACTICAL_ALT"
}
end
f20_local0.children[#f20_local0.children + 1] = layout_buttons_vlist( GetButtonsConfig, SetButtonsConfig, f20_local1 )
return f20_local0
end
function MainCreate( f21_arg0, f21_arg1 )
f21_arg0:dispatchEventToRoot( {
name = "add_button_helper_text",
button_ref = "button_secondary",
helper_text = Engine.Localize( "@LUA_MENU_BACK" ),
side = "left",
clickable = true
} )
end
LUI.MenuBuilder.registerDef( "thumbstick", sticks_layout )
LUI.MenuBuilder.registerDef( "buttons", buttons_layout )
LockTable( _M )