ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   Help revive this code. (https://www.esoui.com/forums/showthread.php?t=7946)

KLISK 07/23/18 08:24 AM

Help revive this code.
 
Code:

local function CreateSlotAnimation(inventorySlot)
        if inventorySlot.slotControlType == "listSlot" then
                local control = inventorySlot
                local controlType = inventorySlot:GetType()

                if (controlType == CT_CONTROL and control.slotControlType == "listSlot") then
                control = inventorySlot:GetNamedChild("MultiIcon") or inventorySlot:GetNamedChild("Button")
                end

                if (control and not control.animation) then
                control.animation = ANIMATION_MANAGER:CreateTimelineFromVirtual("IconSlotMouseOverAnimation", control)
                control.animation:GetFirstAnimation():SetEndScale(1)
                end
        end
end
ZO_PreHook("ZO_InventorySlot_OnMouseEnter", CreateSlotAnimation)

It must turn off the animation of the inventory icons.

Baertram 07/23/18 10:31 AM

What is the error you get and when do you get it? Without any error message it's hard to see what is wrong.

If you want to disable hte animations try this:
Lua Code:
  1. if (control and not control.animation) then
  2. --[[
  3.         control.animation = ANIMATION_MANAGER:CreateTimelineFromVirtual("IconSlotMouseOverAnimation", control)
  4.         control.animation:GetFirstAnimation():SetEndScale(1)
  5. ]]
  6. end


All times are GMT -6. The time now is 05:27 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI