Quantcast
Download
(7 Kb)
Download
Updated: 02/27/19 03:56 AM
Pictures
File Info
Compatibility:
Wrathstone (4.3)
Updated:02/27/19 03:56 AM
Created:06/14/14 02:23 PM
Monthly downloads:2,801
Total downloads:7,829
Favorites:22
MD5:
Categories:Discontinued & Outdated, Libraries
4.3
Harven's Addon Settings  Popular! (More than 5000 hits)
Version: 1.0.7.2
by: Harven [More]
Description
With this addon you can create and add your addon settings to the common settings page. The functionality is similar to great Seerah's LibAddonMenu addon but it's written from scratch. The settings page can be found in Settings->Addons menu. When you open that menu you will see sorted addons names. Chosen addon setting will appear after clicking addon name. Main features:
- only one addon settings are visible at a time,
- no control is created when you define your addon settings to avoid "Too many anchors processed" error,
- controls are created when you select an addon,
- when you select another addon the controls are reused, so the number of controls will stay at decent level

Usage
Copy "LibHarvensAddonSettings" folder content to "libs" folder inside your addon folder (excluding "LibHarvensAddonSettings.txt" file). Then edit your addon manifest file and add following lines:
Code:
libs/LibStub/LibStub.lua
libs/LibHarvensAddonSettings/LibHarvensAddonSettings.lua
Then take a look at this example addon:
lua: HarvensAddonSettingsExample.lua
manifest: HarvensAddonSettingsExample.txt

Version 1.0.7.2
- Lots of changes since last update ;)

Version 1.0.4
- Added support for default values and "Defaults" button handler,
- Settings controls can be enabled/disabled,
- Done some code refactoring,
- Support for optional "options" table as second parameter to LibHarvensAddonSettings:AddAddon(), see example addon.

Version 1.0.3
- Fixed exception caused by adding more than one addon with the same name,
- Colors are removed from addons names.

Version 1.0.2
- Made some fixes suggested by Garkin.

Version 1.0.1
- Removed whole .xml file because when used in more than one addon, virtual controls were redefined and ESO doesn't like it. Insted the controls are created inside the lua code (still using control pools).
Optional Files (0)


Archived Files (5)
File Name
Version
Size
Uploader
Date
1.0.4
7kB
Harven
06/19/14 03:39 PM
1.0.3
6kB
Harven
06/17/14 10:37 AM
1.0.2
6kB
Harven
06/15/14 10:51 AM
1.0.1
6kB
Harven
06/14/14 03:58 PM
1.0.0
6kB
Harven
06/14/14 02:23 PM


Post A Reply Comment Options
Unread 11/09/14, 11:16 AM  
gillysan

Forum posts: 5
File comments: 126
Uploads: 0
I think I understand now, this is for addon authors. I'm not an addon author so I'll stick to bringing issues to the individual addons you have published. Thanks for the reply.
Report comment to moderator  
Reply With Quote
Unread 11/09/14, 05:10 AM  
Harven
 
Harven's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 272
Uploads: 31
Hey gillysan,
These are instructions for addon authors. If you are here because some of my addons are broken with the new patch, then check them again because they are already updated.

Originally Posted by gillysan
Usage instructions need some clarifications....

"Inside your addon" does this mean the individual Harven's addon folders? If so, what about the Harven's folders that do not have a libs subfolder?

The txt file copy/paste portion is only needed if the above is true regarding the libs folder already present in the Harven's addons.

I am not at all sure what to do at this point. Do I copy this lua file to some folder? Do I copy/paste code inside this example.lua into the another lua file? If so, copy to beginning or end?
Report comment to moderator  
Reply With Quote
Unread 11/06/14, 11:17 AM  
gillysan

Forum posts: 5
File comments: 126
Uploads: 0
Usage instructions need some clarifications....

