Thread Tools Display Modes
Prev Previous Post   Next Post Next
11/04/14, 02:32 PM   #1
Randactyl
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 251
IGV causing generic UI bug

Have a problem with Inventory Grid View causing withdraw/deposit to fail with this message:



It's because of this code:

Lua Code:
  1. --postHook function for "ZO_InventorySlot_OnMouseEnter"
  2. --Sets the ItemTooltip owner and offset so that tooltips always appear at the
  3. --beginning of a gridded row.
  4. local function ReinitializeTooltip(inventorySlot)
  5.     local isGrid = inventorySlot.isGrid
  6.     if isGrid == true then
  7.         local gridSize = InventoryGridViewSettings:GetGridSize()
  8.         local col = ((inventorySlot:GetLeft() - 1432) / gridSize) + 1
  9.         local offsetX = -(gridSize * col - gridSize)
  10.  
  11.         ItemTooltip:SetOwner(inventorySlot, RIGHT, offsetX, 0)
  12.     end
  13. end
  14.  
  15. --implementation of general postHook found on ESOUI specific to IGV's purposes
  16. local function IGV_OnMouseEnter_postHook(funcName, callback)
  17.     --"ZO_InventorySlot_OnMouseEnter" is being hooked
  18.     local tmp = _G[funcName]
  19.     _G[funcName] = function(...)
  20.         --ZO_InventorySlot_OnMouseEnter returns true if a tooltip was
  21.         --successfully shown, false if a tooltip was hidded.
  22.         local returnValue = tmp(...)
  23.         if(returnValue == true) then
  24.             --make ZO_InventorySlot_OnMouseEnter's arguments availible to
  25.             --my function.
  26.             callback(...)
  27.         end
  28.         return returnValue
  29.     end
  30. end
  31.  
  32. IGV_OnMouseEnter_postHook("ZO_InventorySlot_OnMouseEnter", ReinitializeTooltip)

But I'm not sure why. Any ideas?
I need to head to class, but this is all I'll be thinking about
  Reply With Quote
 

ESOUI » Developer Discussions » General Authoring Discussion » IGV causing generic UI bug


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off