shirsig / aux-addon

Auction House addOn for Classic (1.13) IMPORTANT: The folder name must be "aux-addon" IMPORTANT: The Vanilla (1.12) version moved here https://github.com/shirsig/aux-addon-vanilla
https://www.curseforge.com/wow/addons/aux
196 stars 42 forks source link

Right click craft item to search it without typing the name #308

Open sipertruk opened 3 years ago

sipertruk commented 3 years ago

What annoys me is we can search the reagents with a right click in the craft frame but not the crafted item itself, making it mandatory to type the name in the aux frame. After some research it can be achieved with the following in crafting.lua :

    local function hook_skill_item(f)
        f:SetScript('OnMouseUp', function(self, button)
            if button == 'RightButton' then
                if aux.get_tab() then
                    aux.set_tab(1)
                    search_tab.set_filter(TradeSkillSkillName:GetText() .. '/exact')
                    search_tab.execute(nil, false)
                end
            end
        end)
    end

and then in function trade_skill_ui_loaded() :

        hook_skill_item(_G['TradeSkillSkillIcon'])