Thread Tools Display Modes
07/22/15, 12:24 PM   #21
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
I've done some tests combining libCommonInventoryFilters with the following:
  • AF ... no problem
  • AGS ... after leaving guild store, search box in inventory overlaps with sort headers
  • AGS + AF ... same problem as AGS alone, only worse because now it overlaps with AF sub-filters
  • FilterIt ... no problem
  • AGS + FilterIt ... no problem

Here's what I changed in AwesomeGuildStore:

diff Code:
  1. diff -ru autoupdate/unpacked/AwesomeGuildStore/SalesCategorySelector.lua modified/AwesomeGuildStore/SalesCategorySelector.lua
  2. --- autoupdate/unpacked/AwesomeGuildStore/SalesCategorySelector.lua 2015-07-05 14:25:22.000000000 +0200
  3. +++ modified/AwesomeGuildStore/SalesCategorySelector.lua    2015-07-24 02:28:17.000000000 +0200
  4. @@ -70,20 +70,13 @@
  5.         selector:CreateSubcategory(name, category, preset)
  6.     end
  7.  
  8. -   local searchBoxControl = ZO_PlayerInventorySearchBox
  9. -   searchBoxControl:SetDrawLayer(3) -- make sure the text box is above the sort by name field
  10.     local filterDividerControl = ZO_PlayerInventoryFilterDivider
  11. -   local sortByControl = ZO_PlayerInventorySortBy
  12.     local wasFilterDividerHidden
  13.     local function Activate()
  14. -       searchBoxControl:ClearAnchors()
  15. -       searchBoxControl:SetAnchor(TOPLEFT, sortByControl, TOPLEFT, 220, 3)
  16.         wasFilterDividerHidden = filterDividerControl:IsHidden()
  17.         filterDividerControl:SetHidden(true)
  18.     end
  19.     local function Deactivate()
  20. -       searchBoxControl:ClearAnchors()
  21. -       searchBoxControl:SetAnchor(TOPRIGHT, searchBoxControl:GetParent(), TOPRIGHT, -26, 68)
  22.         filterDividerControl:SetHidden(wasFilterDividerHidden)
  23.     end
  24.     RegisterForEvent(EVENT_OPEN_TRADING_HOUSE, Activate)
  25. @@ -221,8 +214,9 @@
  26.  local BACKPACK_TRADING_HOUSE_LAYOUT_FRAGMENT_BASIC = ZO_BackpackLayoutFragment:New(
  27.     {
  28.         width = 670,
  29. -       backpackOffsetY = 145,
  30. -       sortByOffsetY = 114,
  31. +       inventoryTopOffsetY = -20 + 65,
  32. +       backpackOffsetY = 145 - 65,
  33. +       sortByOffsetY = 114 - 65,
  34.         sortByHeaderWidth = 670,
  35.         sortByNameWidth = 352,
  36.         hideAlliancePoints = true,
  37. @@ -232,8 +226,9 @@
  38.  local BACKPACK_TRADING_HOUSE_LAYOUT_FRAGMENT_ADVANCED = ZO_BackpackLayoutFragment:New(
  39.     {
  40.         width = 670,
  41. -       backpackOffsetY = 181,
  42. -       sortByOffsetY = 149,
  43. +       inventoryTopOffsetY = -20 + 65,
  44. +       backpackOffsetY = 181 - 65,
  45. +       sortByOffsetY = 149 - 65,
  46.         sortByHeaderWidth = 670,
  47.         sortByNameWidth = 352,
  48.         hideAlliancePoints = true,

diff Code:
  1. diff -ru autoupdate/unpacked/AwesomeGuildStore/wrappers/TradingHouseWrapper.lua modified/AwesomeGuildStore/wrappers/TradingHouseWrapper.lua
  2. --- autoupdate/unpacked/AwesomeGuildStore/wrappers/TradingHouseWrapper.lua  2015-07-05 14:25:22.000000000 +0200
  3. +++ modified/AwesomeGuildStore/wrappers/TradingHouseWrapper.lua 2015-07-24 02:36:33.000000000 +0200
  4. @@ -10,6 +10,11 @@
  5.  end
  6.  
  7.  function TradingHouseWrapper:Initialize(saveData)
  8. +    local libCIF = LibStub:GetLibrary("libCommonInventoryFilters", "SILENT")
  9. +    if libCIF then
  10. +        libCIF:disableGuildStoreSellFilters()
  11. +    end
  12. +
  13.     self.saveData = saveData
  14.     local tradingHouse = TRADING_HOUSE
  15.     self.tradingHouse = tradingHouse


And here's what I changed in FilterIt:

diff Code:
  1. diff -ru autoupdate/unpacked/FilterIt/Layout/FilterIt_InvLayout.lua modified/FilterIt/Layout/FilterIt_InvLayout.lua
  2. --- autoupdate/unpacked/FilterIt/Layout/FilterIt_InvLayout.lua  2015-03-08 21:31:18.000000000 +0100
  3. +++ modified/FilterIt/Layout/FilterIt_InvLayout.lua 2015-07-22 19:42:39.000000000 +0200
  4. @@ -8,22 +8,28 @@
  5.  local function LayoutBackpack()
  6.     ZO_PlayerInventorySearchBox:SetDimensions(SEARCH_BOX_WIDTH, SEARCH_BOX_HEIGHT)
  7.    
  8. -   local tBackpackLayouts = {
  9. -   [1] = BACKPACK_BANK_LAYOUT_FRAGMENT.layoutData,
  10. -   [2] = BACKPACK_MENU_BAR_LAYOUT_FRAGMENT.layoutData,
  11. -   [3] = BACKPACK_MAIL_LAYOUT_FRAGMENT.layoutData,
  12. -   [4] = BACKPACK_PLAYER_TRADE_LAYOUT_FRAGMENT.layoutData,
  13. -   [5] = BACKPACK_STORE_LAYOUT_FRAGMENT.layoutData,
  14. -   [6] = BACKPACK_FENCE_LAYOUT_FRAGMENT.layoutData,
  15. -   [7] = BACKPACK_LAUNDER_LAYOUT_FRAGMENT.layoutData,
  16. -   --[5] = BACKPACK_TRADING_HOUSE_LAYOUT_FRAGMENT.layoutData,
  17. -   }
  18. -   for k,v in pairs(tBackpackLayouts) do
  19. -       v.backpackOffsetY = 136
  20. -       v.sortByOffsetY = 103
  21. -   end
  22. +    local libCIF = LibStub:GetLibrary("libCommonInventoryFilters", "SILENT")
  23. +    if libCIF then
  24. +        libCIF:addBackpackLayoutShiftY(40)
  25. +        libCIF:disableSearchBoxes()
  26. +    else
  27. +        local tBackpackLayouts = {
  28. +        [1] = BACKPACK_BANK_LAYOUT_FRAGMENT.layoutData,
  29. +        [2] = BACKPACK_MENU_BAR_LAYOUT_FRAGMENT.layoutData,
  30. +        [3] = BACKPACK_MAIL_LAYOUT_FRAGMENT.layoutData,
  31. +        [4] = BACKPACK_PLAYER_TRADE_LAYOUT_FRAGMENT.layoutData,
  32. +        [5] = BACKPACK_STORE_LAYOUT_FRAGMENT.layoutData,
  33. +        [6] = BACKPACK_FENCE_LAYOUT_FRAGMENT.layoutData,
  34. +        [7] = BACKPACK_LAUNDER_LAYOUT_FRAGMENT.layoutData,
  35. +        --[5] = BACKPACK_TRADING_HOUSE_LAYOUT_FRAGMENT.layoutData,
  36. +        }
  37. +        for k,v in pairs(tBackpackLayouts) do
  38. +            v.backpackOffsetY = 136
  39. +            v.sortByOffsetY = 103
  40. +        end
  41. +    end
  42.    
  43. -   local FilterItInventoryDivider = CreateControlFromVirtual("FilterIt_InventoryDivider", ZO_PlayerInventory, "ZO_InventoryFilterDivider")
  44. +   local FilterItInventoryDivider = CreateControlFromVirtual("FilterIt_InventoryDivider", ZO_PlayerInventoryTabs, "ZO_InventoryFilterDivider")
  45.     local isValidAnchor, point3, relativeTo3, relativePoint3, offsetX3, offsetY3 = ZO_PlayerInventoryBackpack:GetAnchor(0)
  46.     FilterItInventoryDivider:SetAnchor(point3, relativeTo3, relativePoint3, offsetX3, offsetY3+5)
  47.  end

Note: changing the divider's parent to ZO_PlayerInventoryTabs prevents it from showing in the guild store sell tab when it shouldn't (i.e. with AGS enabled).

Last edited by merlight : 07/23/15 at 06:36 PM.
  Reply With Quote
07/22/15, 03:29 PM   #22
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
This code is unnecessary:
Warning: Spoiler


Those columns are already hidden. If your seeing them then some other addon is messing it up:
Warning: Spoiler


Bug? Or are you only counting on me to call this function in FilterIt?
Lua Code:
  1. -- What if multiple addons call this:
  2. function libCIF:addBackpackLayoutShiftY(shiftY)
  3.     libCIF._backpackLayoutShiftY = (libCIF._backpackLayoutShiftY or 0) + shiftY
  4. end
  5. libCIF._backpackLayoutShiftY = nil
  6. libCIF:addBackpackLayoutShiftY(40) -- now its 40
  7. libCIF:addBackpackLayoutShiftY(40) -- now 80
  8. libCIF:addBackpackLayoutShiftY(40) -- now 120


Are we sure these items you left out aren't needed anywhere else?
I know that currentFilter = TradingHouseFilter is used in ShouldAddSlotToList(..) to filter out bound items...although we are breaking that by allowing the menu bar to be shown & buttons to be clicked (yes we also fixed it by adding to the additional filter to hide bound items), but are we sure its not also needed somewhere else? What about code we don't have access to?
Warning: Spoiler

This may be trivial, but by leaving those out it prevents code from knowing which btn was previously selected & returning to it. By saving the current filter, then reloading it, & then calling ZO_MenuBar_SelectDescriptor(inventory.filterBar, inventory.currentFilter) It returns the menu bar to its previously selected descriptor.

Last edited by circonian : 07/22/15 at 03:58 PM.
  Reply With Quote
07/22/15, 03:31 PM   #23
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by circonian View Post
This may be trivial, but by leaving those out it prevents code from knowing which btn was previously selected & returning to it. By saving the current filter, then reloading it, & then calling ZO_MenuBar_SelectDescriptor(inventory.filterBar, inventory.currentFilter) It returns the menu bar to its previously selected descriptor.
Well nevermind on that one, I guess that really doesn't matter because it gets reset in the apply layout
Lua Code:
  1. function ZO_InventoryManager:ApplyBackpackLayout(layoutData)
  2.    ...
  3.     ZO_MenuBar_SelectDescriptor(self.inventories[INVENTORY_BACKPACK].filterBar, ITEMFILTERTYPE_ALL)
  Reply With Quote
07/22/15, 04:04 PM   #24
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Hiding those columns is necessary, because this line in inventory.lua
Lua Code:
  1. CreateNewTabFilterData(TradingHouseFilter, INVENTORY_BACKPACK, "", "", "", tradingHouseHiddenColumns),
is essentially a hack. It adds a filter with no button texture, so you can't click it. This filter is only activated from SetTradingHouseModeEnabled, and you can't "escape" that filter because the buttons are hidden.

My override of SetTradingHouseModeEnabled doesn't switch to TradingHouseFilter, it leaves the buttons shown (that's also why I had to add not IsBound to additionalFilter, because that was done by the now-unused TradingHouseFilter). After I did this, those columns showed up, because hiddenColumns are tied to buttons. I wasn't sure about the "statValue" column, but the "age" column really doesn't fit in the SELL tab, that's why I've overridden GetTabFilterInfo.

---

libCIF._backpackLayoutShiftY -- since I haven't initialized it explicitly, and calling addBackpackLayoutShiftY is not required, it could be nil. It was a not-so-important choice where to apply laziness.

---

ZO_MenuBar_SelectDescriptor -- yes you're right. I too was wondering why swapping previousFilter/currentFilter in the original SetTradingHouseModeEnabled doesn't seem to work, I put some debug output in and found the filter was being reset before it had a hance to be remembered

---

Anyway, I forgot to add that if you guys decide to use the library, please wait until AGS is ready for it. The search box location must be sorted out first. Perhaps it would suffice if AGS didn't move the search box and just let the lib do it. I'm going to test, but tonight we've got troube with electricity due to a windstorm, can't run ESO on battery

Last edited by merlight : 07/22/15 at 04:07 PM.
  Reply With Quote
07/22/15, 04:25 PM   #25
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by merlight View Post
My override of SetTradingHouseModeEnabled doesn't switch to TradingHouseFilter...
Oh, duh. My bad your right. Why don't you want to show the statValue column though?

Originally Posted by merlight View Post
libCIF._backpackLayoutShiftY -- since I haven't initialized it explicitly, and calling addBackpackLayoutShiftY is not required, it could be nil. It was a not-so-important choice where to apply laziness.
Yes, a while later I realized I was wrong & removed that one from the post.
  Reply With Quote
07/22/15, 04:28 PM   #26
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
I don't mind if the library handles the searchbox.
The only reason I put it into that place was because some time ago the text filter on the searchtab was also in a similar location. Since I put that one into the filter bar like all the others, there is not really a reason to keep it there.
I will try to implement the necessary changes tomorrow.
  Reply With Quote
07/22/15, 04:42 PM   #27
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by circonian View Post
Oh, duh. My bad your right. Why don't you want to show the statValue column though?
Now I suspect myself of choosing the easy way out. That column is only valid for weapons and armor, so the function would need to be smarter than it is But yea, it it's desired, it could be added. Although personally I wouldn't miss that column if it disappeared from all inventories, I never read it. Weapon damage/armor rating are arguably the least important properties of gear, maybe after vendor value in gold.
  Reply With Quote
07/23/15, 12:55 PM   #28
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
I removed the code that reanchors the search box from AGS, but the library does not move it when I call the disable call. Can you change that, or should I look into it myself?

  Reply With Quote
07/23/15, 06:05 PM   #29
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
You probably have another add-on moving it then. For me the search box is right beneath the top-most horizontal divider by default, I checked the anchor in Zgoo and it's the one from xml <Anchor point="TOPRIGHT" offsetX="-26" offsetY="68" />

Anyway, don't call libCIF:disableSearchBoxes() from AGS. It's there for FilterIt, which has its own handling.


edit: Ah ok, now I'm staring at my instance of your picture. Ok I need to figure out how it got there

edit2: I think it's the layout offsets. I just need to crunch some numbers.

Last edited by merlight : 07/23/15 at 06:21 PM.
  Reply With Quote
07/23/15, 06:45 PM   #30
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
I edited the diff for AGS above. The original BACKPACK_TRADING_HOUSE_LAYOUT_FRAGMENT had inventoryTopOffsetY == -20, the default. In libCIF it is set to 45, the value other layouts use. So I added that to your BASIC and ADVANCED layouts, and moved the other two offsets (which are relative to the Top), 65 units up.

There's still an issue with AGS+FilterIt, where the search box remains in "FilterIt location".
  Reply With Quote
07/28/15, 07:40 PM   #31
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by merlight View Post
Fun comment from ingame/inventory/inventory.xml
Lua Code:
  1. <!-- not dead, but dreaming... -->
  2. <EditBox name="$(parent)SearchBox"
lol hadn't seen this one before: libraries/globals/debugutils.lua
Lua Code:
  1. -- Because typing is painful.
  2. e = ZO_Debug_EventNotification
  Reply With Quote
08/12/15, 11:10 AM   #32
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by merlight View Post
Anyway, I forgot to add that if you guys decide to use the library, please wait until AGS is ready for it. The search box location must be sorted out first. Perhaps it would suffice if AGS didn't move the search box and just let the lib do it. I'm going to test, but tonight we've got troube with electricity due to a windstorm, can't run ESO on battery
I should've emphasized that more
  Reply With Quote
08/14/15, 04:03 PM   #33
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
I didn't add it yet. I was waiting for this discussion to finish. Just post here when everything is straightened out & I'll add it to FilterIt.
  Reply With Quote
08/24/15, 07:11 PM   #34
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by merlight View Post
Anyway, I forgot to add that if you guys decide to use the library, please wait until AGS is ready for it. The search box location must be sorted out first. Perhaps it would suffice if AGS didn't move the search box and just let the lib do it. I'm going to test, but tonight we've got troube with electricity due to a windstorm, can't run ESO on battery
It looks like it has been added to AGS, but the search box location problem looks like it still exists.


It looks like we need something like this to move the search box anchor for AGS and move it back when the trading house (AGS) is done with it:
Warning: Spoiler


Does the search box need to be hidden when AGS is done with it & the trading house closes? Is it supposed to remain visible on other layouts if the user is only using AGS & not FilterIt or Advanced Filters?

Last edited by circonian : 08/24/15 at 07:25 PM.
  Reply With Quote
08/25/15, 02:44 AM   #35
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by circonian View Post
Does the search box need to be hidden when AGS is done with it & the trading house closes? Is it supposed to remain visible on other layouts if the user is only using AGS & not FilterIt or Advanced Filters?
I've just updated AGS, will test it ingame shortly.

FilterIt has added filters to the sell tab after libCIF was conceived, and that might actually solve everything. Basically if the user disables AGS custom sell filters in its settings, and you make the change to FilterIt I posted earlier (addBackpackLayoutShiftY and disableSearchBoxes; edit: and disableGuildStoreSellFilters, because you want FilterIt there, right?), it should be ok. I think you don't even have to include the lib in FilterIt, just try to get it with LibStub.SILENT, and only call those functions if it's there; but perhaps it'll be less error-prone if you include it.

Last edited by merlight : 08/25/15 at 03:29 AM.
  Reply With Quote
08/25/15, 05:50 AM   #36
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Here's my current diff against FilterIt 2.9
diff Code:
  1. diff -ru autoupdate/unpacked/FilterIt/FilterIt.lua modified/FilterIt/FilterIt.lua
  2. --- autoupdate/unpacked/FilterIt/FilterIt.lua   2015-08-10 05:24:30.000000000 +0200
  3. +++ modified/FilterIt/FilterIt.lua  2015-08-25 13:28:05.000000000 +0200
  4. @@ -77,10 +77,6 @@
  5.     FilterIt.SetFilterActivation(ZO_PlayerBankTabs.m_object.m_currentSubMenuBar)
  6.     FilterIt.SetFilterActivation(ZO_GuildBankTabs.m_object.m_currentSubMenuBar)
  7.    
  8. -   -- Changes the layouts for the inventories: Trading House
  9. -   -- Moved to player activation to watch & see if AGS gets loaded
  10. -   FilterIt.LayoutTradingHouse()
  11. -  
  12.     -- Unregister here to catch loaded addons
  13.     EVENT_MANAGER:UnregisterForEvent(FilterIt.name, EVENT_ADD_ON_LOADED)
  14.    
  15. @@ -164,7 +160,6 @@
  16.     FilterIt.HookInvButtons()
  17.    
  18.     -- Changes the layouts for the inventories: backpack, bank, & guild bank, mail, exc..
  19. -   -- Trading House layout is called in player Activation for AGS compatability
  20.     FilterIt.SetLayouts()
  21.    
  22.     FilterIt.BuildImprovementPanelTabMenu()
diff Code:
  1. diff -ru autoupdate/unpacked/FilterIt/Layout/FilterIt_InvLayout.lua modified/FilterIt/Layout/FilterIt_InvLayout.lua
  2. --- autoupdate/unpacked/FilterIt/Layout/FilterIt_InvLayout.lua  2015-07-22 20:27:20.000000000 +0200
  3. +++ modified/FilterIt/Layout/FilterIt_InvLayout.lua 2015-08-25 13:41:47.000000000 +0200
  4. @@ -7,22 +7,10 @@
  5.  local function LayoutBackpack()
  6.     ZO_PlayerInventorySearchBox:SetDimensions(SEARCH_BOX_WIDTH, SEARCH_BOX_HEIGHT)
  7.    
  8. -   -- Trading house is handled in a separate function due to other checks
  9. -   -- that need to be made for AGS & other code that needs to be run.
  10. -   local tBackpackLayouts = {
  11. -   [1] = BACKPACK_BANK_LAYOUT_FRAGMENT.layoutData,
  12. -   [2] = BACKPACK_MENU_BAR_LAYOUT_FRAGMENT.layoutData,
  13. -   [3] = BACKPACK_MAIL_LAYOUT_FRAGMENT.layoutData,
  14. -   [4] = BACKPACK_PLAYER_TRADE_LAYOUT_FRAGMENT.layoutData,
  15. -   [5] = BACKPACK_STORE_LAYOUT_FRAGMENT.layoutData,
  16. -   [6] = BACKPACK_FENCE_LAYOUT_FRAGMENT.layoutData,
  17. -   [7] = BACKPACK_LAUNDER_LAYOUT_FRAGMENT.layoutData,
  18. -   --[5] = BACKPACK_TRADING_HOUSE_LAYOUT_FRAGMENT.layoutData,
  19. -   }
  20. -   for k,v in pairs(tBackpackLayouts) do
  21. -       v.backpackOffsetY = 136
  22. -       v.sortByOffsetY = 103
  23. -   end
  24. +    -- this enables filters on guild store SELL tab
  25. +    local libCIF = LibStub:GetLibrary("libCommonInventoryFilters")
  26. +    libCIF:addBackpackLayoutShiftY(40)
  27. +    libCIF:disableSearchBoxes()
  28.    
  29.     --local FilterItInventoryDivider = CreateControlFromVirtual("FilterIt_InventoryDivider", ZO_PlayerInventory, "ZO_InventoryFilterDivider")
  30.     -- Changed Parent for AGS
  31. @@ -75,45 +63,10 @@
  32.     FilterItBankDivider:SetAnchor(point0, relativeTo0, relativePoint0, offsetX0, offsetY0+5)
  33.  end
  34.  
  35. -function FilterIt.LayoutTradingHouse()
  36. -   if FilterIt.loadedAddons["AwesomeGuildStore"] then return end
  37. -  
  38. -   local layoutData = BACKPACK_TRADING_HOUSE_LAYOUT_FRAGMENT.layoutData
  39. -   local sellFiltersEnabled = layoutData.sellFiltersEnabled
  40. -   -- Check if someone has already enabled it:
  41. -   if sellFiltersEnabled then return end
  42. -  
  43. -   -- Check if its turned on in my addon:
  44. -   --if not MY_ADDON_SETTING_ON then return end
  45. -  
  46. -   -- Set flag:
  47. -   layoutData.sellFiltersEnabled = true
  48. -  
  49. -   -- Set the new layoutData:
  50. -   layoutData.inventoryTopOffsetY = 43
  51. -   layoutData.hiddenFilters = { [ITEMFILTERTYPE_QUEST] = true }  
  52. -   local origAdditionalFilter = layoutData.additionalFilter
  53. -   layoutData.additionalFilter = function (slot)
  54. -               return origAdditionalFilter(slot) and (not IsItemBound(slot.bagId, slot.slotIndex))
  55. -           end
  56. -  
  57. -   -- Prehook HandleTabSwitch for sell mode:
  58. -   local function OnHandleTabSwitch(self, tabData)
  59. -       local mode = tabData.descriptor
  60. -      
  61. -       if mode == ZO_TRADING_HOUSE_MODE_SELL then
  62. -           ZO_PlayerInventoryTabs:SetHidden(false)
  63. -       end
  64. -       return false
  65. -   end
  66. -   ZO_PreHook(TRADING_HOUSE, "HandleTabSwitch", OnHandleTabSwitch)
  67. -end
  68.  
  69.  function FilterIt.SetLayouts()
  70.     LayoutBackpack()
  71.     LayoutBank()
  72.     LayoutGuildBank()
  73. -   -- Changed, this is now called in player Activation for AGS compatability
  74. -   --LayoutTradingHouse()
  75.  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.
  Reply With Quote
08/25/15, 12:19 PM   #37
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by merlight View Post
I've just updated AGS, will test it ingame shortly.

FilterIt has added filters to the sell tab after libCIF was conceived, and that might actually solve everything. Basically if the user disables AGS custom sell filters in its settings, and you make the change to FilterIt I posted earlier (addBackpackLayoutShiftY and disableSearchBoxes; edit: and disableGuildStoreSellFilters, because you want FilterIt there, right?), it should be ok.
Yes, I made those changes as a temporary measure until this was finished.
Yes it is OK for me, I'm thinking of the problem it is causing AGS when both addons are turned on the search box location is wrong for AGS in the trading house.


Originally Posted by merlight View Post
Here's my current diff against FilterIt 2.9
Yes, I had made those code changes (its not posted, I was just testing on my own).


Originally Posted by merlight View Post
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.
I think your ON/OFF are backwards, but yes that is the problem I was referring to When both settings are ON disableGuildStoreSellFilters & disableSearchBoxes
Originally Posted by merlight View Post
the search box slightly overlaps subfilters or items, because it's at FilterIt position.
The code I posted was an idea to fix that problem by moving the search box for AGS when the trading house is enabled and the disableGuildStoreSellFilters is ON (because that means AGS is going to handle the trading house filters).

Then restore the original search box position when the trading house becomes disabled and the disableGuildStoreSellFilters is ON (because that means we previously moved the search box for AGS when the trading house became enabled).

That way the search box would be in the correct position at all times for everyone.

Last edited by circonian : 08/25/15 at 12:25 PM.
  Reply With Quote
08/25/15, 02:10 PM   #38
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by circonian View Post
I think your ON/OFF are backwards, but yes that is the problem I was referring to When both settings are ON disableGuildStoreSellFilters & disableSearchBoxes
That's kind of a naming confusion -- AGS["disable custom selltab filter"] is inverse to libCIF["disableGuildStoreSellFilters"] because AGS talks about its custom filters, libCIF talks about the default UI filters

Originally Posted by circonian View Post
The code I posted was an idea to fix that problem by moving the search box for AGS when the trading house is enabled and the disableGuildStoreSellFilters is ON (because that means AGS is going to handle the trading house filters).

Then restore the original search box position when the trading house becomes disabled and the disableGuildStoreSellFilters is ON (because that means we previously moved the search box for AGS when the trading house became enabled).

That way the search box would be in the correct position at all times for everyone.
I see, seems to be the best way to fix it without touching AGS itself.
  Reply With Quote
08/25/15, 03:21 PM   #39
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Yet another issue with the search box. I added saving/restoring the anchor, enabled AGS custom filters and FilterIt -- and everytime I click an AGS (sub)filter, the search box is cleared. It's all so intertwined
  Reply With Quote
08/25/15, 05:40 PM   #40
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by merlight View Post
Yet another issue with the search box. I added saving/restoring the anchor, enabled AGS custom filters and FilterIt -- and everytime I click an AGS (sub)filter, the search box is cleared. It's all so intertwined
Eew, yeah that's FilterIt clearing the searchBox. Since it only displays the search box on the All tab it has to clear the search box whenever you click a different filter or else the search text would still apply, you would not see everything, & there would be no way to remove it since the search box is hidden on other tabs.

I'm actually surprised the search box isn't getting hidden when using AGS and switching off of the "ALL" tab because FilterIt hides the searchBox. He must have code somewhere else un-hiding it.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Inventory search boxes & guild store sell tab filters


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off