Copy "LibHarvensAddonSettings" folder content to "libs" folder inside your addon folder (excluding "LibHarvensAddonSettings.txt" file).
"Inside your addon" does this mean the individual Harven's addon folders? If so, what about the Harven's folders that do not have a libs subfolder?

The txt file copy/paste portion is only needed if the above is true regarding the libs folder already present in the Harven's addons.

Then take a look at this example addon:
I am not at all sure what to do at this point. Do I copy this lua file to some folder? Do I copy/paste code inside this example.lua into the another lua file? If so, copy to beginning or end?
Report comment to moderator  
Reply With Quote
Unread 11/04/14, 02:44 PM  
votan
 
votan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 480
File comments: 1098
Uploads: 30
Hot Fix for Update 1.5.2

Originally Posted by Teryl
I got the following error this evening after installing eso 1.5.2 update


2014-11-04T20:15:10.139+12:00 |cff0000Lua Error: EsoUI/Common/ZO_Options/ZO_SharedOptions.lua:23: attempt to index a nil value
stack traceback:
EsoUI/Common/ZO_Options/ZO_SharedOptions.lua:23: in function 'ZO_SharedOptions:InitializeControl'
EsoUI/Common/ZO_Options/Keyboard/ZO_Options_Keyboard.lua:61: in function 'ZO_KeyboardOptions:InitializeControl'
EsoUI/Common/ZO_Options/Keyboard/ZO_Options_Keyboard.lua:98: in function 'ZO_OptionsWindow_InitializeControl'
user:/AddOns/HarvensPotionsAlert/libs/LHAS/LibHarvensAddonSettings.lua:628: in function 'AddonSettings:AddToOptionsPanel'
user:/AddOns/HarvensPotionsAlert/libs/LHAS/LibHarvensAddonSettings.lua:806: in function 'OptionsWindowFragmentStateChange'
EsoUI/Libraries/Utility/ZO_CallbackObject.lua:86: in function 'ZO_CallbackObject:FireCallbacks'
EsoUI/Libraries/ZO_Scene/ZO_Scene.lua:234: in function 'ZO_Scene:SetState'
EsoUI/Libraries/ZO_Scene/ZO_SceneManager.lua:113: in function 'ZO_SceneManager:ShowScene'
EsoUI/Libraries/ZO_Scene/ZO_SceneManager.lua:327: in function 'ZO_SceneManager:OnSceneStateChange'
EsoUI/Ingame/Scenes/IngameSceneManager.lua:221: in function 'ZO_IngameSceneManager:OnSceneStateChange'|r
** link removed by myself **
Harven has updated the library with help of Garkin already. If you still need an updated version, you can copy it from one of Harven's addons.
__________________
@votan73 (EU - megaserver)
Last edited by votan : 11/07/14 at 05:04 AM.
Report comment to moderator  
Reply With Quote
Unread 06/19/14, 06:36 AM  
Harven
 
Harven's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 272
Uploads: 31
Hey,
As you probably know, this library isn't just appearance changing replacement for LAM. I took different approach in creating controls (reusable controls) and control panels. I think it's better that way and some addon authos may agree and other may disagree so it's good to have some alternative (from dev point of view). Authors that will use my library (it will be probably just me ) can then write in thier addon description that users can get lam2has or has2lam to unify the appearance.

If I release just one addon - lam2has - there will be a little interest because settings menu appearance isn't that important and users will not understand the benefits gained from using that addon.
Report comment to moderator  
Reply With Quote
Unread 06/19/14, 01:43 AM  
Sasky
AddOn Author - Click to view AddOns

Forum posts: 241
File comments: 89
Uploads: 4
You're releasing 3 addons, lam2has, has2lam, and has.

Under this model, for it to be "users' choice", they have to install either lam2has or has2lam to have a unified menu. Otherwise their menus are split up. As well, there's no notificaiton in-game of how to fix this.

All I'm saying is why not just leave all the creation code in lam and just make a single lam2has addon?
Here the user's choice is simple: if they want HAS, they install that addon.
Report comment to moderator  
Reply With Quote
Unread 06/18/14, 04:24 AM  
Harven
 
