34 lines
904 B
Lua
34 lines
904 B
Lua
---@class WBP_WeaponDetailsDesc_C:UUserWidget
|
|
---@field TextBlock_Desc UTextBlock
|
|
---@field WidgetHeader UWBP_WidgetHeader_C
|
|
--Edit Below--
|
|
local WBP_WeaponDetailsDesc = {
|
|
bInitDoOnce = false;
|
|
};
|
|
|
|
function WBP_WeaponDetailsDesc:Construct()
|
|
WBP_WeaponDetailsDesc.SuperClass:Construct()
|
|
self.WidgetHeader:Construct()
|
|
end
|
|
|
|
function WBP_WeaponDetailsDesc:OnShowPanel()
|
|
local Pawn = GameDataManager.GetLocalPlayerPawn()
|
|
local WeaponType = GameDataManager.GetWeaponType(Pawn.WeaponActor.CurrentWeaponId)
|
|
if WeaponType == nil then
|
|
UE.Log("[WBP_WeaponDetailsDesc:OnShowPanel] Data is nil")
|
|
return
|
|
end
|
|
local Table = DropItemMap.WeaponTable[WeaponType]
|
|
self.WidgetHeader:SetHeaderText(Table.Desc)
|
|
self.TextBlock_Desc:SetText(Table.Prop)
|
|
end
|
|
|
|
-- function WBP_WeaponDetailsDesc:Tick(MyGeometry, InDeltaTime)
|
|
|
|
-- end
|
|
|
|
-- function WBP_WeaponDetailsDesc:Destruct()
|
|
|
|
-- end
|
|
|
|
return WBP_WeaponDetailsDesc; |