73 lines
1.8 KiB
Lua
73 lines
1.8 KiB
Lua
---@class WB_KeyMapItemDash_C:UUserWidget
|
|
---@field Image_Select UImage
|
|
---@field TargetWidgetName FString
|
|
--Edit Below--
|
|
---@type WB_KeyMapItemDash_C
|
|
local WB_KeyMapItemShop = {
|
|
bInitDoOnce = false;
|
|
TouchDelegation = {};
|
|
}
|
|
--local KeyMapItemBase = require('Script.UI.StatusUI.FightPanel.KeyMapSetting.KeyMapItemBase')
|
|
--
|
|
--local WB_KeyMapItemShop = setmetatable(
|
|
-- {
|
|
-- },
|
|
-- {
|
|
-- __index = KeyMapItemBase,
|
|
-- __metatable = KeyMapItemBase
|
|
-- }
|
|
--);
|
|
|
|
---@param MyGeometry:FGeometry
|
|
---@param InTouchEvent:FPointerEvent
|
|
function WB_KeyMapItemShop:OnTouchStarted(MyGeometry, InTouchEvent)
|
|
UGCLogSystem.Log("[WB_KeyMapItemShop_OnTouchStarted]")
|
|
self:TouchWidget(true)
|
|
end
|
|
|
|
---@param MyGeometry:FGeometry
|
|
---@param InTouchEvent:FPointerEvent
|
|
function WB_KeyMapItemShop:OnTouchEnded(MyGeometry, InTouchEvent)
|
|
UGCLogSystem.Log("[WB_KeyMapItemShop_OnTouchEnded]")
|
|
self:TouchWidget(false)
|
|
end
|
|
|
|
function WB_KeyMapItemShop:AddTouchDelegation(InFun, InObj)
|
|
self.TouchDelegation[#self.TouchDelegation + 1] = {Fun = InFun, Obj = InObj}
|
|
end
|
|
|
|
function WB_KeyMapItemShop:TouchWidget(bTouch)
|
|
for _, FunData in pairs(self.TouchDelegation) do
|
|
if FunData.Obj then
|
|
FunData.Fun(FunData.Obj, self, bTouch)
|
|
else
|
|
FunData.Fun(self, bTouch)
|
|
end
|
|
end
|
|
end
|
|
|
|
function WB_KeyMapItemShop:SetSelect(IsSelect)
|
|
if self.Image_Select then
|
|
if IsSelect then
|
|
self.Image_Select:SetVisibility(ESlateVisibility.Visible)
|
|
else
|
|
self.Image_Select:SetVisibility(ESlateVisibility.Collapsed)
|
|
end
|
|
end
|
|
end
|
|
|
|
--[==[ Construct
|
|
function WB_KeyMapItemShop:Construct()
|
|
|
|
end
|
|
-- Construct ]==]
|
|
|
|
-- function WB_KeyMapItemShop:Tick(MyGeometry, InDeltaTime)
|
|
|
|
-- end
|
|
|
|
-- function WB_KeyMapItemShop:Destruct()
|
|
|
|
-- end
|
|
|
|
return WB_KeyMapItemShop; |