Go to Page... |
Compatibility: | Gold Road (10.0.0) Scions of Ithelia (9.3.0) Endless Archive (9.2.5) base-game patch (9.1.5) Necrom (9.0.0) Scribes of Fate (8.3.5) |
Updated: | 06/03/24 06:39 AM |
Created: | 05/04/19 08:28 AM |
Monthly downloads: | 49,197 |
Total downloads: | 1,668,596 |
Favorites: | 577 |
MD5: |
LibFilters3
##DependsOn: LibFilters-3.0>=339
local libFilters = LibFilters3 --!!! Add LibFilters-3.0 to your ## DependsOn: or ## OptionalDependsOn: to assure the lib is loaded before your addon's EVENT_ADD_ON_LOADED fires!!! libFilters:InitializeLibFilters() -- Must be called ONCE at/After EVENT_ADD_ON_LOADED of your addon to make sure the LibFilters functions exists and everything is ready! Without calling this you won't see any filters applied/working!
LF_INVENTORY = 1 LF_BANK_WITHDRAW = 2 LF_BANK_DEPOSIT = 3 LF_GUILDBANK_WITHDRAW = 4 LF_GUILDBANK_DEPOSIT = 5 LF_VENDOR_BUY = 6 LF_VENDOR_SELL = 7 LF_VENDOR_BUYBACK = 8 LF_VENDOR_REPAIR = 9 LF_GUILDSTORE_BROWSE = 10 LF_GUILDSTORE_SELL = 11 LF_MAIL_SEND = 12 LF_TRADE = 13 LF_SMITHING_REFINE = 14 LF_SMITHING_CREATION = 15 LF_SMITHING_DECONSTRUCT = 16 LF_SMITHING_IMPROVEMENT = 17 LF_SMITHING_RESEARCH = 18 LF_ALCHEMY_CREATION = 19 LF_ENCHANTING_CREATION = 20 LF_ENCHANTING_EXTRACTION = 21 LF_PROVISIONING_COOK = 22 LF_PROVISIONING_BREW = 23 LF_FENCE_SELL = 24 LF_FENCE_LAUNDER = 25 LF_CRAFTBAG = 26 LF_QUICKSLOT = 27 LF_RETRAIT = 28 LF_HOUSE_BANK_WITHDRAW = 29 LF_HOUSE_BANK_DEPOSIT = 30 LF_JEWELRY_REFINE = 31 LF_JEWELRY_CREATION = 32 LF_JEWELRY_DECONSTRUCT = 33 LF_JEWELRY_IMPROVEMENT = 34 LF_JEWELRY_RESEARCH = 35 LF_SMITHING_RESEARCH_DIALOG = 36 LF_JEWELRY_RESEARCH_DIALOG = 37 LF_INVENTORY_QUEST = 38 LF_INVENTORY_COMPANION = 39 LF_FILTER_MIN = LF_INVENTORY LF_FILTER_MAX = LF_INVENTORY_COMPANION
inventory slot: age, bagId, condition, dataEntry, equipType, filterData, iconFile, inventory, isJunk, isPlayerLocked, itemInstanceId, itemType, launderPrice, locked, meetsUsageRequirement, name, quality, rawName, requiredLevel, searchData, sellPrice, slotControl, slotIndex, specializedItemType, stackCount, stackLaunderPrice, statValue, stolen, uniqueId store slot: currencyQuantity1, currencyQuantity2, currencyType1, currencyType2, dataEntry, entryType, filterData, icon, isUnique, meetsRequirementsToBuy, meetsRequirementsToEquip, name, price, quality, questNameColor, sellPrice, slotIndex, stack, stackBuyPrice, stackBuyPriceCurrency1, stackBuyPriceCurrency2, statValue buyback slot: icon, meetsRequirements, name, price, quality, slotIndex, stack, stackBuyPrice repair slot: bagId, condition, dataEntry, icon, name, quality, repairCost, slotIndex, stackCount quickslot slot: age, bagId, filterData, iconFile, locked, meetsUsageRequirement, name, quality, sellPrice, slotIndex, slotType, stackCount, stackSellPrice, stolen
local function FilterSavedItemsForSlot(inventorySlot) return true -- show the item in the list / false = hide item end local function FilterSavedItemsForBagIdAndSlotIndex(bagId, slotIndex) return true -- show the item in the list / false = hide item end
--Filter function with inventorySlot All LF_ except the ones named below, e.g. LF_INVENTORY, LF_CRAFTBAG, LF_VENDOR_SELL --Filter function with bagId and slotIndex (most of them are crafting related ones) [LF_SMITHING_REFINE] = FilterSavedItemsForBagIdAndSlotIndex, [LF_SMITHING_DECONSTRUCT] = FilterSavedItemsForBagIdAndSlotIndex, [LF_SMITHING_IMPROVEMENT] = FilterSavedItemsForBagIdAndSlotIndex, [LF_SMITHING_RESEARCH] = FilterSavedItemsForBagIdAndSlotIndex, [LF_SMITHING_RESEARCH_DIALOG] = FilterSavedItemsForBagIdAndSlotIndex, [LF_JEWELRY_REFINE] = FilterSavedItemsForBagIdAndSlotIndex, [LF_JEWELRY_DECONSTRUCT] = FilterSavedItemsForBagIdAndSlotIndex, [LF_JEWELRY_IMPROVEMENT] = FilterSavedItemsForBagIdAndSlotIndex, [LF_JEWELRY_RESEARCH] = FilterSavedItemsForBagIdAndSlotIndex, [LF_JEWELRY_RESEARCH_DIALOG] = FilterSavedItemsForBagIdAndSlotIndex, [LF_ENCHANTING_CREATION] = FilterSavedItemsForBagIdAndSlotIndex, [LF_ENCHANTING_EXTRACTION] = FilterSavedItemsForBagIdAndSlotIndex, [LF_RETRAIT] = FilterSavedItemsForBagIdAndSlotIndex, [LF_ALCHEMY_CREATION] = FilterSavedItemsForBagIdAndSlotIndex,
function LibFilters3:InitializeLibFilters() Must be called after you've assigned LibFilters-3.0 to your local variable, to start the initialization of the library, and to make it work. function LibFilters3:GetMinFilterType() Returns the minimum filterType available function LibFilters3:GetMaxFilterType() Returns the maximum filterType available function LibFilters3:GetFilterTypes() Returns the LibFilters LF* filterType connstants table: value = "name" function LibFilters3:GetFilterTypeName(libFiltersFilterType) Returns the LibFilters LF* filterType connstant's name function LibFilters3:GetCurrentFilterTypeForInventory(inventoryType) Returns the filterType currently affecting the provided inventoryType. function LibFilters3:GetFilterCallback(filterTag, filterType) filterTag is the unique string that identifies your filter. filterType is the provided "LF_" prefixed constants your filter was registered for. Returns the filterCallback registered for the provided filterTag and filterType; returns nil otherwise. function LibFilters3:IsFilterRegistered(filterTag, filterType) filterTag is the unique string that identifies your filter. filterType is the provided "LF_" prefixed constants your filter was registered for. Returns true if there is a filter registered with the provided filterTag. Returns false if there is not a filter registered with the provided filterTag. filterType is optional. If a filterType is provided, will only return true if a filter is registered to that filterType under the provided filterTag. function LibFilters3:RegisterFilter(filterTag, filterType, filterCallback, noInUseError) filterTag is a unique string to identify your filter. filterType is one of the provided "LF_" prefixed constants. filterCallback is a function which accepts either one or two arguments; this is determined by the filterType. filterCallback should return true if an item is to be shown. filterCallback should return false if an item should not be shown. noInUseError boolean: Do not show an error message if the filterTag was already registered function LibFilters3:RegisterFilterIfUnregistered(filterTag, filterType, filterCallback, noInUseError) Same as RegisterFilter function but only registers the filter if it currently was unregistered function LibFilters3:UnregisterFilter(filterTag, filterType) filterTag is the unique string that identifies your filter. filterType the provided "LF_" prefixed constants your filter was registered for. filterType is optional. If a filterType is not provided, all filters registered with the provided filterTag will be unregistered. function LibFilters3:RequestUpdate(filterType, delay) filterType is one of the provided "LF_" prefixed constants. Runs the updater appropriate for the provided filter type to pick up any filtering changes. function LibFilters3:RequestUpdateForResearchFilters(delay) Request an update for the carfting table research panel, including normal LF_*_RESEARCH filters and the horizontal scrollBar filters registered with the functions RegisterResearchHorizontalScrollbarFilter function LibFilters3:RegisterResearchHorizontalScrollbarFilter(filterTag, craftingType, skipTable, fromResearchLineIndex, toResearchLineIndex, noInUseError) Register a filter by help of a researchLineIndex "skipTable" for a craftingType Parameter tyble skipTable contains key = researchLineIndex and value = boolean where "true" means: filter/skip (hide) this researchLineIndex at the horizontal scroll list. Parameter number fromResearchLineIndex sets the researchLineIndex to start the output of the horizontal scrollbar: It filters (hides) the possibe entries "in total". Parameter number toResearchLineIndex sets the researchLineIndex to stop the output of the horizontal scrollbar: It filters (hides) the possible entries "in total". Parameter boolean noInUseError: if set to true there will be no error message if the filterTag+filterType was registered already -> Silent fail. Return value will be false then! Returns true if filter table skipTable was registered, else nil in case of parameter errors, or false if same tag+type was already registered If different addons register skipTables for the same crafting type, these skipTables will be combined! ->The combined entries of the skipTable are added, directly upon registering such filter, to they researchPanel table, with entry LibFilters3_HorizontalScrollbarFilters ->You need to manually call libFilters:RequestUpdateForResearchFilters(delay) to update the horizontal scrollbar (and the normal research filters) via researchPanel:Refresh() function LibFilters3:UnregisterResearchHorizontalScrollbarFilter(filterTag, craftingType) Unregister a filter by help of a researchLineIndex "skipTable" for a craftingType, which will show the entries at the horizontal scroll list again. If different addons have registered skipTables for the same crafting type, these skipTables will be combined, and thus unregistering 1 filterTag might still have any other registered which hides the entry at the horizontal scrollbar ->The combined entries of the skipTable are added, directly upon unregistering such filter, to they researchPanel table, with entry LibFilters3_HorizontalScrollbarFilters ->You need to manually call libFilters:RequestUpdateForResearchFilters(delay) to update the horizontal scrollbar (and the normal research filters) via researchPanel:Refresh() function LibFilters3:ApplyCraftingResearchHorizontalScrollbarFilters(craftingType, noRefresh) Use API function libFilters.ApplyCraftingResearchHorizontalScrollbarFilters(craftingType, noRefresh) to apply the combined skiptables to the researchPanel table LibFilters3_HorizontalScrollbarFilters
callbackName String The callbackName of the callback just raised, filterType LF* constant, stateStr SCENE_SHOWN or SCENE_HIDDEN, isInGamepadMode true (gamepad or false (keyboard), fragmentOrSceneOrControl fragmentOrSceneOrControlOrUserdata reference variable, lReferencesToFilterType table with all references to that filterType, universalDeconSelectedTabNow nilable:String currently selected universal deconstruction tab "all", "armor", "weapons," "jewelry", "enchantments"
--Create the callbackname for a libFilters filterPanel shown/hidden callback ----It will add an entry in table LibFilters3.mapping.callbacks.registeredCallbacks[inputType][yourAddonName][universalDeconActiveTab][filterType][isShown] ----number filterType needs to be a valid LF_* filterType constant ----boolean isShown true means SCENE_SHOWN will be used, and false means SCENE_HIDDEN will be used for the callbackname ----boolean inputType true = Gamepad, false= keyboard callback, leave empty for both! ----nilable:String universalDeconActiveTab The active tab at the universal deconstruction panel that this callback should be raised for, e.g. "all", "armor", "weapons", "jewelry" or "enchanting" ----nilable:String raiseBeforeOtherAddonsCallbackName If this callbackName (of another addon) is given the callback should be raised after this callback was raised. The callbackName provided here must match the ----> other parameters like filterType, isShown, inputType, universalDeconActiveTab! ----Returns String callbackNameGenerated ---->e.g. "LibFilters3-<yourAddonName>-shown-1" for SCENE_SHOWN and filterType LF_INVENTORY of addon <yourAddonName> function libFilters:RegisterCallbackName(yourAddonName, filterType, isShown, inputType, universalDeconActiveTab, raiseBeforeOtherAddonsCallbackName) function libFilters:UnregisterCallbackName(yourAddonName, filterType, isShown, inputType, universalDeconActiveTab)
/lftestfilters
File Name |
Version |
Size |
Uploader |
Date |
3.0r4.2 |
116kB |
Baertram |
02/14/24 10:37 AM |
|
3.0r4.1 |
116kB |
Baertram |
09/01/23 08:21 AM |
|
3.0r4.0 |
116kB |
Baertram |
03/14/23 06:29 AM |
|
3.0r3.9 |
116kB |
Baertram |
01/02/23 11:48 AM |
|
3.0r3.8 |
111kB |
Baertram |
11/11/22 06:42 AM |
|
3.0r3.7 |
102kB |
Baertram |
11/01/22 01:03 PM |
|
3.0r3.6 |
101kB |
Baertram |
11/01/22 07:26 AM |
|
3.0r3.5 |
96kB |
Baertram |
06/18/22 04:36 PM |
|
3.0r3.4 |
96kB |
Baertram |
05/22/22 09:52 AM |
|
3.0r3.3 |
96kB |
Baertram |
05/09/22 01:44 AM |
|
3.0r3.2 |
96kB |
Baertram |
03/16/22 11:06 AM |
|
3.0r3.1 |
95kB |
Baertram |
03/12/22 07:34 PM |
|
3.0r3.0 |
95kB |
Baertram |
03/12/22 11:27 AM |
|
3.0r2.2 |
13kB |
Baertram |
08/13/21 06:29 AM |
|
3.0r2.1 |
13kB |
Baertram |
06/01/21 05:58 AM |
|
3.0r2.0 |
13kB |
Baertram |
02/18/21 06:55 PM |
|
3.0r1.9 |
11kB |
Baertram |
01/25/21 04:05 PM |
|
3.0r1.8 |
11kB |
Baertram |
01/25/21 02:05 PM |
|
3.0r1.7 |
11kB |
Baertram |
11/02/20 06:39 AM |
|
3.0r1.6 |
10kB |
Baertram |
08/24/20 07:09 PM |
|
3.0r1.5 |
9kB |
Baertram |
08/31/19 12:50 PM |
|
3.0r1.4 |
9kB |
Baertram |
08/30/19 11:08 PM |
|
3.0r1.3 |
8kB |
Baertram |
08/30/19 03:12 PM |
|
3.0r1.2 |
8kB |
Baertram |
05/26/19 01:50 PM |
|
3.0r1.1 |
8kB |
Baertram |
05/11/19 04:51 PM |
|
3.0r1.0 |
8kB |
05/04/19 08:28 AM |
![]() |
Comment Options |
eglon |
View Public Profile |
Send a private message to eglon |
Find More Posts by eglon |
Add eglon to Your Buddy List |
![]() |
||
|
Re: Interferes with filters when Listing in Guild Store
Hello,
you seem to use the keyboard mode. And you did not switch between keyboard and gamepad mode before the problem happens, right? If you did please test if this happens with only keyboard mode enabled too. For me it's working fine (e.g. with FCO ItemSaver or AdvancedFilters). -> LibFilters is not working standalone so what addon do you use that enables LibFilters? Just installig and enabling LibFilters does nothing ![]() I can see by the screenshots too (colored prices, big (i) icon top left e.g.) that you got other addons enabled in combination so you need to test please with ALL other addons disabled, only enable the 1 addon that uses LibFilters 3 + it's needed dependencies. Does it work then? If not: Tell me the addon that you used there and what to click "in single steps from login/reloadui to the problem" please and I will have a look. If the error only happens as you use multiple addons, like AwesomeGuildStore, MasterMerchant, Advanced Filters and others in combination: Find out which of your installed and configured addons interfere please as I cannot do that. AddOns behave different based on their settings too so this cannot be rebuild at my spot, it's your homework to do then ![]() If you find out which addons in combination create that problem tell me please and try to find out what is the "minimum needed enabled addons and libraries to produce the bug", and then tell me the "single steps from login/reloaduI" to reproduce it please. Many thanks
Last edited by Baertram : 08/08/23 at 01:50 AM.
|
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |