View Single Post
04-05-17, 03:15 AM   #5
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
personally, having used an addon that had each module in seperate folders in the AddOns folder, rather than all self-contained in a single "xxUI" folder was rather cumbersome.

When I was given the project by the original author, I condensed everything into the main folder, with a more standardized layout;
core - Holds all core lua files, sich as databases, libraries, menus, slashcommands, etc
embeds - all of the "extra" addons, like chat frame, buff frame, minimap, quest tracker, etc
Libs - A 3rd party Libraries folder for stuff like Ace and LibSharedMedia
media - all font, audio and image files used by the addon
modules - Since the base of the UI is from oUF, all oUF based 'modules' are held here, like oUF_ArtifacePower
units - contains lua files for each individual unitframe that is changes (target, party, pet, player, etc)

The "embeds" folder is where all the once "loaded seperately" addons went into, since the core addon itself does not rely on them, you can easily make them use-configurable by having a config.lua file in the main addon folder with something like this:
Code:
  cfg.embeds = {
	rChat = true, -- Simple chat frame
	rActionBarStyler = true, -- Simple actionbar styler for Roth UI 
	rButtonTemplate = true, -- Simple button skinning mod
	rMinimap = true, -- Simplistic square minimap
	rNamePlates = true, -- Diablo style Nameplates
	rInfoStrings = true, -- Information text displayed under Minimap
	rRaidManager = true, -- Replacement for blizzard's pull-out raid manager
	rTooltip = true, -- Diablo styled tooltips
	tullaRange = true, -- Creates Red/Blue overlay over icons that are not useable due to range or lack of resources
	Roth_ShinyBuffs = true, -- ShinyBuffs buff frame, edited for use with Roth UI
	rObjectiveTracker = true, -- Simple drag and resizeable Objective Tracker frame
	RothFont = true, -- makes game client use a font (as defined in config file) for all game text
  }
If for example, you wanted to turn off RothFont; simply change 'true' to 'false' on it's line, and have a check in the "embeds/RothFont/core.lua" file at the beginning like this:
Code:
if not cfg.embeds.RothFont then return end
You can do this for every module that is able to be independently disabled, including specific unit frames like party, target, etc.

This gives users the best of both worlds - A simplistic "single folder" for your entire UI, but also the ability to easily enable/disable parts they do/don't want to use.
These enable/disable switches can also be incorporated into an in-game menu, you just have the menu write a true or false value to a database, then have the module check the corresponding value in the database when it loads (this does mean a /reload is required for enabling/disabling modules to take effect, but so would editing a config file directly)
  Reply With Quote