31 lines
772 B
Lua
31 lines
772 B
Lua
|
---@class WB_OtherPartItem_C:UUserWidget
|
||
|
---@field Image_PartIcon UImage
|
||
|
---@field TextBlock_Count UTextBlock
|
||
|
--Edit Below--
|
||
|
local WB_OtherPartItem = { bInitDoOnce = false; };
|
||
|
|
||
|
--[==[ Construct
|
||
|
function WB_OtherPartItem:Construct()
|
||
|
|
||
|
end
|
||
|
-- Construct ]==]
|
||
|
|
||
|
-- function WB_OtherPartItem:Tick(MyGeometry, InDeltaTime)
|
||
|
|
||
|
-- end
|
||
|
|
||
|
-- function WB_OtherPartItem:Destruct()
|
||
|
|
||
|
-- end
|
||
|
|
||
|
function WB_OtherPartItem:SetItemID(InID, Count)
|
||
|
MyWeaponSystem.AsyncLoadItemSmallIconToBrush(InID, self.Image_PartIcon)
|
||
|
if Count <= 1 then
|
||
|
self.TextBlock_Count:SetVisibility(ESlateVisibility.Collapsed)
|
||
|
else
|
||
|
self.TextBlock_Count:SetText(tostring(Count))
|
||
|
self.TextBlock_Count:SetVisibility(ESlateVisibility.HitTestInvisible)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
return WB_OtherPartItem;
|