---@class WB_ShowBuffSmallItem_C:UUserWidget ---@field Image_Icon UImage ---@field TextBlock_Level UTextBlock ---@field WidgetSwitcher_IsGod UWidgetSwitcher --Edit Below-- local WB_ShowBuffSmallItem = { bInitDoOnce = false; }; --[==[ Construct function WB_ShowBuffSmallItem:Construct() end -- Construct ]==] -- function WB_ShowBuffSmallItem:Tick(MyGeometry, InDeltaTime) -- end -- function WB_ShowBuffSmallItem:Destruct() -- end function WB_ShowBuffSmallItem:UpdateInfo(InIsGodOfWar, InIncreaseType, Level, IsMax) if InIsGodOfWar ~= self.IsGodOfWar or InIncreaseType ~= self.IncreaseType then self.IsGodOfWar = InIsGodOfWar self.IncreaseType = InIncreaseType if self.IsGodOfWar then self.WidgetSwitcher_IsGod:SetActiveWidgetIndex(1) self.TextBlock_Level:SetVisibility(ESlateVisibility.Collapsed) else self.WidgetSwitcher_IsGod:SetActiveWidgetIndex(0) self.TextBlock_Level:SetVisibility(ESlateVisibility.HitTestInvisible) -- 设置图案 UGCSystemLibrary.AsyncLoadAsset(GodOfWarConfig.IncreaseIcon[self.IncreaseType], function(InTex) if UE.IsValid(InTex) then self.Image_Icon:SetBrushFromTexture(InTex, false) end end, nil, true ) end end self:UpdateLevel(Level, IsMax) end function WB_ShowBuffSmallItem:GetIncreaseType() return self.IncreaseType end function WB_ShowBuffSmallItem:UpdateLevel(Level, IsMax) if IsMax then self.TextBlock_Level:SetText("Max") else self.TextBlock_Level:SetText(Level) end end return WB_ShowBuffSmallItem;