Harven's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 272
Uploads: 31
Hey,
I'll release lam2has addon which will mimic LAM-2.0 and instead create options with this library. I'll also make another adapter addon that will mimic this library and create options with LAM-2.0. That way it will be the user choice. The first adapter is here lam2has.lua i'll just remove LAM-1.0 adapter from it or try to implement delayed calls you suggested.
Report comment to moderator  
Reply With Quote
Unread 06/17/14, 06:58 PM  
Sasky
AddOn Author - Click to view AddOns

Forum posts: 241
File comments: 89
Uploads: 4
Nice to have an alternative, but one concern I have is having addons split between the two panels, separated by which library the author decided to use. Now, it would take a decent amount of re-coding, but what if you re-targeted this for end-users and made it essentially a skin replacing LAM2's panel. LAM2 would still have all the underlying structure code, but it might be possible to do it only replacing the panel and subpanel widgets from LAM2. Worst case you have to rewrite all the widgits, but I doubt it'll go to that.

That'd make it fully user's choice to switch view (by downloading the addon) and would keep all the addons in a single menu.

---------------------------

For some of the LAM1 addons that don't convert easily:
pChat, the couple under Wykkyd's Config menu (the subpanels), FTC, SpamFilter, SousChef
Report comment to moderator  
Reply With Quote
Unread 06/17/14, 10:52 AM  
Harven
 
Harven's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 272
Uploads: 31
Hey,
thanks Garkin. Fixed the lib. Maybe I'll abandon the idea of lam-1.0 to HAS adapter and release lam-2.0 to HAS adapter as an separate addon. Can you tell my what addons don't use standard LAM methods?
Report comment to moderator  
Reply With Quote
Unread 06/16/14, 05:47 PM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 853
File comments: 1120
Uploads: 33
Originally Posted by Harven
Hey,
Here is an adapter i made: lam2has.lua. It works for lam-2.0 and lam-1.0. Tried it with your Dustman and some lam-1.0 compatible addons. Tell me what you think
So far it looks good, there are still some bugs:
- If more addons use the same panel, it it fails with this error (for example Biki's addons):
Code:
Gui Warning: Failed to create control 'LibHarvensAddonSettingsAddonBiki's AddonsName'.  Duplicate name
Lua Error: user:/AddOns/LAddMin/Libs/LibHarvensAddonSettings/LibHarvensAddonSettings.lua:586: attempt to index a nil value
- Default panel from LAM-2.0 is displayed even if it is empty.
Warning: Spoiler

- Maybe you can remove custom colors from titles, it looks weird.
- Same as my LAddMin it does not work for addons which don't use standard LAM methods.

LibHarvensAddonSettings (with lam2has):


LibAddonMenu-2.0 (with LAddMin):
__________________
@Garkin (retired from ESO)
My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you!, ... (full list)
Report comment to moderator  
Reply With Quote
Unread 06/16/14, 02:30 PM  
Harven
 
Harven's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 272
Uploads: 31
Hey,
Here is an adapter i made: lam2has.lua. It works for lam-2.0 and lam-1.0. Tried it with your Dustman and some lam-1.0 compatible addons. Tell me what you think
Report comment to moderator  
Reply With Quote
Unread 06/15/14, 12:10 PM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 853
File comments: 1120
Uploads: 33
Originally Posted by Harven
Hey,
thanks for the code review Garkin . There was another problem with "container" control created in LibHarvensAddonSettings:Initialize(). When an older version created one, the newest vesion threw an error. So i just delayed initialization to GAME_MENU_SCENE "StateChange" handler. Should be ok now.
Update seems to working now, even if it doesn't work for update from the previous library version. I'm really not sure why do you use flag (LibHarvensAddonSettings.initialized) when you can use return value from LibStub - it will always tell you if it is the first time when library is loaded or if it is an update from the previous version.
Lua Code:
  1. local libraryTable, updateFrom = LibStub:NewLibrary(name, version)

Originally Posted by Harven
About LAM adapter - I don't get it. Please explain how do you see it from addon author and end user points of veiw.
As an user - I really do not care how author makes my addon work, I just want to have all settings at the same place so I do not need to remember where do I find it. It would be nice if all addons regardless of author, used library or whatever will have well arranged and easy accessible settings menu.

As an author - I want some kind of standard way how to create settings menu. How this menu will be displayed is user's choice. User can decide if he wants to show settings as buttons (LAM-2.0) or clickable headers (your library), everyting depends on what user interface is installed.

Originally Posted by Harven
A link between AddonManager and settings menu is a nice idea. I'll try to implement something like that.

Multiline editboxes - maybe
__________________
@Garkin (retired from ESO)
My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you!, ... (full list)
Report comment to moderator  
Reply With Quote
Unread 06/15/14, 11:07 AM  
Harven
 
Harven's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 272
Uploads: 31
Hey,
thanks for the code review Garkin . There was another problem with "container" control created in LibHarvensAddonSettings:Initialize(). When an older version created one, the newest vesion threw an error. So i just delayed initialization to GAME_MENU_SCENE "StateChange" handler. Should be ok now.

About LAM adapter - I don't get it. Please explain how do you see it from addon author and end user points of veiw.

A link between AddonManager and settings menu is a nice idea. I'll try to implement something like that.

Multiline editboxes - maybe
Report comment to moderator  
Reply With Quote
Unread 06/14/14, 08:15 PM  
SkOODaT
 
SkOODaT's Avatar
AddOn Author - Click to view AddOns

Forum posts: 58
File comments: 143
Uploads: 10
love your addons using a lot of them but i second

"As both your library and LAM-2.0 uses tables (and pretty much the same), do you plan some kind of adapter, so user can register menu created with one library to another? I would like to have settings from all addons at the same place."

I am in the middle of converting my menus to LAM2.0 figured everyone was going that way eventually, would be awesome to get everything under the same place for the end user
Would be nice if someone came up with a way to inject LAM1 menus into the new systems too to clean up the settings UI Till everyones converted to whatever menu system
Report comment to moderator  
Reply With Quote
Unread 06/14/14, 06:30 PM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 853
File comments: 1120
Uploads: 33
First impressions

So far it looks really good, especially I like the idea of control pools. A few questions and comments:
  • As both your library and LAM-2.0 uses tables (and pretty much the same), do you plan some kind of adapter, so user can register menu created with one library to another? I would like to have settings from all addons at the same place.
  • Do you plan any link between AddonManager and settings menu? Something like ckaotik requested here. It is better to have everything under addons then separate panel under settings.
  • Use localized strings (line 525, instead of "Addons" use GetString(SI_GAME_MENU_ADDONS))
  • Make "ret" local (line 11 and line 304)
  • No multiline editboxes with scroll containers? I personally do not need them, just asking. I'm having nightmares about editboxes with scroll containers and too many anchors... I just want to see that someone can make it work.
  • As I can see, you are using callbacks. To unregister callback (when library is being updated) you will need reference to the function, so anonymous functions are not good. I recommed using something like:
    Lua Code:
    1. local name, version = "LibHarvensAddonSettings-1.0", 1
    2. local lib, oldversion = LibStub:NewLibrary(name, version)
    3. if not lib then return end
    4. lib.version = version
    5.  
    6. local func
    7. func = function(...)
    8.    if lib.version ~= version then
    9.       CALLBACK_MANAGER:UnregisterCallback("MyCallback", func)
    10.    end
    11.    --your code
    12. end
    13. CALLBACK_MANAGER:RegisterCallback("MyCallback", func)
__________________
@Garkin (retired from ESO)
My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you!, ... (full list)
Last edited by Garkin : 06/15/14 at 03:15 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: