View Single Post
12-17-13, 05:00 PM   #2
Nimhfree
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 267
Not knowing how Aurora works internally and not actually terribly proficient in UI design myself, I will comment anyway. :-)

I would think if Aurora were working in a standalone mode it should be in control of how it changes the Blizzard UI. You might have only one theme or many depending on what you want to do. For your saved state, only save the theme that Aurora sets itself.

If Aurora is in slave mode (another addon is telling Aurora how to present a specific theme), I would imagine that master addon would have the optional dependency on Aurora, and the master would specify to Aurora the colors, textures, callbacks, etc. that are needed for Aurora to do its job. In this case Aurora should not save any specific settings as Aurora is not in control of the theme.

This should allow Aurora not to depend on any other addon, and let other master addons control how Aurora is used. If there is more than one master addon, that is not something Aurora needs to worry about since the user is in control of how the master addons are supposed to work. Let all hell break loose and let the master addon developers work it out.

Therefore, all you will need to do for multiple theme support is design your API to assume there will be multiple themes possible. All things that can be set by the theme should be overridable/definable/etc. You should be able to have any addon provide these theme configuration objects. In fact, Aurora should use its own API to do this itself. That is the perfect test of whether another addon will be able to use Aurora's themes properly because you use them yourself. Depending on how Aurora interacts with the Blizzard UI elements, you may be able to switch themes on the fly, or even have master addons do the same.

What gets interesting is if you allow users to override settings in a theme. Basically I am assuming a theme is a set of colors, textures, box widths, etc. If you do not allow the user to change the settings in a theme you only need to know what theme the user has selected in Aurora to put into your saved variables. Likewise, without letting the user to override values, you need not record any information from a theme from a master addon since Aurora is not in control of that. If, however, you allow the user to pick a theme, but then modify it a bit, you will want to record how the user's setting differ from the defaults for the theme. Then when the user reloads you can apply the default theme values modified by the user's specific choices. Now, in the case when Aurora is a slave addon to a master, the master should probably indicate to Aurora whether Aurora is allowed to override theme settings. If so, you need to decide whether the master should record the differences from the theme's defaults or whether Aurora needs to do this. My inclination is to let the master do this, which allows Aurora not to worry about anything concerning masters. If not, you would want to record the master addon's name with the modifications from defaults for the specified theme (assuming upon reload the master will once again pass in the theme and its defaults to Aurora).

For actual implementation I would make sure you keep the default information for a theme intact and separate from the actual values the user could change. This would allow you to easily reset back to default values for a theme. Depending on how much information you have associated with a theme you might just save the current theme values for when Aurora is in control vice saving differences from the default values.

You might want to consider being able to save multiple modified themes like profiles. You might want multiple toons to be able to access these profiles. If you do this, you might also think about being able to do so for themes that are provided by master addons, but this is where you find the biggest flaw because Aurora seems like it should know nothing about the master addon, and if it needed a callback from a master addon the profile you save from it would not be portable.

Sorry for the ranting...hopefully there is something in there that helps.
  Reply With Quote