32 lines
839 B
Lua
32 lines
839 B
Lua
---@class WBP_DropItemWidget_C:UUserWidget
|
|
--Edit Below--
|
|
local WBP_DropItemWidget = { bInitDoOnce = false; };
|
|
|
|
--[==[ Construct
|
|
function WBP_DropItemWidget:Construct()
|
|
|
|
end
|
|
-- Construct ]==]
|
|
|
|
-- function WBP_DropItemWidget:Tick(MyGeometry, InDeltaTime)
|
|
|
|
-- end
|
|
|
|
-- function WBP_DropItemWidget:Destruct()
|
|
|
|
-- end
|
|
|
|
function WBP_DropItemWidget:OnDrop(MyGeometry, PointerEvent, Operation)
|
|
local ItemData = Operation:GetItemData()
|
|
if ItemData ~= nil then
|
|
-- 判断当前有几个元素
|
|
if ItemData.ItemCount == 1 then
|
|
UIManager.AllPanel[EUIType.Backpack]:OnSendGeneralSlideNum(EBagOperateType.Drop, ItemData)
|
|
else
|
|
EventSystem:SendEvent(EventType.ShowGeneralSlideWidget, EBagOperateType.Drop, Operation:GetItemData())
|
|
end
|
|
end
|
|
return self.SuperClass:OnDrop(MyGeometry, PointerEvent, Operation)
|
|
end
|
|
|
|
return WBP_DropItemWidget; |