working on alt click change for tbc compatibility

This commit is contained in:
Manuel Simon Hirsig
2016-03-23 17:47:25 +01:00
parent c6665f0650
commit b2b429f6ca
2 changed files with 14 additions and 8 deletions
+3 -4
View File
@@ -144,14 +144,13 @@ local methods = {
DressUpItemLink(this.row.data.record.hyperlink)
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)
if this.rt.handlers.OnCellAltClick then
this.rt.handlers.OnCellAltClick(this, button)
end
end
end,
+11 -4
View File
@@ -697,12 +697,19 @@ function public.on_load()
private.results_listing:Show()
private.results_listing:SetSort(9)
private.results_listing:Clear()
private.results_listing:SetHandler('OnCellAltClick', function(cell, button)
private.results_listing:SetSelectedRecord(nil)
private.find_auction_and_bid(cell.row.data.record, button == 'LeftButton')
end)
private.results_listing:SetHandler('OnSelectionChanged', function(rt, datum)
if not datum then return end
if IsAltKeyDown() and private.results_listing:GetSelection() == datum then
if arg1 == 'LeftButton' and private.buyout_button:IsEnabled() then
private.buyout_button:Click()
return
elseif arg1 == 'RightButton' and private.bid_button:IsEnabled() then
private.bid_button:Click()
return
end
end
private.find_auction(datum.record)
end)