Download
(8 Kb)
Download
Updated: 12/11/22 10:24 AM
Pictures
File Info
Compatibility:
Firesong (8.2.5)
Lost Depths (8.1.5)
High Isle (8.0.0)
Updated:12/11/22 10:24 AM
Created:07/22/22 09:40 AM
Monthly downloads:175
Total downloads:5,665
Favorites:11
MD5:
AddonCategory  Popular! (More than 5000 hits)
Version: 1.5.3
by: Floliroy [More]
Quick Description

This addon allows you to associate your addons to custom categories.
Each categories can be reordered like you would like.


Categories

There is already some categories created :
User Interface, Trackers, Combat, PvE, PvP, Util, Craft, Housing, Map, Class

You can create how many new categories that you want.

AddonCategory also have some addons already put into categories.


For Authors

You can assign your own addon to a category if the addon doesn't already have a category linked to it.
Exemple if you want to set your addon's category "Combat" :
Lua Code:
  1. --Add this to your OnAddOnLoaded function
  2. if AddonCategory then
  3.     AddonCategory.AssignAddonToCategory(addonName, AddonCategory.baseCategories.Combat)
  4. end
AddonCategory.baseCategories is :
Lua Code:
  1. AddonCategory.baseCategories = {
  2.     UserInterface = "User Interface",
  3.     Trackers = "Trackers",
  4.     Combat = "Combat",
  5.     PvE = "PvE",
  6.     PvP = "PvP",
  7.     Util = "Util",
  8.     Craft = "Craft",
  9.     Housing = "Housing",
  10.     Map = "Map",
  11.     Class = "Class",
  12. }



Let me know if there is any bugs !



Big thanks to MrPikPik and andy.s for helping me when i started developing this addon.
Version 1.5.3 :
Add libraries index into AddonCategory.indexCategories
You can access it with AddonCategory.getIndexOfCategory(GetString(SI_ADDON_MANAGER_SECTION_LIBRARIES))

Version 1.5.2 :
removed bulton-fr merge
=> Once again fully compatible with PerfectPixel
=> Tried to made it a minimum compatible with Votan's Addon List

Version 1.5.1 :
Add function AddonCategory.getIndexOfCategory(categoryName)

Version 1.5 :
Add compatibility to Votan's Addon List (thx to bulton-fr)

Version 1.4.1 :
API Bump

Version 1.4 :
Allow authors to asign themself to a category

Version 1.3 :
Added a button to select non assigned addons so you can assign them easily to categories

Version 1.2 :
Added option to enable / disable and to hide / show libraries
Added some addons into known sorted addons to categories

Version 1.1 :
Fixed some bad code thx to Baertram

Version 1.0 :
Initial version of the Add-On
Optional Files (1)
File Name
Version
Size
Author
Date
Type
1.0.0
8kB
04/04/24 09:34 AM
Patch


Archived Files (8)
File Name
Version
Size
Uploader
Date
1.5.2
8kB
Floliroy
12/10/22 11:39 AM
1.5.1
8kB
Floliroy
12/09/22 06:22 AM
1.5
8kB
Floliroy
12/07/22 10:53 PM
1.4.1
8kB
Floliroy
11/02/22 04:26 AM
1.4
68kB
Floliroy
10/25/22 03:34 AM
1.2
8kB
Floliroy
10/24/22 03:04 AM
1.1
8kB
Floliroy
07/22/22 12:57 PM
1
82kB
07/22/22 09:40 AM


Post A Reply Comment Options
Unread 12/11/22, 09:34 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 5058
File comments: 6125
Uploads: 78
One of your updates has broken compatibility (if this particular button was working before?) with Votans Addon List.
-> The button added by Votans addon, to scroll down to the "libraries" is not working anymore:


It does not scroll down to the libraries anymore, it does nothing except changing the texture.

I guess you maybe need to add the
Code:
## OptionalDependsOn: LibVotansAddonList
to make it load before your addon, so all changes and indices which Votan's addon needs will be stored properly BEFORE your categories are inserted and invalidate the old indices (only a wild guess!).

Tested with only Votans addon list (works), AddonSelector + Votans addon list (works), AddonCategory + Votans addon list (does not work),
AddonCategory + Addon Selector + Votans addon list (does not work)



Edit: After reviewing votan's code
Votan stores the index of the libraries in a variable
addon.libSectionDataIndex
Code:
do
	local orgAddAddonTypeSection = ZO_AddOnManager.AddAddonTypeSection
	function ZO_AddOnManager.AddAddonTypeSection(...)
		local self, isLibrary = ...
		if isLibrary then
			local addonEntries = self.addonTypes[isLibrary]
			local scrollData = ZO_ScrollList_GetDataList(self.list)
			addon.libSectionDataIndex = #addonEntries ~= 0 and #scrollData + 1 or 0
		end
		return orgAddAddonTypeSection(...)
	end
end
The optional dependency might not be enough! As the code will be run if the addon manager was opened later
So I guess your new added categories might be the problem here and you need to add some compatibility with Votan, if your addon is enabled.
Your addon returns the index of the libraries section and votan reads it from your global variable AddonCategory.librariesIndex e.g., if AddonCategory ~= nil
Last edited by Baertram : 12/11/22 at 09:38 AM.
Report comment to moderator  
Reply With Quote
Unread 12/11/22, 09:35 AM  
Floliroy
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 36
Uploads: 10
Originally Posted by Baertram
One of your updates has broken compatibility (if this particular button was working before?) with Votans Addon List.
-> The button added by Votans addon, to scroll down to the "libraries" is not working anymore:


It does not scroll down to the libraries anymore, it does nothing except changing the texture.

I guess you maybe need to add the
Code:
## OptionalDependsOn: LibVotansAddonList
to make it load before your addon, so all changes and indices which Votan's addon needs will be stored properly BEFORE your categories are inserted and invalidate the old indices (only a wild guess!).

Tested with only Votans addon list (works), AddonSelector + Votans addon list (works), AddonCategory + Votans addon list (does not work),
AddonCategory + Addon Selector + Votans addon list (does not work)
Yeah i said minimum compatibility i know that this button isnt working for now
Report comment to moderator  
Reply With Quote
Unread 12/11/22, 09:38 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 5058
File comments: 6125
Uploads: 78
See my edited post below, with a workaround idea. You need to talk to Votan I guess

I've meanwhile added your categories, and scroll to them, via right click on the search edit box of AddonSelector:


Unfortunately the scroll list always scrolls the selecte dindex to the center of the list, not to the top. So if you select "Util2 it will have Util shown in the center rows.. But well, betetr than nothing

Originally Posted by Floliroy
Originally Posted by Baertram
One of your updates has broken compatibility (if this particular button was working before?) with Votans Addon List.
-> The button added by Votans addon, to scroll down to the "libraries" is not working anymore:


It does not scroll down to the libraries anymore, it does nothing except changing the texture.

I guess you maybe need to add the
Code:
## OptionalDependsOn: LibVotansAddonList
to make it load before your addon, so all changes and indices which Votan's addon needs will be stored properly BEFORE your categories are inserted and invalidate the old indices (only a wild guess!).

Tested with only Votans addon list (works), AddonSelector + Votans addon list (works), AddonCategory + Votans addon list (does not work),
AddonCategory + Addon Selector + Votans addon list (does not work)
Yeah i said minimum compatibility i know that this button isnt working for now
Last edited by Baertram : 12/11/22 at 09:41 AM.
Report comment to moderator  
Reply With Quote
Unread 12/11/22, 10:06 AM  
Floliroy
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 36
Uploads: 10
Originally Posted by Baertram
One of your updates has broken compatibility (if this particular button was working before?) with Votans Addon List.
-> The button added by Votans addon, to scroll down to the "libraries" is not working anymore:


It does not scroll down to the libraries anymore, it does nothing except changing the texture.

I guess you maybe need to add the
Code:
## OptionalDependsOn: LibVotansAddonList
to make it load before your addon, so all changes and indices which Votan's addon needs will be stored properly BEFORE your categories are inserted and invalidate the old indices (only a wild guess!).

Tested with only Votans addon list (works), AddonSelector + Votans addon list (works), AddonCategory + Votans addon list (does not work),
AddonCategory + Addon Selector + Votans addon list (does not work)



Edit: After reviewing votan's code
Votan stores the index of the libraries in a variable
addon.libSectionDataIndex
Code:
do
	local orgAddAddonTypeSection = ZO_AddOnManager.AddAddonTypeSection
	function ZO_AddOnManager.AddAddonTypeSection(...)
		local self, isLibrary = ...
		if isLibrary then
			local addonEntries = self.addonTypes[isLibrary]
			local scrollData = ZO_ScrollList_GetDataList(self.list)
			addon.libSectionDataIndex = #addonEntries ~= 0 and #scrollData + 1 or 0
		end
		return orgAddAddonTypeSection(...)
	end
end
The optional dependency might not be enough! As the code will be run if the addon manager was opened later
So I guess your new added categories might be the problem here and you need to add some compatibility with Votan, if your addon is enabled.
Your addon returns the index of the libraries section and votan reads it from your global variable AddonCategory.librariesIndex e.g., if AddonCategory ~= nil
yeah i dont think i can directly modify addon.libSectionDataIndex from votan's addon so i will just add index of libraries into AddonCategory.indexCategories with GetString(SI_ADDON_MANAGER_SECTION_LIBRARIES) as key and index as value
Report comment to moderator  
Reply With Quote
Unread 01/26/23, 08:56 AM  
L4R5

Forum posts: 0
File comments: 6
Uploads: 0
Hi, I am trying to rework the addon categories to my own liking.

When I try to delete existing categories, nothing happens. Does it only work, when categories are empty ?

Edit:
I have just seen the message in the chat. Base categories cannot be deleted. Would be nice, if I could anyway.

Edit2:
renaming is also a bad idea, this breaks the whole addon system.

Edit3:
I just checked the saved variables. all the preloaded addon categories are not changed when renaming a base category. Only currently installed addons are updated. Once I install one of the preloaded addons the addon will not load anymore and addon configuration will be broken. Maybe also disable renaming base categories to avoid that. Or change to code to also handle not installed addons.
Last edited by L4R5 : 01/26/23 at 09:37 AM.
Report comment to moderator  
Reply With Quote
Unread 06/11/23, 08:58 AM  
iamdeadfrosty

Forum posts: 0
File comments: 23
Uploads: 0
dead addon

rip. incompat w everything fr
Report comment to moderator  
Reply With Quote
Unread 09/24/23, 02:15 PM  
BioNik

Forum posts: 0
File comments: 17
Uploads: 0
Sometimes addon broke and only option to fix it - delete savedVars...
So I dig in and found, that sometimes self.addonTypes[sV[name]] is nil for some reason.

So quick fix will be, replace in \AddonCategory\AddonCategory.lua line 83
Code:
        if sV[name] ~= nil then
            entryData.isCustomCategory = true
        elseif isLibrary ~= IS_LIBRARY then
            table.insert(AddonCategory.listNonAssigned, name)
        end
with this
Code:
        if sV[name] ~= nil and self.addonTypes[sV[name]] ~= nil then
            entryData.isCustomCategory = true
        elseif isLibrary ~= IS_LIBRARY then
            table.insert(AddonCategory.listNonAssigned, name)
        end
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.