UGCProjects/SoldierWar/Script/UI/SelectWeapons/Child/WB_SelectWeaponOtherItem.lua

30 lines
778 B
Lua
Raw Permalink Normal View History

2025-01-04 23:00:19 +08:00
---@class WB_SelectWeaponOtherItem_C:UUserWidget
---@field Image_PartIcon UImage
---@field TextBlock_Count UTextBlock
--Edit Below--
local WB_SelectWeaponOtherItem = { bInitDoOnce = false; };
--[==[ Construct
function WB_SelectWeaponOtherItem:Construct()
end
-- Construct ]==]
-- function WB_SelectWeaponOtherItem:Tick(MyGeometry, InDeltaTime)
-- end
-- function WB_SelectWeaponOtherItem:Destruct()
-- end
function WB_SelectWeaponOtherItem:SetItemId(InItemId, InItemCount)
self.ItemId = InItemId;
local Info = UGCItemSystem.GetItemData(InItemId);
UE.AsyncLoadObject(Info.ItemSmallIcon_n, function(TargetObject)
self.Image_PartIcon:SetBrushFromTexture(TargetObject);
end);
self.TextBlock_Count:SetText(tostring(InItemCount));
end
return WB_SelectWeaponOtherItem;