tooltips for post and left click search shortcuts

This commit is contained in:
Manuel Simon Hirsig
2016-03-23 01:08:02 +01:00
parent 7b633191bb
commit 4d7c3772ae
6 changed files with 44 additions and 24 deletions
+4 -2
View File
@@ -38,7 +38,7 @@ function public.render(item_listing)
end
end
function public.create(parent, on_click, selected)
function public.create(parent, on_click, on_enter, on_leave, selected)
local name = (parent:GetName() or '')..'aux_item_list'
local id = 1
@@ -80,17 +80,19 @@ function public.create(parent, on_click, selected)
row:SetScript('OnClick', on_click)
row:SetScript('OnEnter', function()
row.highlight:Show()
on_enter()
end)
row:SetScript('OnLeave', function()
if not selected(row.item_record) then
row.highlight:Hide()
end
on_leave()
end)
local item = CreateFrame('Frame', name..'_item'..row_index, row, 'AuxItemTemplate')
row.item = item
item:SetPoint('CENTER', 4, 0)
-- row:RegisterForClicks('LeftButtonDown', 'RightButtonDown')
row:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
local highlight = row:CreateTexture()
highlight:SetAllPoints(item)