172 lines
4.6 KiB
Lua
172 lines
4.6 KiB
Lua
local f0_local0 = module
|
|
local f0_local1, f0_local2 = ...
|
|
f0_local0( f0_local1, package.seeall )
|
|
CoD.PrintModuleLoad( _NAME )
|
|
f0_local0 = 1.2
|
|
function playerCardHudDef()
|
|
local f1_local0 = RegisterMaterial( "white" )
|
|
local f1_local1 = RegisterMaterial( "card_bg" )
|
|
local self = LUI.UIElement.new()
|
|
self.id = "playerCard"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
local f1_local3 = LUI.UIImage.new()
|
|
f1_local3.id = "playerCard"
|
|
f1_local3:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = 0,
|
|
height = 64 * f0_local0 + 10,
|
|
width = 256 * f0_local0 + 75,
|
|
material = f1_local1
|
|
} )
|
|
f1_local3:animateToState( "default", 0 )
|
|
local f1_local4 = LUI.UIImage.new()
|
|
f1_local4.id = "playerCardBg"
|
|
f1_local4:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
bottom = -15,
|
|
right = -43,
|
|
height = 32 * f0_local0,
|
|
width = 256 * f0_local0,
|
|
material = f1_local1
|
|
} )
|
|
f1_local4:animateToState( "default", 0 )
|
|
local f1_local5 = LUI.UIImage.new()
|
|
f1_local5.id = "playerCardPatchBg"
|
|
f1_local5:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = 0,
|
|
height = 64 * f0_local0,
|
|
width = 64 * f0_local0,
|
|
material = f1_local0
|
|
} )
|
|
f1_local5:animateToState( "default", 0 )
|
|
local f1_local6 = LUI.UIImage.new()
|
|
f1_local6.id = "playerCardPatch"
|
|
f1_local6:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = 0,
|
|
height = 64 * f0_local0,
|
|
width = 64 * f0_local0,
|
|
material = f1_local0
|
|
} )
|
|
f1_local6:animateToState( "default", 0 )
|
|
local f1_local7 = LUI.UIMarqueeText.new()
|
|
f1_local7.id = "playerCardNameText"
|
|
f1_local7:setText( "" )
|
|
f1_local7:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 13,
|
|
left = 75,
|
|
height = CoD.TextSettings.HudEuroMedSmallFont.Height,
|
|
width = 255,
|
|
font = CoD.TextSettings.HudEuroMedSmallFont.Font,
|
|
alignment = LUI.Alignment.Left
|
|
} )
|
|
f1_local7:animateToState( "default", 0 )
|
|
local f1_local8 = LUI.UIText.new()
|
|
f1_local8.id = "playerCardQuipText"
|
|
f1_local8:setText( "" )
|
|
f1_local8:setTextStyle( CoD.TextStyle.Shadowed )
|
|
f1_local8:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = -38,
|
|
left = 75,
|
|
height = CoD.TextSettings.HudEuroMedTinyFont.Height,
|
|
width = 512,
|
|
font = CoD.TextSettings.HudEuroMedTinyFont.Font,
|
|
alignment = LUI.Alignment.Left
|
|
} )
|
|
f1_local8:animateToState( "default", 0 )
|
|
local f1_local9 = LUI.UIText.new()
|
|
f1_local9.id = "playerCardClanTagText"
|
|
f1_local9:setText( "" )
|
|
f1_local9:setTextStyle( CoD.TextStyle.Shadowed )
|
|
f1_local9:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = -15,
|
|
left = 75,
|
|
height = CoD.TextSettings.HudEuroMedTinyFont.Height,
|
|
width = 512,
|
|
font = CoD.TextSettings.HudEuroMedTinyFont.Font,
|
|
alignment = LUI.Alignment.Left
|
|
} )
|
|
f1_local9:animateToState( "default", 0 )
|
|
local f1_local10 = LUI.UIImage.new()
|
|
f1_local10.id = "playerCardRankIcon"
|
|
f1_local10:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
bottom = -13,
|
|
right = -90,
|
|
height = 32,
|
|
width = 32,
|
|
material = f1_local0
|
|
} )
|
|
f1_local10:animateToState( "default", 0 )
|
|
local f1_local11 = LUI.UIText.new()
|
|
f1_local11.id = "playerCardRankText"
|
|
f1_local11:setText( "" )
|
|
f1_local11:setTextStyle( CoD.TextStyle.Outlined )
|
|
f1_local11:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
bottom = -9,
|
|
right = -47,
|
|
height = CoD.TextSettings.HudEuroBigFont.Height + 10,
|
|
width = 64,
|
|
font = CoD.TextSettings.HudEuroBigFont.Font,
|
|
alignment = LUI.Alignment.Right,
|
|
red = 1,
|
|
green = 1,
|
|
blue = 1
|
|
} )
|
|
f1_local11:animateToState( "default", 0 )
|
|
f1_local3:addElement( f1_local4 )
|
|
f1_local3:addElement( f1_local5 )
|
|
f1_local3:addElement( f1_local6 )
|
|
f1_local3:addElement( f1_local7 )
|
|
f1_local3:addElement( f1_local8 )
|
|
f1_local3:addElement( f1_local9 )
|
|
f1_local3:addElement( f1_local10 )
|
|
f1_local3:addElement( f1_local11 )
|
|
self:addElement( f1_local3 )
|
|
return self
|
|
end
|
|
|
|
LUI.MenuBuilder.registerType( "playerCardHudDef", playerCardHudDef )
|
|
LockTable( _M )
|