View Single Post
04/25/19, 04:31 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,976
No bug - Mouse driver issue or code param "button" globally known and wrong?

Just a guess but is there an OnMouseUp event for the inventorySlots as well and did you try if this function works for the middle mouse?
I got some problems with OnClick events in the past and toptally changed to the OnMosueDown and OnMouseUp stuff then, as e.g. labels or other controls don't have an OnClicked event as it seems.

Edit:
Seems there is only this global function, so this really might be a bug if MOUSE_BUTTON_INDEX_MIDDLE is not given

Lua Code:
  1. function ZO_InventorySlot_OnSlotClicked(inventorySlot, button)
  2.     inventorySlot = ZO_InventorySlot_GetInventorySlotComponents(inventorySlot)
  3.     if button == MOUSE_BUTTON_INDEX_LEFT then
  4.         -- Left clicks are only used as drops at the moment, use the receive drag handlers
  5.         ZO_InventorySlot_OnReceiveDrag(inventorySlot)
  6.     elseif button == MOUSE_BUTTON_INDEX_RIGHT then
  7.         -- Right clicks only open the context menu
  8.         if ShouldHandleClick(inventorySlot) then
  9.             ZO_InventorySlot_ShowContextMenu(inventorySlot)
  10.         end
  11.     end
  12. end

I'll test this also with my mouse, maybe it's a driver issue or whatever. Will report here

Edit:
After some tests it works fine for me and my mouse.
Also on the mail send panel!
Chat output will be:


So this seems to be related to your code (maybe change the variable name button to p_button like I did!) or to your mouse driver

Last edited by Baertram : 04/25/19 at 04:42 AM.
  Reply With Quote