UGCProjects/BoltGods/Script/UI/WB_PlayerInfo.lua
2025-01-04 23:00:19 +08:00

47 lines
1.2 KiB
Lua

---@class WB_PlayerInfo_C:UUserWidget
---@field HorizontalBox_Title UHorizontalBox
---@field Overlay_Tile_AddFriend UOverlay
---@field ScrollBox_Items UScrollBox
---@field TextBlock_Assist UTextBlock
---@field TextBlock_Damage UTextBlock
---@field TextBlock_Dead UTextBlock
---@field TextBlock_Kill UTextBlock
---@field TextBlock_PlayerName UTextBlock
--Edit Below--
---@type WB_PlayerInfo_C
local WB_PlayerInfo = { bInitDoOnce = false; };
function WB_PlayerInfo:Construct()
self:LuaInit();
end
WB_PlayerInfo.HeadIcons = {};
function WB_PlayerInfo:LuaInit()
if self.bInitDoOnce then return ; end
UITool.ForeachAllChildren(self.ScrollBox_Items, function(index, Widget)
Widget:LuaInit();
end)
self.bInitDoOnce = true;
end
function WB_PlayerInfo:SetKDAItems(InItems)
UITool.ForeachAllChildren(self.ScrollBox_Items, function(index, Widget)
if InItems[index] then
Widget:SetKDAItem(InItems[index]);
Widget:SetVisibility(ESlateVisibility.SelfHitTestInvisible);
else
Widget:SetVisibility(ESlateVisibility.Collapsed);
end
end);
end
-- function WB_PlayerInfo:Tick(MyGeometry, InDeltaTime)
-- end
-- function WB_PlayerInfo:Destruct()
-- end
return WB_PlayerInfo;