tooltips for post and left click search shortcuts
This commit is contained in:
+4
-6
@@ -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
|
||||
|
||||
+7
-2
@@ -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')
|
||||
|
||||
+7
-2
@@ -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')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Aux = {
|
||||
version = '2.9.13',
|
||||
version = '2.9.14',
|
||||
blizzard_ui_shown = false,
|
||||
orig = {},
|
||||
}
|
||||
|
||||
+4
-2
@@ -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)
|
||||
|
||||
+21
-11
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user