diff --git a/auction_listing.lua b/auction_listing.lua index 2549d16..f40b4ff 100644 --- a/auction_listing.lua +++ b/auction_listing.lua @@ -142,16 +142,14 @@ local methods = { if this.rt.disabled then return end if IsControlKeyDown() then DressUpItemLink(this.row.data.record.hyperlink) - elseif IsShiftKeyDown() then - if ChatFrameEditBox:IsVisible() then - ChatFrameEditBox:Insert(this.row.data.record.hyperlink) - else - Aux.search_frame.start_search(strlower(Aux.info.item(this.row.data.record.item_id).name)..'/exact') - end + elseif IsShiftKeyDown() and ChatFrameEditBox:IsVisible() then + ChatFrameEditBox:Insert(this.row.data.record.hyperlink) elseif IsAltKeyDown() then if this.rt.handlers.OnCellAltClick then this.rt.handlers.OnCellAltClick(this, button) end + elseif button == 'RightButton' then + Aux.search_frame.start_search(strlower(Aux.info.item(this.row.data.record.item_id).name)..'/exact') else this.rt:SetSelectedRecord(this.row.data.record) end diff --git a/auctions_frame.lua b/auctions_frame.lua index fcd040b..ea1416f 100644 --- a/auctions_frame.lua +++ b/auctions_frame.lua @@ -14,8 +14,13 @@ function public.on_load() { name='Start Price', width=.15, align='RIGHT' }, { name='Buy', width=.15, align='RIGHT' }, }) - private.listing:SetHandler('OnClick', function(table, row_data, column) - private.on_row_click(row_data.record) + private.listing:SetHandler('OnClick', function(table, row_data, column, button) + if button == 'LeftButton' then + private.on_row_click(row_data.record) + elseif button == 'RightButton' then + Aux.tab_group:set_tab(1) + Aux.search_frame.start_search(strlower(Aux.info.item(this.row.data.record.item_id).name)..'/exact') + end end) private.listing:SetHandler('OnEnter', function(table, row_data, column) Aux.info.set_tooltip(row_data.record.itemstring, column.row, 'ANCHOR_RIGHT') diff --git a/bids_frame.lua b/bids_frame.lua index adf459d..bcbf15e 100644 --- a/bids_frame.lua +++ b/bids_frame.lua @@ -17,8 +17,13 @@ function public.on_load() { name='Bid', width=.125, align='RIGHT' }, { name='Buy', width=.125, align='RIGHT' }, }) - private.listing:SetHandler('OnClick', function(table, row_data, column) - private.on_row_click(row_data.record) + private.listing:SetHandler('OnClick', function(table, row_data, column, button) + if button == 'LeftButton' then + private.on_row_click(row_data.record) + elseif button == 'RightButton' then + Aux.tab_group:set_tab(1) + Aux.search_frame.start_search(strlower(Aux.info.item(this.row.data.record.item_id).name)..'/exact') + end end) private.listing:SetHandler('OnEnter', function(table, row_data, column) Aux.info.set_tooltip(row_data.record.itemstring, column.row, 'ANCHOR_RIGHT') diff --git a/core.lua b/core.lua index 7003626..6cb4e0a 100644 --- a/core.lua +++ b/core.lua @@ -1,5 +1,5 @@ Aux = { - version = '2.9.13', + version = '2.9.14', blizzard_ui_shown = false, orig = {}, } diff --git a/item_listing.lua b/item_listing.lua index 592d47e..e54ae7a 100644 --- a/item_listing.lua +++ b/item_listing.lua @@ -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) diff --git a/post_frame.lua b/post_frame.lua index c30858e..8277a42 100644 --- a/post_frame.lua +++ b/post_frame.lua @@ -187,6 +187,14 @@ function public.on_load() end ClearCursor() end) +-- AuxSellParametersItemIconTexture:SetScript('OnEnter', function() +-- if selected_item then +-- Aux.info.set_tooltip(selected_item.itemstring, this, 'ANCHOR_RIGHT') +-- end +-- end) +-- AuxSellParametersItemIconTexture:SetScript('OnLeave', function() +-- GameTooltip:Hide() +-- end) do local checkbox = CreateFrame('CheckButton', nil, AuxSellInventory, 'UICheckButtonTemplate') @@ -207,20 +215,24 @@ function public.on_load() private.item_listing = Aux.item_listing.create( AuxSellInventory, function() - private.set_item(this.item_record) + if arg1 == 'LeftButton' then + private.set_item(this.item_record) + elseif arg1 == 'RightButton' then + Aux.tab_group:set_tab(1) + Aux.search_frame.start_search(strlower(Aux.info.item(this.item_record.item_id).name)..'/exact') + end + end, + function() + Aux.info.set_tooltip(this.item_record.itemstring, this, 'ANCHOR_RIGHT') + end, + function() + GameTooltip:Hide() end, function(item_record) return item_record == selected_item end ) --- private.inventory_listing:SetHandler('OnEnter', function(table, row_data, column) --- Aux.info.set_tooltip(row_data.itemstring, nil, column.row, 'ANCHOR_LEFT') --- end) --- private.inventory_listing:SetHandler('OnLeave', function() --- GameTooltip:Hide() --- end) - private.auction_listing = Aux.listing.CreateScrollingTable(AuxSellAuctions) private.auction_listing:SetColInfo({ { name='Auctions', width=.12, align='CENTER' }, @@ -839,13 +851,11 @@ function private.update_inventory_records() suffix_id = item_info.suffix_id, key = item_info.item_key, - hyperlink = item_info.hyperlink, + itemstring = item_info.itemstring, name = item_info.name, texture = item_info.texture, quality = item_info.quality, - class = item_info.type, - subclass = item_info.subtype, charges = item_info.charges, aux_quantity = item_info.charges or item_info.count, max_stack = item_info.max_stack,