View Single Post
03/11/15, 06:27 PM   #4
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
EDITED:

This zoom animation is done in function ZO_InventorySlot_OnMouseEnter(inventorySlot). However this function uses local table InventoryEnter, so it won't be easy to redefine it. You will need to copy function without animation part and whole InventoryEnter table.

I was thinking about changing endScale for each slot (buttonPart.animation:GetFirstAnimation():SetEndScale(1)), but animation will still be called at least for the first time.

Maybe redefining template, but is it possible without hooking ANIMATION_MANAGER? This seems to be too much "hacky":

XML part:
Lua Code:
  1. <GuiXml>
  2.     <Animations>
  3.         <AnimationTimeline name="New_IconSlotMouseOverAnimation">
  4.             <Animations>
  5.                 <ScaleAnimation duration="125" startScale="1" endScale="1"/>
  6.             </Animations>
  7.         </AnimationTimeline>
  8.     </Animations>
  9. </GuiXml>

Lua part:
Lua Code:
  1. local CreateTimelineFromVirtual_orig = ANIMATION_MANAGER.CreateTimelineFromVirtual
  2. ANIMATION_MANAGER.CreateTimelineFromVirtual = function(self, template, ...)
  3.     if template == "IconSlotMouseOverAnimation" then
  4.         template = "New_IconSlotMouseOverAnimation"
  5.     end
  6.     return CreateTimelineFromVirtual_orig(self, template, ...)
  7. end

Last edited by Garkin : 03/11/15 at 06:49 PM.
  Reply With Quote