Go to Page... |
Thread Tools | Display Modes |
07/20/15, 10:23 AM | #1 |
|
Inventory search boxes & guild store sell tab filters
The basic UI deliberately hides either the filters (guild store sell tab), or the search box (everywhere else). It's not a bug, it's just a feature that doesn't make any sense.
Then there are search box bugs circonian discovered. I guess #2 and #3 are normally hidden because the search box is hidden. Fun comment from ingame/inventory/inventory.xml Lua Code:
Now we have a multitude of scattered fixes:
Please fill in what I got wrong or missing, out of these add-ons I only use AdvancedFilters, and am so used to it that I sometimes can't tell what's the default behavior. For me the most annoying part is missing filters at the guild store sell tab. And that's coming from someone who only sells common racial motifs when he finds some, or small stacks of green improvement mats. Like twice a month. It's been even more frustrating since (many months ago) I somehow bugged it in such a way that sometimes the filters were there. Yesterday I managed to make the default filters show up on the sell tab with very little code, and AdvancedFilters simply work there with no additional changes. Now I have a dilemma: to fix or not to fix. It's not a bug, but so inherently broken that I want it fixed But I will have to check the presence of AwesomeGuildStore at least, as I don't want to screw other add-ons. Are there any other? |
07/20/15, 01:34 PM | #2 |
The last time I tried to activate the default sell tab filters for the guild store, I got consistent crashes. It was easier to roll my own version in AGS than to debug the ingame ui code because I already had them made for the search tab.
I won't remove them from AGS, but I can add a setting to disable them if you want to offer a different addon that allows AF to work on the sell tab. Keep in mind that the AGS version of the filters hides items that cannot be sold on the store in addition to filtering categories and uses the same icons as on the search tab though so I don't see any reason to not use them. :P |
|
07/20/15, 02:25 PM | #3 |
|
That was something I said I was going to add to FilterIt a long time ago, but never did.
As you said it takes very little code: EDIT 1: I forgot to hide the quest filter, added. EDIT 2: Heres one for you...I just realized the trading house additional filter does NOT filter out bound items? Might as well fix that too. Removed EDIT 2. I just realized it will mess up the filtering libraries for the trading house. Lua Code:
Although now that I'm thinking about it. I might as well add it to FilterIt. Last edited by circonian : 07/20/15 at 05:31 PM. |
07/20/15, 02:43 PM | #4 |
btw how to filter bound items in your deposit tab when at the guild bank?
you cant deposit em anyway |
|
QuadroTony |
View Public Profile |
Find More Posts by QuadroTony |
07/20/15, 02:51 PM | #5 | |
|
|
|
07/20/15, 03:09 PM | #6 |
|
Neither do I. I've been putting off fixing up AF to make guild selling behave because I always just recommend downloading AGS. However, now that circonian has shown how easy it is to make it work, I may go ahead and do something just for completeness.
|
07/20/15, 03:26 PM | #7 |
|
One thing I just thought of though:
Lua Code:
It will mess up addons using either of the filtering libraries for the trading house if the library gets loaded first & sets the additional filter and then some other addon changes it. That could of course be fixed, by saving the original additional filter & calling it with the new function, but you'de never be able to remove the changes. Although would that be necessary? Do you ever need to see bound items...well I guess it would be ok. Lua Code:
Last edited by circonian : 07/20/15 at 05:15 PM. |
07/20/15, 03:29 PM | #8 |
Okay. In this case I suggest everyone adds a setting to disable it and on updating the addon checks if there is already another addon running that offers this feature.
Instead of checking for specific addons we could set a flag on BACKPACK_TRADING_HOUSE_LAYOUT_FRAGMENT.layoutData. The first to set it stays active, all the others deactivate themselves until the user activates them again and reloads the UI. That way there should not be any conflicts and the user can decide which version he prefers. |
|
07/20/15, 04:59 PM | #9 |
|
How about sellFiltersEnabled
I would also recommend then no one hooks SetTradingHouseModeEnabled like I suggested. No reason for every addon to be hooking into that if their not even going to use it. Switched to prehook the HandleTabSwitch(...) that way only the addon who is handling the sell filters will need to set a hook. Lua Code:
Last edited by circonian : 07/20/15 at 05:15 PM. |
07/20/15, 05:08 PM | #10 |
|
@circonian: I have the code, including bound items filtering and hiding statValue column, I just need to make sure it doesn't break other add-ons. I'm a little off-focus now, hopefully I can test later this week.
@sirinsidiator: I'm not a fan of unnecessary toggles, keep it simple for users. And yourself as well. Guild store scene seems to be AwesomeGuildStore's domain, I can easily check for its presence and skip tackling with it. |
07/20/15, 05:31 PM | #11 |
|
I agree, that would be the best method. If they want to use AGS they might as well use those filters and as you said it will keep it simple. AGS is actually the reason I never added this feature, but now I figure it might as well for those that dont use it.
|
07/21/15, 04:20 AM | #12 |
@merlight of course you can add code to watch out for a specific addon, but I always try to achieve compatibility in a generic way that can be reused by new addons in the future
Maybe you can make a small library instead of everyone making their own version? That way you don't have to do anything special to make it work between your addons. |
|
07/21/15, 11:16 AM | #13 | |
|
Example Lib:
Warning: Spoiler
Lua Code:
Then for an addon like AGS that doesn't want to use those bars you could check to see if the flag is set & if not set it and use your bars. One other problem, if we use a library, it will pretty much be whichever addon loads first wins without giving the user an option to select which bars to use, unless someone has a suggestion on how to handle that part. Last edited by circonian : 07/21/15 at 11:20 AM. |
|
07/21/15, 01:54 PM | #14 |
|
Perhaps I found a way. My lib does its overrides in EVENT_PLAYER_ACTIVATED. Unless an add-on calls lib:disableGuildStoreSellFilters() in their EVENT_ADD_ON_LOADED handler, the lib proceeds to enable the default filters.
|
07/21/15, 03:37 PM | #15 | |
|
No matter what though there is going to be an unsolvable conflict if the user chooses to show the menu bars for multiple addons...although ??? would it be a good thing to allow it? Yes it would be a mess several menu bars showing, but it would help the user figure out whats wrong rather than wondering why xxx addons menu bars aren't visible and some other menu bars are. How about instead of using a lib function to "block" the default inventory menu bars create a function that must be called to enable the defualt menu bars. This way each addon can handle its own code & not worry about any other addon. Each addon would be required only to have a setting that would allow users to turn the given addons menu bars ON/OFF.
If a user turns on menu bars from multiple addons then they just need to turn some of them off in the settings. |
|
07/21/15, 03:54 PM | #16 |
|
Actually forget that last post....I have a better idea.
How about we create a settings menu panel just for the menu bars. Register the panel with LibAddonMenu just like its an addon and only have 1 setting, which menu bars to display. Each addon could call something like: Lua Code:
The callback would be nillable and any addon wanting the default menu bars could just pass nill for the callback and then the library could just handle that code on its own. FilterIt does not have filters for the browse category in the trade house. I know AGS does, do any other addons? While were at it we might as well add a register function for that as well. They should be separate registrations so that, for example, A user could choose to display the FilterIt menu bars for the sell tab, but still have the AGS filters on the browse tab. Last edited by circonian : 07/21/15 at 03:56 PM. |
07/21/15, 04:19 PM | #17 |
I think a dedicated settings menu is over-complicating it a bit.
If I understood it correctly, we currently have two different sell tab bars. My AGS custom bar and the default ingame bar. You are trying to activate the ingame bar through the code posted by merlight in 3 separate addons. If a user has more than one of these the other two do not need to run the same code to activate the ingame bar again, so I said we could put it in a library because it will only load once by design. The only problem left is to handle if a user has the AGS bar running, which I would solve by including the library too and offering a setting in AGS. If it is set to show the my bar, I will call a method on the library to deactivate its functionality and call my own code. If it is set to off, I won't do anything and the library will work normally. Unless you have plans to make a custom sell tab bar this should be all that is necessary. |
|
07/21/15, 04:30 PM | #18 | ||
|
It was just an idea I thought would be a simple solution. I'm ok with whatever.
Lua Code:
But no I have no plans of doing so and as I said I'm good with whatever you guys want to do. I was just offering some ideas. |
||
07/21/15, 04:39 PM | #19 |
Ah. Sorry. I was somehow thinking that he had some code in his initial post.
|
|
07/22/15, 08:13 AM | #20 |
|
I'll try to better explain my thought process. I'll post the "libCommonInventoryFilters" later today.
Currently on the SELL tab we either have no filters (because the basic UI hides them), or custom AGS filters. AGS doesn't need to worry about conflicts, it just fills empty space. If another add-on wanted to put its own custom filters there, it would have to talk to AGS, or they would both need a toggle -- similar to how numerous combat add-ons have a toggle for every feature, and people mix them up in the most unimaginable ways. The idea of a centralized "pick one" setting is interesting, but it seems overkill for what we currently have. Perhaps if there were many contestants, but I doubt that will happen. So, I wanted the default filters on the SELL tab, when AGS is not there. With AGS I don't really care, as long as there's exactly one set of filters The library says: "If you load me, I'm going to put filters on the SELL tab, unless you intend to put something better in there, in which case you need to explicitly tell me!" (does that make sense?) You may have 3 add-ons wanting to put their controls in there, the library doesn't care how they get along, it just won't interfere if at least one of them tells it not to. AF can include the library and do nothing else, it will just work. FilterIt can include it and it will almost work (I just need to figure out why it's wrongly anchored). AGS can include it, but must also call libCIF:disableGuildStoreSellFilters() in its EVENT_ADD_ON_LOADED, otherwise both sets would show up and overlap. It doesn't need to have a toggle, it can simply prefer its own filters. --- Now the difficult part: the search box. When filters are enabled on the SELL tab, there's no room for it. AF moves the search box to the top, above filters. Which kinda makes sense, since the search persists as you switch filters. Btw, AF shows the search box on startup only, if you open/close the guild store, it won't appear in inventory/bank again. But don't worry, libCIF solves that, too. AGS moves the search box below its filters on EVENT_OPEN_TRADING_HOUSE, and moves it back to the original location on EVENT_CLOSE_TRADING_HOUSE. This will probably need to be changed. I don't know when exactly these events occur, but if the CLOSE happens after SCENE_HIDING, I'd need to find a way to run another move function after that. But as with AF the search persists while switching filters, it'd probably be best to move it to the top. FilterIt enables the search box, but uses it differently. It only works on the generic ALL filter, other top-level filters and sub-filters don't have a search box. Which means in the case of FilterIt, having the search box down there next to sub-filters actually makes sense. So I added libCIF:disableSearchBoxes(), which prevents the lib from showing search boxes and moving them to the top. Now I'm trying to figure out how to make FilterIt look nice on the SELL tab. --- And because adding filters forced me to play with the search box, the lib (by default) also moves search boxes to the AF location, and contains circonian's bug fixes as a bonus. |
ESOUI » Developer Discussions » General Authoring Discussion » Inventory search boxes & guild store sell tab filters |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|