AdiBags

AdiBags

8M Downloads

Optional search library integration?

gitsocko opened this issue ยท 2 comments

commented

I really love AdiBags! It's so easy to find things now that I can hide rarely used groups of items. The only thing I miss from my previous inventory mod (OneBag3) is more powerful search capability. OneBag3 uses a 3rd party search library called LibItemSearch (https://github.com/Jaliborc/LibItemSearch-1.2). I never noticed a performance hit while using it, and would love to have that library's search functionality. Is this something I could add to AdiBags myself by changing a few lines of code, or would it be a big chore to integrate?

commented

๐Ÿ‘ to this request.
Looks like they are just using the built in wow search.

Most of the work would need to be done in

function buttonProto:UpdateSearch()
local _, _, _, _, _, _, _, isFiltered = GetContainerItemInfo(self.bag, self.slot)
if isFiltered then
self.searchOverlay:Show();
else
self.searchOverlay:Hide();
end
end

along with the custom search handler being attached to this frame / button

local searchBox = CreateFrame("EditBox", self:GetName().."SearchBox", self, "BagSearchBoxTemplate")
searchBox:SetSize(130, 20)
searchBox:SetFrameLevel(frameLevel)
headerRightRegion:AddWidget(searchBox, -10, 130, 0, -1)
tinsert(_G.ITEM_SEARCHBAR_LIST, searchBox:GetName())

commented

See #38.