Download
(3 Kb)
Download
Updated: 02/10/21 05:37 AM
Compatibility:
Flames of Ambition (6.3.5)
Updated:02/10/21 05:37 AM
Created:01/31/21 04:09 PM
Monthly downloads:34
Total downloads:2,323
Favorites:2
MD5:
Gabriel's Inventory Fix
Version: 2.0.1
by: Gabriel_H [More]
The Inventory has been broken for a while now - in that every time you close the inventory then re-open it, it shifts back to the default All/All filter - This is now fixed in Update 29 - so this addon is no longer required.
* Updated to PTS Game version
* Added a Fix for known issues (Still monitoring for further problems)
* Expanded to include Craft Bag as well as Inventory
Archived Files (1)
File Name
Version
Size
Uploader
Date
1.0.0
2kB
01/31/21 04:09 PM


Post A Reply Comment Options
Unread 02/10/21, 12:27 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4989
File comments: 6040
Uploads: 78
All I wanted to say is this could be achieved by using the MenuBarButton:SelectDescriptor (or similar function name) instead of the mouseclick stuff.
These function are also used internally so you should keep them used, instead of using a workaround, which might create problems.

This also will change the filters + subfilters after opening an inventory, which might break addons like AdvancedFilters (which btw. already provides internally what your fix is doing), that try to apply their subfilters and run checks etc. at this moment (at inventories:ChangeFilter function).
I'm not saying it actually breaks something, but it could.

So please look into the esoui/ingame/inventory code and at least use the correct way to change the tabs, thank you.
https://github.com/esoui/esoui/blob/...nubar.lua#L714
1st param schould be ZO_PlayerInventoryTabs.
2nd param the ITEM_TYPE_DISPLAY_CATEGORY_WEAPONS, etc. of the main filters.
Which are defined here: local table BACKPACK_FILTER_KEYS
https://github.com/esoui/esoui/blob/...ntory.lua#L283


Thanks @avatar feedback ;-)


Originally Posted by Gabriel_H
Hi,

My fix is different.

I had seen that workaround - in short that workaround only works when moving in and out of the Inventory, whereas mine works when moving in/out of the inventory and between tabs. For example, if you move from Weapons to Armour that workaround will reset the SubFilters, mine restores them.

I explored using the descriptors but the code seems to a little too inaccessible to do what I want it do and along with the issue of compatibility with other addons I went with my weird workaround using the set controls, rather than trying to hash some code together.

"And with your code you most probably will damage other inventory filter addons, or any other inventory addon, as you do not use the intended way to achieve the filter changes and just add/override the handlers of the menu buttons"

All my addon is doing is saving the last Tab and SubTab used, then restoring them when a new Tab is selected or when the inventory is re-opened. There is no reason that should conflict with other addons. The only possible issue would be is if someone added in an 11th tab, at which point my addon would not be able to track the sub-filter but would just revert to the default.

PS. I have tidied up my code since verison 1.0.0 which might make it a bit clearer what the addon is doing.

PPS. Cool avatar
Last edited by Baertram : 02/10/21 at 12:32 PM.
Report comment to moderator  
Reply With Quote
Unread 02/10/21, 05:51 AM  
Gabriel_H
 
Gabriel_H's Avatar
AddOn Author - Click to view AddOns

Forum posts: 11
File comments: 6
Uploads: 1
Hi,

My fix is different.

I had seen that workaround - in short that workaround only works when moving in and out of the Inventory, whereas mine works when moving in/out of the inventory and between tabs. For example, if you move from Weapons to Armour that workaround will reset the SubFilters, mine restores them.

I explored using the descriptors but the code seems to a little too inaccessible to do what I want it do and along with the issue of compatibility with other addons I went with my weird workaround using the set controls, rather than trying to hash some code together.

"And with your code you most probably will damage other inventory filter addons, or any other inventory addon, as you do not use the intended way to achieve the filter changes and just add/override the handlers of the menu buttons"

All my addon is doing is saving the last Tab and SubTab used, then restoring them when a new Tab is selected or when the inventory is re-opened. There is no reason that should conflict with other addons. The only possible issue would be is if someone added in an 11th tab, at which point my addon would not be able to track the sub-filter but would just revert to the default.

PS. I have tidied up my code since verison 1.0.0 which might make it a bit clearer what the addon is doing.

PPS. Cool avatar
Last edited by Gabriel_H : 02/10/21 at 05:54 AM.
Report comment to moderator  
Reply With Quote
Unread 02/01/21, 03:53 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4989
File comments: 6040
Uploads: 78
https://www.esoui.com/downloads/info...rESO6.2.7.html

Existed already, easy change of ZOs code, 1 libe only. Or is your fix different?

Cuz your coce somehow works but is not the best way to achieve the same. You simulate a mouse click on the menu buttons where there is a function for that to achieve the same "properly" without simualting a mouse click.
Search for "descriptor" in teh inventory sources e.g.

And with your code you most probably will damage other inventory filter addons, or any other inventory addon, as you do not use the intended way to achieve the filter changes and just add/override the handlers of the menu buttons.
What if the filter is changed without using the menu buttons, in the background? You might get very weird behaviours then

I'd go for the simple fix that code provided (see link above), it works and is only the removal of 1 line that ZOs added -> Easy fix and no problems with other addons.
Thanks for having a look at it and rethinking your addon.
Last edited by Baertram : 02/01/21 at 04:38 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: