Here's my current diff against FilterIt 2.9
diff Code:
diff -ru autoupdate/unpacked/FilterIt/FilterIt.lua modified/FilterIt/FilterIt.lua
--- autoupdate/unpacked/FilterIt/FilterIt.lua 2015-08-10 05:24:30.000000000 +0200
+++ modified/FilterIt/FilterIt.lua 2015-08-25 13:28:05.000000000 +0200
@@ -77,10 +77,6 @@
FilterIt.SetFilterActivation(ZO_PlayerBankTabs.m_object.m_currentSubMenuBar)
FilterIt.SetFilterActivation(ZO_GuildBankTabs.m_object.m_currentSubMenuBar)
- -- Changes the layouts for the inventories: Trading House
- -- Moved to player activation to watch & see if AGS gets loaded
- FilterIt.LayoutTradingHouse()
-
-- Unregister here to catch loaded addons
EVENT_MANAGER:UnregisterForEvent(FilterIt.name, EVENT_ADD_ON_LOADED)
@@ -164,7 +160,6 @@
FilterIt.HookInvButtons()
-- Changes the layouts for the inventories: backpack, bank, & guild bank, mail, exc..
- -- Trading House layout is called in player Activation for AGS compatability
FilterIt.SetLayouts()
FilterIt.BuildImprovementPanelTabMenu()
diff Code:
diff -ru autoupdate/unpacked/FilterIt/Layout/FilterIt_InvLayout.lua modified/FilterIt/Layout/FilterIt_InvLayout.lua
--- autoupdate/unpacked/FilterIt/Layout/FilterIt_InvLayout.lua 2015-07-22 20:27:20.000000000 +0200
+++ modified/FilterIt/Layout/FilterIt_InvLayout.lua 2015-08-25 13:41:47.000000000 +0200
@@ -7,22 +7,10 @@
local function LayoutBackpack()
ZO_PlayerInventorySearchBox:SetDimensions(SEARCH_BOX_WIDTH, SEARCH_BOX_HEIGHT)
- -- Trading house is handled in a separate function due to other checks
- -- that need to be made for AGS & other code that needs to be run.
- local tBackpackLayouts = {
- [1] = BACKPACK_BANK_LAYOUT_FRAGMENT.layoutData,
- [2] = BACKPACK_MENU_BAR_LAYOUT_FRAGMENT.layoutData,
- [3] = BACKPACK_MAIL_LAYOUT_FRAGMENT.layoutData,
- [4] = BACKPACK_PLAYER_TRADE_LAYOUT_FRAGMENT.layoutData,
- [5] = BACKPACK_STORE_LAYOUT_FRAGMENT.layoutData,
- [6] = BACKPACK_FENCE_LAYOUT_FRAGMENT.layoutData,
- [7] = BACKPACK_LAUNDER_LAYOUT_FRAGMENT.layoutData,
- --[5] = BACKPACK_TRADING_HOUSE_LAYOUT_FRAGMENT.layoutData,
- }
- for k,v in pairs(tBackpackLayouts) do
- v.backpackOffsetY = 136
- v.sortByOffsetY = 103
- end
+ -- this enables filters on guild store SELL tab
+ local libCIF = LibStub:GetLibrary("libCommonInventoryFilters")
+ libCIF:addBackpackLayoutShiftY(40)
+ libCIF:disableSearchBoxes()
--local FilterItInventoryDivider = CreateControlFromVirtual("FilterIt_InventoryDivider", ZO_PlayerInventory, "ZO_InventoryFilterDivider")
-- Changed Parent for AGS
@@ -75,45 +63,10 @@
FilterItBankDivider:SetAnchor(point0, relativeTo0, relativePoint0, offsetX0, offsetY0+5)
end
-function FilterIt.LayoutTradingHouse()
- if FilterIt.loadedAddons["AwesomeGuildStore"] then return end
-
- local layoutData = BACKPACK_TRADING_HOUSE_LAYOUT_FRAGMENT.layoutData
- local sellFiltersEnabled = layoutData.sellFiltersEnabled
- -- Check if someone has already enabled it:
- if sellFiltersEnabled then return end
-
- -- Check if its turned on in my addon:
- --if not MY_ADDON_SETTING_ON then return end
-
- -- Set flag:
- layoutData.sellFiltersEnabled = true
-
- -- Set the new layoutData:
- layoutData.inventoryTopOffsetY = 43
- layoutData.hiddenFilters = { [ITEMFILTERTYPE_QUEST] = true }
- local origAdditionalFilter = layoutData.additionalFilter
- layoutData.additionalFilter = function (slot)
- return origAdditionalFilter(slot) and (not IsItemBound(slot.bagId, slot.slotIndex))
- end
-
- -- Prehook HandleTabSwitch for sell mode:
- local function OnHandleTabSwitch(self, tabData)
- local mode = tabData.descriptor
-
- if mode == ZO_TRADING_HOUSE_MODE_SELL then
- ZO_PlayerInventoryTabs:SetHidden(false)
- end
- return false
- end
- ZO_PreHook(TRADING_HOUSE, "HandleTabSwitch", OnHandleTabSwitch)
-end
function FilterIt.SetLayouts()
LayoutBackpack()
LayoutBank()
LayoutGuildBank()
- -- Changed, this is now called in player Activation for AGS compatability
- --LayoutTradingHouse()
end
It works regardless of AGS setting "disable custom selltab filter". Although with that setting OFF, the search box slightly overlaps subfilters or items, because it's at FilterIt position. But once you turn it ON, FilterIt shows up on the sell tab, and it looks good.