Thread Tools Display Modes
03-15-14, 11:50 AM   #1
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Help with Ace coding.

Ok so im trying to change the way my addon looks things up and im trying to use Ace3 (I think) but I keep getting a error:
Code:
2x BasicUI-5.4.5\Media\LSMLaunch.lua:3: attempt to index field "db" (a nil value)
BasicUI-5.4.5\Media\LSMLaunch.lua:3: in main chunk

Locals:
Here is the .toc:
Code:
## Interface: 50400
## Author: Cokedriver
## Version: 5.4.5
## Title: |cff00B4FFBasic|rUI
## SavedVariables: BasicDB
## SavedVariablesPerCharacter: BasicDBPerCharacter
## OptionalDeps: SharedMedia, SharedMediaAdditionalFonts, DBM-Core, Recount, Blizzard_TimeManager, Blizzard_TradeSkillUI


<!-- Libs --!>
Libs\Libs.xml
Media\LSM.lua

<!-- Core --!>
Core\Engine.lua
Core\Core.lua

<!-- Media --!>
Media\LSMLaunch.lua

<!--------- MODULES ----------!>

<!-- General --!>
Modules\General\Font.lua
Modules\General\Autogreed.lua
Modules\General\CBOP.lua
Modules\General\BiggerTradeskill.lua
Modules\General\BlackBook.lua
Modules\General\Buttons.lua
Modules\General\Castbar.lua
Modules\General\Cooldown.lua
Modules\General\Merchant.lua
Modules\General\Minimap.lua
Modules\General\Nameplates.lua
Modules\General\OpenAll.lua
Modules\General\Powerbar.lua
Modules\General\Quest.lua
Modules\General\Quicky.lua
Modules\General\Skinning.lua
Modules\General\Vellum.lua
Modules\General\Watchframe.lua
Modules\General\FlashGatherNodes.lua
Modules\Unitframes\Unitframes.lua

<!-- Buffs --!>
Modules\Buffs\Buff.lua

<!-- Chat --!>
Modules\Chat\Chat.lua

<!-- Datatext --!>
Modules\Datatext\Datapanel.lua
Modules\Datatext\Positions.lua
Modules\Datatext\Colors.lua
Modules\Datatext\Coords.lua
Modules\Datatext\Professions.lua
Modules\Datatext\Stat1.lua
Modules\Datatext\Stat2.lua
Modules\Datatext\Battleground.lua
Modules\Datatext\Durability.lua
Modules\Datatext\System.lua
Modules\Datatext\Friends.lua
Modules\Datatext\Guild.lua
Modules\Datatext\Time.lua
Modules\Datatext\Bags.lua
Modules\Datatext\Dps.lua
Modules\Datatext\Hps.lua
Modules\Datatext\Spec.lua
Modules\Datatext\Zone.lua	
Modules\Datatext\Calltoarms.lua
Modules\Datatext\Recount.lua

<!-- Tooltip --!>
Modules\Tooltip\Tooltip.lua
Modules\Tooltip\Fade.lua
Modules\Tooltip\Health.lua
Here is the main part:
Lua Code:
  1. local BasicUI = LibStub("AceAddon-3.0"):NewAddon("BasicUI")
  2. local LSM = LibStub("LibSharedMedia-3.0")
  3.  
  4. local defaults = {
  5.     profile = {
  6.         -----------------
  7.         -- Media Options
  8.         -----------------
  9.         media = {
  10.             fontNormal = "BasicUI NORMAL",
  11.             fontBold = "BasicUI BOLD",
  12.             fontItalic = "BasicUI ITALIC",
  13.             fontBoldItalic = "BasicUI BOLD ITALIC",
  14.             fontNumber = "BasicUI NUMBER",
  15.             fontSize = 15,
  16.         },
  17.  
  18.         -------------------
  19.         -- General Options
  20.         -------------------
  21.         general = {
  22.             color = { r = 1, g = 1, b = 1},
  23.             classcolor = true,
  24.             cooldown = true,
  25.             slidebar = true,
  26.             btsw = true,
  27.             cbop = true,
  28.             quicky = true,
  29.             vellum = true,
  30.             watchframe = true,
  31.             flashmapnodes = true,
  32.             loot = {
  33.                 enable = true,
  34.                 disenchant = false,
  35.             }
  36.             BlackBook = {
  37.                 enable = true,
  38.                 AutoFill = true,
  39.                 contacts = {},
  40.                 recent = {},
  41.                 AutoCompleteAlts = true,
  42.                 AutoCompleteRecent = true,
  43.                 AutoCompleteContacts = true,
  44.                 AutoCompleteFriends = true,
  45.                 AutoCompleteGuild = true,
  46.                 ExcludeRandoms = true,
  47.                 DisableBlizzardAutoComplete = false,
  48.                 UseAutoComplete = true,
  49.             },
  50.             OpenAll = {
  51.                 enable = true,
  52.                 collected = true,
  53.                 OpenSpeed = 0.50,
  54.                 ChatOutput = 1,
  55.                 AHCancelled = true,
  56.                 AHExpired = true,
  57.                 AHOutbid = true,
  58.                 AHSuccess = true,
  59.                 AHWon = true,
  60.                 NeutralAHCancelled = true,
  61.                 NeutralAHExpired = true,
  62.                 NeutralAHOutbid = true,
  63.                 NeutralAHSuccess = true,
  64.                 NeutralAHWon = true,
  65.                 Attachments = true,
  66.                 SpamChat = true,
  67.                 KeepFreeSpace = 1,
  68.             },
  69.             buttons = {
  70.                 enable = true,
  71.                 showHotKeys = false,
  72.                 showMacronames = false,
  73.                 auraborder = false,
  74.                
  75.                 -- Button Colors
  76.                 color = {
  77.                     enable = true,
  78.                     OutOfRange = { r = 0.9, g = 0, b = 0 },
  79.                     OutOfMana = { r = 0, g = 0, b = 0.9 },         
  80.                     NotUsable = { r = 0.3, g = 0.3, b = 0.3 },
  81.                 },
  82.             }
  83.  
  84.         },
  85.  
  86.         ---------------
  87.         -- Buff Options
  88.         ----------------
  89.         buff = {
  90.             enable = true,
  91.             buffScale = 1.19,
  92.         }
  93.  
  94.         ------------------
  95.         --Castbar Options
  96.         ------------------
  97.         castbar = {
  98.             enable = true,
  99.             border = "Blizzard Tooltip",
  100.             background = "Blizzard Dialog Background Dark",
  101.             statusbar = "Blizzard",
  102.            
  103.  
  104.             CastingBarFrame = {
  105.                 enable = true,
  106.                 fontSize = 18,
  107.                 textPosition = "CENTER",
  108.                 enableLag = true,
  109.                 enableTimer = true,
  110.                 selfAnchor = "BOTTOM",
  111.                 relAnchor = "BOTTOM",
  112.                 offSetX = 0,
  113.                 offSetY = 175,
  114.             },
  115.             TargetFrameSpellBar = {
  116.                 enable = false,
  117.                 fontSize = 18,
  118.                 textPosition = "CENTER",
  119.                 enableLag = true,
  120.                 enableTimer = true,
  121.                 selfAnchor = "TOP",
  122.                 relAnchor = "TOP",
  123.                 offSetX = 0,
  124.                 offSetY = -250,
  125.             },
  126.             FocusFrameSpellBar = {
  127.                 enable = true,
  128.                 fontSize = 18,
  129.                 textPosition = "CENTER",
  130.                 enableLag = true,
  131.                 enableTimer = true,
  132.                 selfAnchor = "TOP",
  133.                 relAnchor = "TOP",
  134.                 offSetX = 0,
  135.                 offSetY = -165,
  136.             },
  137.             MirrorTimer1 = {
  138.                 enable = true,
  139.                 fontSize = 18,
  140.                 enableTimer = true,
  141.                 selfAnchor = "TOP",
  142.                 relAnchor = "TOP",
  143.                 offSetX = 0,
  144.                 offSetY = -75,
  145.             },
  146.             PetCastingBarFrame = {
  147.                 enable = true,
  148.                 fontSize = 18,
  149.                 textPosition = "CENTER",
  150.                 enableTimer = true,
  151.                 selfAnchor = "BOTTOM",
  152.                 relAnchor = "BOTTOM",
  153.                 offSetX = 0,
  154.                 offSetY = 200,
  155.             },
  156.         },
  157.  
  158.         ----------------
  159.         -- Chat Options
  160.         ----------------
  161.         chat = {
  162.             enable = true,
  163.             disableFade = false,
  164.             chatOutline = false,
  165.             windowborder = false,
  166.             enableborder = false,
  167.            
  168.             -- Chat Media
  169.             border = "Blizzard Tooltip",
  170.             background = "Blizzard Dialog Background Dark",
  171.             editboxborder = "Blizzard Tooltip",
  172.             editboxbackground = "Blizzard Dialog Background Dark",
  173.             sound = "Whisper",
  174.            
  175.             enableBottomButton = true,
  176.             enableHyperlinkTooltip = true,
  177.             enableBorderColoring = true,
  178.  
  179.             tab = {
  180.                 fontSize = 15,
  181.                 fontOutline = true,
  182.                 normalColor = {r = 1, g = 1, b = 1},
  183.                 specialColor = {r = 1, g = 0, b = 1},
  184.                 selectedColor = {r = 0, g = 0.75, b = 1},
  185.             },     
  186.         },
  187.            
  188.         ---------------------
  189.         -- Datatext Options
  190.         ---------------------
  191.         datatext = {   
  192.             enable = true,
  193.             tooltipadjust = true,
  194.  
  195.             -- Datapanel Media
  196.             border = "Blizzard Dialog",
  197.             background = "Blizzard Dialog Background Dark",
  198.            
  199.             top = false,                                        -- if = true then panel on top of screen, if = false panel below mainmenubar
  200.             fontsize = 15,                                      -- font size for panels.
  201.             bags = 9,                                           -- show space used in bags on panel.
  202.             system = 0,                                         -- show total memory and others systems info (FPS/MS) on panel.
  203.             wowtime = 0,                                        -- show time on panel.
  204.             guild = 4,                                          -- show number on guildmate connected on panel.
  205.             dur = 8,                                            -- show your equipment durability on panel.
  206.             friends = 6,                                        -- show number of friends connected.
  207.             dps_text = 0,                                       -- show a dps meter on panel.
  208.             hps_text = 0,                                       -- show a heal meter on panel.
  209.             spec = 5,                                           -- show your current spec on panel.
  210.             zone = 0,                                           -- show your current zone on panel.
  211.             coords = 0,                                         -- show your current coords on panel.
  212.             pro = 7,                                            -- shows your professions and tradeskills
  213.             stat1 = 1,                                          -- Stat Based on your Role (Avoidance-Tank, AP-Melee, SP/HP-Caster)
  214.             stat2 = 3,                                          -- Stat Based on your Role (Armor-Tank, Crit-Melee, Crit-Caster)
  215.             recount = 2,                                        -- Stat Based on Recount"s DPS
  216.             recountraiddps = false,                             -- Enables tracking or Recounts Raid DPS
  217.             calltoarms = 0,                                     -- Show Current Call to Arms.
  218.            
  219.             -- Color Datatext
  220.             colors = {
  221.                 color = { r = 0, g = 0, b = 1},                 -- datatext color if classcolor = false
  222.             },
  223.            
  224.             battleground = true,                                -- enable 3 stats in battleground only that replace stat1,stat2,stat3.
  225.  
  226.             bag = false,                                        -- True = Open Backpack; False = Open All bags
  227.  
  228.             -- Clock Settings
  229.             time24 = false,                                     -- set time to 24h format.
  230.             localtime = true,                                   -- set time to local time instead of server time.  
  231.                
  232.             -- FPS Settings
  233.             fps = {
  234.                 enable = true,                                  -- enable the FPS on the System Tooltip
  235.                 -- ONLY ONE OF THESE CAN BE TRUE   
  236.                 home = false,                                   -- Only Show Home Latency
  237.                 world = false,                                  -- Only Show World Latency
  238.                 both = true,                                    -- Show both Home and World Latency
  239.             },
  240.                
  241.             threatbar = true,                                   -- Enable the threatbar over the Center Panel.
  242.         },
  243.  
  244.         --------------------
  245.         -- Merchant Options
  246.         --------------------
  247.  
  248.         merchant = {
  249.             enable = true,                                      -- enable merchant module.
  250.             sellMisc = true,                                    -- allows the user to add spacific items to sell at merchant (please see the local filter in merchant.lua)
  251.             autoSellGrey = true,                                -- autosell grey items at merchant.
  252.             autoRepair = true,                                  -- autorepair at merchant.
  253.         },
  254.  
  255.         --------------------
  256.         -- Minimap Options
  257.         --------------------
  258.         minimap = {
  259.             enable = true,
  260.             gameclock = true,
  261.             farm = false,
  262.             farmscale = 3,
  263.         },
  264.  
  265.         ---------------------
  266.         -- Nameplates Options
  267.         ---------------------
  268.         nameplates = {
  269.             enable = true,
  270.             enableTankMode = true,              -- Color the nameplate threat border green, if you have no aggro
  271.             colorNameWithThreat = true,         -- The name has the same color as the threat of the unit (better visibility)
  272.  
  273.             showFullHP = true,
  274.             showLevel = true,
  275.             showTargetBorder = true,
  276.             showEliteBorder = true,
  277.             showTotemIcon = true,
  278.             abbrevLongNames = true,
  279.         },
  280.  
  281.         --------------------
  282.         -- Powerbar Options
  283.         --------------------
  284.         powerbar = {
  285.             enable = true,
  286.             background = "Blizzard Dialog Background Dark",
  287.             statusbar = "Blizzard",
  288.             position = {
  289.                 selfAnchor = "CENTER",
  290.                 frameParent = "UIParent",
  291.                 offSetX = 0,
  292.                 offSetY = -100
  293.             },
  294.             sizeWidth = 200,
  295.            
  296.             showCombatRegen = true,
  297.  
  298.             activeAlpha = 1,
  299.             inactiveAlpha = 0.5,
  300.             emptyAlpha = 0,
  301.            
  302.             valueAbbrev = true,
  303.                
  304.             valueFontSize = 20,
  305.             valueFontOutline = true,
  306.             valueFontAdjustmentX = 0,
  307.  
  308.             showSoulshards = true,
  309.             showHolypower = true,
  310.             showMana = true,
  311.             showFocus = true,
  312.             showRage = true,
  313.            
  314.             extraFontSize = 16,                             -- The fontsize for the holypower and soulshard number
  315.             extraFontOutline = true,                        
  316.                
  317.            
  318.             energy = {
  319.                 show = true,
  320.                 showComboPoints = true,
  321.                 comboPointsBelow = false,
  322.                
  323.                 comboFontSize = 16,
  324.                 comboFontOutline = true,
  325.             },
  326.            
  327.            
  328.             rune = {
  329.                 show = true,
  330.                 showRuneCooldown = true,
  331.                
  332.                 runeFontSize = 16,
  333.                 runeFontOutline = true,
  334.             },
  335.         },
  336.            
  337.         -----------------
  338.         -- Quest Options
  339.         -----------------
  340.         quest = {
  341.             enable = true,                                  -- enable quest module.
  342.             autocomplete = false,                           -- enable the autoaccept quest and autocomplete quest if no reward.
  343.         },
  344.  
  345.         -------------------------
  346.         -- Skinning Options
  347.         -------------------------
  348.         skin = {
  349.             enable = true,
  350.             border = "Blizzard Tooltip",
  351.             statusbar = "Blizzard",
  352.             DBM = true,
  353.             Recount = true,
  354.             RecountBackdrop = true,
  355.         },
  356.  
  357.         -------------------
  358.         -- Tooltip Options
  359.         -------------------
  360.         tooltip = {                                        
  361.             enable = true,                                  -- Move the tooltip up so its not overlapping the MainMenubar
  362.             fontSize = 15,
  363.             fontOutline = true,
  364.             disableFade = false,                            -- Can cause errors or a buggy tooltip!
  365.             abbrevRealmNames = true,    
  366.             border = "Blizzard Tooltip",
  367.             background = "Blizzard Dialog Background Dark",
  368.             statusbar = "Blizzard",
  369.             hideInCombat = false,                       -- Hide unit frame tooltips during combat  
  370.             hideRealmText = true,                      -- Hide the coalesced/interactive realm text
  371.             reactionBorderColor = true,
  372.             itemqualityBorderColor = true,
  373.            
  374.             showPlayerTitles = true,
  375.             showPVPIcons = false,                           -- Show pvp icons instead of just a prefix
  376.             showMouseoverTarget = true,
  377.             showOnMouseover = false,
  378.             showUnitRole = true,
  379.             showItemLevel = true,
  380.             showSpecializationIcon = false,
  381.  
  382.             position = {
  383.                 selfAnchor = "BOTTOM",
  384.                 relAnchor = "BOTTOM",
  385.                 offSetX = 0,
  386.                 offSetY = 200,
  387.             }
  388.            
  389.             healthbar = {
  390.                 showHealthValue = true,
  391.                 showOutline = true,
  392.                 healthFormat = '$cur / $max',           -- Possible: $cur, $max, $deficit, $perc, $smartperc, $smartcolorperc, $colorperc
  393.                 healthFullFormat = '$cur',              -- if the tooltip unit has 100% hp     
  394.                 textPos = "CENTER",                     -- Possible "TOP" "BOTTOM" "CENTER"
  395.                 reactionColoring = false,
  396.                 custom = {
  397.                     apply = false,
  398.                     color = { r = 1, g = 1, b = 0},
  399.                 },     
  400.                 fontSize = 15,
  401.             },     
  402.         },
  403.  
  404.  
  405.         --------------
  406.         -- Unitframes
  407.         --------------
  408.         unitframes = {
  409.            
  410.             enable = true,
  411.             player = {
  412.                 enable = true,          -- Enable Player Frame Adjustments
  413.                 scale = 1.15,           -- Player Frame Scale
  414.                 fontSize = 13,          -- Stausbar Font Size
  415.                 fontSizepet = 10,           -- Stausbar Font Size
  416.             },
  417.             target = {
  418.                 enable = true,          -- Enable Target Frame Adjustments
  419.                 scale = 1.15,           -- Target Frame Scale
  420.                 fontSize = 13,          -- Stausbar Font Size
  421.             },
  422.             focus = {
  423.                 enable = true,          -- Enable Focus Frame Adjustments
  424.                 scale = 1.15,           -- Focus Frame Scale
  425.                 fontSize = 13,          -- Stausbar Font Size
  426.             },
  427.             party = {
  428.                 enable = true,
  429.                 scale = 1.15,
  430.                 fontSize = 11,          -- Stausbar Font Size
  431.                 position = {
  432.                     relAnchor = "TOPLEFT",
  433.                     offSetX = 10,       -- Controls the X offset. (Left - Right)
  434.                     offSetY = -150,     -- Controls the Y offset. (Up - Down)
  435.                 },
  436.             },
  437.             arena = {
  438.                 enable = true,
  439.                 scale = 1.5,
  440.                 fontSize = 11,          -- Stausbar Font Size
  441.                 tracker = true,
  442.             },
  443.             boss = {
  444.                 enable = true,
  445.                 scale = 1.15,
  446.                 fontSize = 13,          -- Stausbar Font Size  
  447.                 position = {
  448.                     relAnchor = "TOPRIGHT",
  449.                     offSetX = -50,      -- Controls the X offset. (Left - Right)
  450.                     offSetY = -250,     -- Controls the Y offset. (Up - Down)
  451.                 },
  452.             },
  453.         }
  454.  
  455.  
  456.    
  457.     },
  458.     global = {
  459.         BlackBook = {
  460.             alts = {},
  461.         },
  462.     },
  463. }
  464.  
  465. function BasicUI:OnInitialize()
  466.   -- Assuming the .toc says ## SavedVariables: MyAddonDB
  467.   self.db = LibStub("AceDB-3.0"):New("BasicDB", defaults, true)
  468. end

and here is the error code for the LSMLaunch.lua:
Lua Code:
  1. local BasicUI = LibStub("AceAddon-3.0"):GetAddon("BasicUI")
  2. local LSM = LibStub("LibSharedMedia-3.0")
  3. local cfg = BasicUI.db.profile
  4. local B = BasicUI
  5.  
  6. -- Load All SharedMedia
  7.  
  8. -- Font Media
  9.  
  10. cfg.media.fontNormal = LSM:Fetch("font", cfg.media.fontNormal)
  11. cfg.media.fontBold = LSM:Fetch("font", cfg.media.fontBold)
  12. cfg.media.fontItalic = LSM:Fetch("font", cfg.media.fontItalic)
  13. cfg.media.fontBoldItalic = LSM:Fetch("font", cfg.media.fontBoldItalic)
  14. cfg.media.fontNumber = LSM:Fetch("font", cfg.media.fontNumber)
  15.  
  16. -- Minimap Media
  17. cfg.minimap.border = LSM:Fetch("border", cfg.minimap.border)
  18.  
  19. -- Skins Media
  20. cfg.skin.border = LSM:Fetch("border", cfg.skin.border)
  21. cfg.skin.statusbar = LSM:Fetch("statusbar", cfg.skin.statusbar)
  22.  
  23. -- Buff Media
  24. cfg.buff.border = LSM:Fetch("border", cfg.buff.border)
  25.  
  26. -- Castbar Media
  27. cfg.castbar.border = LSM:Fetch("border", cfg.castbar.border)
  28. cfg.castbar.background = LSM:Fetch("background", cfg.castbar.background)
  29. cfg.castbar.statusbar = LSM:Fetch("statusbar", cfg.castbar.statusbar)
  30.  
  31. -- Chat Media
  32. cfg.chat.border = LSM:Fetch("border", cfg.chat.border)
  33. cfg.chat.background = LSM:Fetch("background", cfg.chat.background)
  34. cfg.chat.editboxborder = LSM:Fetch("border", cfg.chat.editboxborder)
  35. cfg.chat.editboxbackground = LSM:Fetch("background", cfg.chat.editboxbackground)
  36. cfg.chat.sound = LSM:Fetch("sound", cfg.chat.sound)
  37.  
  38. -- Datatext Media
  39. cfg.datatext.border = LSM:Fetch("border", cfg.datatext.border)
  40. cfg.datatext.background = LSM:Fetch("background", cfg.datatext.background)
  41.  
  42. -- Nameplates Media
  43. cfg.nameplates.border = LSM:Fetch("border", cfg.nameplates.border)
  44. cfg.nameplates.background = LSM:Fetch("background", cfg.nameplates.background)
  45. cfg.nameplates.statusbar = LSM:Fetch("statusbar", cfg.nameplates.statusbar)
  46.  
  47. -- Powerbar Media
  48. cfg.powerbar.background = LSM:Fetch("background", cfg.powerbar.background)
  49. cfg.powerbar.statusbar = LSM:Fetch("statusbar", cfg.powerbar.statusbar)
  50.  
  51. -- Tooltip Media
  52. cfg.tooltip.border = LSM:Fetch("border", cfg.tooltip.border)
  53. cfg.tooltip.background = LSM:Fetch("background", cfg.tooltip.background)
  54. cfg.tooltip.statusbar = LSM:Fetch("statusbar", cfg.tooltip.statusbar)

for the longest time I just used the tukui/elvui format and I would like to eventually get back to the in-game options but for now I just would like to get it to work with Ace.

Be gental like I said I'm trying to use the new way and get away from my old habits. I know I'm along way from being a programmer but I enjoy more working with the code and stuff then playing WoW.


If you need more code please let me know.

Thanks
Coke
  Reply With Quote
03-15-14, 12:46 PM   #2
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
It's trying to access BasicUI.db, which gets defined in BasicUI.OnInitialize, but that doesn't get called until some time after all of your addon files have loaded. Namely, when the ADDON_LOADED event fires for your addon.
__________________
Grab your sword and fight the Horde!
  Reply With Quote
03-15-14, 01:03 PM   #3
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Originally Posted by Lombra View Post
It's trying to access BasicUI.db, ...
“It puts the lotion in the basket"


scnr
  Reply With Quote
03-15-14, 07:45 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
A simple solution would be to move the contents of your LSMLaunch.lua file into a callback function that gets called when your addon's active profile changes (or is loaded at login). Add this in your main file:

Lua Code:
  1. function BasicUI:OnInitialize()
  2.     self.db = LibStub("AceDB-3.0"):New("BasicDB", defaults, true)
  3.  
  4.     self.db.RegisterCallback(self, "OnProfileChanged", "OnProfileChanged")
  5.     self.db.RegisterCallback(self, "OnProfileCopied", "OnProfileChanged")
  6.     self.db.RegisterCallback(self, "OnProfileReset", "OnProfileChanged")
  7. end

And then modify your LSMLaunch.lua file like so:

Lua Code:
  1. local BasicUI = LibStub("AceAddon-3.0"):GetAddon("BasicUI")
  2. local LSM = LibStub("LibSharedMedia-3.0")
  3. local cfg
  4.  
  5. function BasicUI:OnProfileChanged()
  6.     cfg = BasicUI.db.profile
  7.  
  8.     -- Load All SharedMedia
  9.  
  10.     -- Font Media
  11.     cfg.media.fontNormal = LSM:Fetch("font", cfg.media.fontNormal)
  12.     cfg.media.fontBold = LSM:Fetch("font", cfg.media.fontBold)
  13.     cfg.media.fontItalic = LSM:Fetch("font", cfg.media.fontItalic)
  14.     cfg.media.fontBoldItalic = LSM:Fetch("font", cfg.media.fontBoldItalic)
  15.     cfg.media.fontNumber = LSM:Fetch("font", cfg.media.fontNumber)
  16.  
  17.     -- Minimap Media
  18.     cfg.minimap.border = LSM:Fetch("border", cfg.minimap.border)
  19.  
  20.     -- Skins Media
  21.     cfg.skin.border = LSM:Fetch("border", cfg.skin.border)
  22.     cfg.skin.statusbar = LSM:Fetch("statusbar", cfg.skin.statusbar)
  23.  
  24.     -- Buff Media
  25.     cfg.buff.border = LSM:Fetch("border", cfg.buff.border)
  26.  
  27.     -- Castbar Media
  28.     cfg.castbar.border = LSM:Fetch("border", cfg.castbar.border)
  29.     cfg.castbar.background = LSM:Fetch("background", cfg.castbar.background)
  30.     cfg.castbar.statusbar = LSM:Fetch("statusbar", cfg.castbar.statusbar)
  31.  
  32.     -- Chat Media
  33.     cfg.chat.border = LSM:Fetch("border", cfg.chat.border)
  34.     cfg.chat.background = LSM:Fetch("background", cfg.chat.background)
  35.     cfg.chat.editboxborder = LSM:Fetch("border", cfg.chat.editboxborder)
  36.     cfg.chat.editboxbackground = LSM:Fetch("background", cfg.chat.editboxbackground)
  37.     cfg.chat.sound = LSM:Fetch("sound", cfg.chat.sound)
  38.  
  39.     -- Datatext Media
  40.     cfg.datatext.border = LSM:Fetch("border", cfg.datatext.border)
  41.     cfg.datatext.background = LSM:Fetch("background", cfg.datatext.background)
  42.  
  43.     -- Nameplates Media
  44.     cfg.nameplates.border = LSM:Fetch("border", cfg.nameplates.border)
  45.     cfg.nameplates.background = LSM:Fetch("background", cfg.nameplates.background)
  46.     cfg.nameplates.statusbar = LSM:Fetch("statusbar", cfg.nameplates.statusbar)
  47.  
  48.     -- Powerbar Media
  49.     cfg.powerbar.background = LSM:Fetch("background", cfg.powerbar.background)
  50.     cfg.powerbar.statusbar = LSM:Fetch("statusbar", cfg.powerbar.statusbar)
  51.  
  52.     -- Tooltip Media
  53.     cfg.tooltip.border = LSM:Fetch("border", cfg.tooltip.border)
  54.     cfg.tooltip.background = LSM:Fetch("background", cfg.tooltip.background)
  55.     cfg.tooltip.statusbar = LSM:Fetch("statusbar", cfg.tooltip.statusbar)
  56. end)

However, there is a major flaw in your reasoning here. Presumably you are trying to convert names like "Arial Narrow" into file paths like "Fonts\\ARIALN__.ttf" for use in your addon, but with the code you are using, you are actually modifying what is saved in your addon's DB, so after the first time this code runs, "Arial Narrow" is no longer the value in the DB -- "Fonts\\ARIALN__.ttf" is -- and since LSM:Fetch requires a font name, not a file path, you will end up changing all of your fonts to whatever LSM's default font for your locale is, eg. "Fonts\\FRIZQT__ttf.".

What you should actually be doing, if you want to use LibSharedMedia, is storing the font name -- eg. "Arial Narrow" -- in your DB, and then look up the actual file path only when you're actually applying the font to a fontstring, eg:

Lua Code:
  1. local fontPath = LSM:Fetch("font", cfg.media.fontNormal)
  2. MY_FONT_STRING:SetFont(fontPath, 18, "OUTLINE")

Obviously, if you're setting the font on 20 fontstrings in the same chunk of code, you should only look up the font path once, and reuse the variable.

Finally, based on the contents of your defaults table you appear to be embedding part or all of Postal in your addon, which is a copyright no-no since that addon is not licensed under terms which allow you to redistribute it. Either get permission from Xinhuan to embed his addon, or write your own mailbox modules, or just recommend Postal as a companion to your UI.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.

Last edited by Phanx : 03-15-14 at 08:02 PM.
  Reply With Quote
03-16-14, 08:03 AM   #5
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Thank You everyone for your help. I had a come to Jesus moment and realized I'm not a coder or programmer I'm a copy, steal, and edit type person.

So with that in mind I will not be needing any more assistance, so I broke down BasicUI to the barbone UI, and all the "borrowed" code I asked permission for, also I removed the in-game config as it was borrowed from ElvUI version 1 without permission.

Again thanks for all the help but I think I'll leave the programming to the programmers and just enjoy the playing the game.
Ok so I posted the above statement but I can't give up that easy and I cant handle a default of someone else.

So all the code in my current addon I have asked permission from the code creators to use and edit said code to my likeings.

With that said I've completely changed how my addon is written now.

Here it is BasicUI.

I've been able to adapt the Ace3 db.

My question for anyone willing to help would be.

How do I setup an in-game config with my current layout?

My old config I was using was copied from one of the first editions of ElvUI and it was done in a separate addon.

I can work threw setting up the Options table but I do not know how to get the options to load with having to do a /reload or get the "get" or "set" functions to work.

Any help or direction would be great.

Thanks
Coke

Last edited by cokedrivers : 03-23-14 at 03:59 PM.
  Reply With Quote
03-24-14, 01:56 PM   #6
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Am I doing this correctly or am I missing a step?


Core:
Lua Code:
  1. local BasicUI = LibStub("AceAddon-3.0"):NewAddon("BasicUI")
  2.  
  3. -- Media --
  4. local BASIC_BORDER = [[Interface\Tooltips\UI-Tooltip-Border]]
  5. local BASIC_BACKGROUND = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]]
  6. local BASIC_STATUSBAR = [[Interface\TargetingFrame\UI-StatusBar]]
  7. local BASIC_BORDERPANEL = [[Interface\AddOns\BasicUI\Media\UI-DialogBox-Border.blp]]
  8.  
  9. SlashCmdList['RELOADUI'] = function()
  10.     ReloadUI()
  11. end
  12. SLASH_RELOADUI1 = '/rl'
  13.    
  14. local defaults = {
  15.  
  16.     profile = {
  17.    
  18.         ModuleEnabledState = {
  19.             ["*"] = true
  20.         },
  21.        
  22.         fontNormal =        [[Interface\Addons\BasicUI\Media\NORMAL.ttf]],
  23.         fontBold =          [[Interface\Addons\BasicUI\Media\BOLD.ttf]],
  24.         fontItalic =        [[Interface\Addons\BasicUI\Media\ITALIC.ttf]],
  25.         fontBoldItalic =    [[Interface\Addons\BasicUI\Media\BOLDITALIC.ttf]],
  26.         fontNumber =        [[Interface\Addons\BasicUI\Media\NUMBER.ttf]],
  27.         fontSize = 15,
  28.         classcolor = true,
  29.        
  30.         actionbar = {  
  31.             showHotKeys = false,
  32.             showMacronames = false,
  33.             auraborder = false,
  34.            
  35.             -- Button Colors
  36.             color = {
  37.                 enable = true,
  38.                 OutOfRange = { r = 0.9, g = 0, b = 0 },
  39.                 OutOfMana = { r = 0, g = 0, b = 0.9 },         
  40.                 NotUsable = { r = 0.3, g = 0.3, b = 0.3 },
  41.             },
  42.         },
  43.        
  44.         buff = {
  45.             scale = 1.19,
  46.         },
  47.        
  48.         castbar = {
  49.             border = BASIC_BORDER,
  50.             background = BASIC_BACKGROUND,
  51.             statusbar = BASIC_STATUSBAR,
  52.            
  53.  
  54.             CastingBarFrame = {
  55.                 enable = true,
  56.                 fontSize = 18,
  57.                 textPosition = "CENTER",
  58.                 enableLag = true,
  59.                 enableTimer = true,
  60.                 selfAnchor = "BOTTOM",
  61.                 relAnchor = "BOTTOM",
  62.                 offSetX = 0,
  63.                 offSetY = 175,
  64.             },
  65.             TargetFrameSpellBar = {
  66.                 enable = false,
  67.                 fontSize = 18,
  68.                 textPosition = "CENTER",
  69.                 enableLag = true,
  70.                 enableTimer = true,
  71.                 selfAnchor = "TOP",
  72.                 relAnchor = "TOP",
  73.                 offSetX = 0,
  74.                 offSetY = -250,
  75.             },
  76.             FocusFrameSpellBar = {
  77.                 enable = true,
  78.                 fontSize = 18,
  79.                 textPosition = "CENTER",
  80.                 enableLag = true,
  81.                 enableTimer = true,
  82.                 selfAnchor = "TOP",
  83.                 relAnchor = "TOP",
  84.                 offSetX = 0,
  85.                 offSetY = -165,
  86.             },
  87.             MirrorTimer1 = {
  88.                 enable = true,
  89.                 fontSize = 18,
  90.                 enableTimer = true,
  91.                 selfAnchor = "TOP",
  92.                 relAnchor = "TOP",
  93.                 offSetX = 0,
  94.                 offSetY = -75,
  95.             },
  96.             PetCastingBarFrame = {
  97.                 enable = true,
  98.                 fontSize = 18,
  99.                 textPosition = "CENTER",
  100.                 enableTimer = true,
  101.                 selfAnchor = "BOTTOM",
  102.                 relAnchor = "BOTTOM",
  103.                 offSetX = 0,
  104.                 offSetY = 200,
  105.             },
  106.         },     
  107.         chat = {
  108.             disableFade = false,
  109.             chatOutline = false,
  110.             windowborder = false,
  111.             enableborder = false,
  112.            
  113.             -- Chat Media
  114.             border = BASIC_BORDER,
  115.             background = BASIC_BACKGROUND,
  116.             editboxborder = BASIC_BORDER,
  117.             editboxbackground = BASIC_BACKGROUND,
  118.             sound = [[Interface\Addons\BasicUI\Media\Whisper.mp3]],
  119.            
  120.             enableBottomButton = true,
  121.             enableHyperlinkTooltip = true,
  122.             enableBorderColoring = true,
  123.  
  124.             tab = {
  125.                 fontSize = 15,
  126.                 fontOutline = true,
  127.                 normalColor = {r = 1, g = 1, b = 1},
  128.                 specialColor = {r = 1, g = 0, b = 1},
  129.                 selectedColor = {r = 0, g = 0.75, b = 1},
  130.             },     
  131.         }
  132.         datapanel = {
  133.             enable = true,
  134.             battleground = true,                                -- enable 3 stats in battleground only that replace stat1,stat2,stat3.
  135.             bag = false,                                        -- True = Open Backpack; False = Open All bags         
  136.  
  137.             -- nData Media
  138.             border = BASIC_BORDERPANEL,                         -- Border for Datapanel ( Choose either Datapanel or Neav for border choice)
  139.             background = BASIC_BACKGROUND,                      -- Background for Datapanel
  140.            
  141.             -- Color Datatext
  142.             color = true,                                       -- Enable Datatext Coloring    
  143.             customcolor = { r = 1, g = 1, b = 1},               -- Color of Text for Datapanel
  144.             classcolor = true,                                  -- Enable Classcolor for Text
  145.            
  146.             panel = "bottom",                                   -- 3 Choices for panel placement = "top", "bottom", or "shortbar". Shortbar is to match nMainbar shortbar.
  147.             armor = 0,                                          -- show your armor value against the level mob you are currently targeting.
  148.             avd = 0,                                            -- show your current avoidance against the level of the mob your targeting 
  149.             bags = 9,                                           -- show space used in bags on panel.
  150.             haste = 0,                                          -- show your haste rating on panels.   
  151.             system = 0,                                         -- show total memory and others systems info (FPS/MS) on panel.
  152.             guild = 4,                                          -- show number on guildmate connected on panel.
  153.             dur = 8,                                            -- show your equipment durability on panel.
  154.             friends = 6,                                        -- show number of friends connected.
  155.             dps_text = 0,                                       -- show a dps meter on panel.
  156.             hps_text = 0,                                       -- show a heal meter on panel.
  157.             spec = 5,                                           -- show your current spec on panel.
  158.             coords = 0,                                         -- show your current coords on panel.
  159.             pro = 7,                                            -- shows your professions and tradeskills
  160.             stat1 = 1,                                          -- Stat Based on your Role (Avoidance-Tank, AP-Melee, SP/HP-Caster)
  161.             stat2 = 3,                                          -- Stat Based on your Role (Armor-Tank, Crit-Melee, Crit-Caster)
  162.             recount = 2,                                        -- Stat Based on Recount"s DPS
  163.             recountraiddps = false,                             -- Enables tracking or Recounts Raid DPS
  164.             calltoarms = 0,                                     -- Show Current Call to Arms.
  165.            
  166.         },
  167.         -- Merchant Options
  168.         merchant = {
  169.             sellMisc = true,        -- allows the user to add spacific items to sell at merchant (please see the local filter in merchant.lua)
  170.             autoSellGrey = true,    -- autosell grey items at merchant.
  171.             autoRepair = true,      -- autorepair at merchant.
  172.             gpay = false,           -- let your guild pay for your repairs if they allow.
  173.         },
  174.         minimap = {
  175.             enable = true,
  176.             gameclock = true,
  177.             farm = false,
  178.             farmscale = 1.5,
  179.         }
  180.         nameplates = {
  181.             enableTankMode = true,              -- Color the nameplate threat border green, if you have no aggro
  182.             colorNameWithThreat = true,         -- The name has the same color as the threat of the unit (better visibility)
  183.  
  184.             showFullHP = true,
  185.             showLevel = true,
  186.             showTargetBorder = true,
  187.             showEliteBorder = true,
  188.             showTotemIcon = true,
  189.             abbrevLongNames = true,
  190.         },
  191.        
  192.         -- Quest Options
  193.         quest = {
  194.             enable = true,          -- enable quest module.
  195.             autocomplete = false,   -- enable the autoaccept quest and autocomplete quest if no reward.
  196.         },
  197.        
  198.         vendor = {
  199.             enable = true,
  200.         },
  201.        
  202.         vellum = {
  203.             enable = true,
  204.         },
  205.        
  206.         -- Tooltip
  207.         tooltip = {                                        
  208.             fontSize = 15,
  209.             fontOutline = true,
  210.             disableFade = false,                            -- Can cause errors or a buggy tooltip!
  211.             abbrevRealmNames = true,    
  212.             border = BASIC_BORDER,
  213.             background = BASIC_BACKGROUND,
  214.             statusbar = BASIC_STATUSBAR,
  215.             hideInCombat = false,                       -- Hide unit frame tooltips during combat  
  216.             hideRealmText = true,                      -- Hide the coalesced/interactive realm text
  217.             reactionBorderColor = true,
  218.             itemqualityBorderColor = true,
  219.            
  220.             showPlayerTitles = true,
  221.             showPVPIcons = false,                           -- Show pvp icons instead of just a prefix
  222.             showMouseoverTarget = true,
  223.             showOnMouseover = false,
  224.             showUnitRole = true,
  225.             showItemLevel = true,
  226.             showSpecializationIcon = false,
  227.  
  228.             position = {
  229.                 selfAnchor = "BOTTOM",
  230.                 relAnchor = "BOTTOM",
  231.                 offSetX = 0,
  232.                 offSetY = 200,
  233.             }
  234.            
  235.             healthbar = {
  236.                 showHealthValue = true,
  237.                 showOutline = true,
  238.                 healthFormat = '$cur / $max',           -- Possible: $cur, $max, $deficit, $perc, $smartperc, $smartcolorperc, $colorperc
  239.                 healthFullFormat = '$cur',              -- if the tooltip unit has 100% hp     
  240.                 textPos = "CENTER",                     -- Possible "TOP" "BOTTOM" "CENTER"
  241.                 reactionColoring = false,
  242.                 custom = {
  243.                     apply = false,
  244.                     color = { r = 1, g = 1, b = 0},
  245.                 },     
  246.                 fontSize = 15,
  247.             },     
  248.         },
  249.        
  250.         -- Unitframes
  251.         unitframes = {
  252.             player = {
  253.                 enable = true,          -- Enable Player Frame Adjustments
  254.                 scale = 1.15,           -- Player Frame Scale
  255.                 fontSize = 13,          -- Stausbar Font Size
  256.                 fontSizepet = 10,           -- Stausbar Font Size
  257.             },
  258.             target = {
  259.                 enable = true,          -- Enable Target Frame Adjustments
  260.                 scale = 1.15,           -- Target Frame Scale
  261.                 fontSize = 13,          -- Stausbar Font Size
  262.             },
  263.             focus = {
  264.                 enable = true,          -- Enable Focus Frame Adjustments
  265.                 scale = 1.15,           -- Focus Frame Scale
  266.                 fontSize = 13,          -- Stausbar Font Size
  267.             },
  268.             party = {
  269.                 enable = true,
  270.                 scale = 1.15,
  271.                 fontSize = 11,          -- Stausbar Font Size
  272.                 position = {
  273.                     relAnchor = "TOPLEFT",
  274.                     offSetX = 10,       -- Controls the X offset. (Left - Right)
  275.                     offSetY = -150,     -- Controls the Y offset. (Up - Down)
  276.                 },
  277.             },
  278.             arena = {
  279.                 enable = true,
  280.                 scale = 1.5,
  281.                 fontSize = 11,          -- Stausbar Font Size
  282.                 tracker = true,
  283.             },
  284.             boss = {
  285.                 enable = true,
  286.                 scale = 1.15,
  287.                 fontSize = 13,          -- Stausbar Font Size  
  288.                 position = {
  289.                     relAnchor = "TOPRIGHT",
  290.                     offSetX = -50,      -- Controls the X offset. (Left - Right)
  291.                     offSetY = -250,     -- Controls the Y offset. (Up - Down)
  292.                 },
  293.             },
  294.         },
  295.     },
  296. }
  297.  
  298. function BasicUI:OnInitialize()
  299.     -- Assuming the .toc says ## SavedVariables: MyAddonDB
  300.     self.db = LibStub("AceDB-3.0"):New("BasicDB", defaults, true)
  301.    
  302.     self.db.RegisterCallback(self, "OnProfileChanged", "OnProfileChanged")
  303.     self.db.RegisterCallback(self, "OnProfileCopied", "OnProfileChanged")
  304.     self.db.RegisterCallback(self, "OnProfileReset", "OnProfileChanged")
  305.    
  306.     for name, module in self:IterateModules() do
  307.         module:SetEnabledState(self.db.profile.ModuleEnabledState[name] or false)
  308.     end
  309.    
  310.     --self:SetUpOptions();
  311.    
  312.     self.OnInitialize = nil
  313. end
  314.  
  315. function BasicUI:OnProfileChanged(event, database, newProfileKey)
  316.     for name, module in self:IterateModules() do
  317.         if self.db.profile.ModuleEnabledState[name] then
  318.             module:Enable()
  319.         else
  320.             module:Disable()
  321.         end
  322.     end
  323. end

Ill only post one module instead of all 8 or 9 this one is the smallest one:
Lua Code:
  1. local BasicUI = LibStub("AceAddon-3.0"):GetAddon("BasicUI")
  2. local BasicUI_Buffs = BasicUI:NewModule("Buffs", "AceEvent-3.0")
  3.  
  4. -----------
  5. -- Buffs --
  6. -----------
  7. function BasicUI_Buffs:OnEnable()  
  8.     local db = BasicUI.db.profile
  9.     BuffFrame:ClearAllPoints()
  10.     BuffFrame:SetScale(db.buff.scale)
  11.     BuffFrame:SetPoint('TOPRIGHT', Minimap, 'TOPLEFT', -25, 0)
  12. end

Just a couple questions:
  • Am I using the Modules from Ace correctly?
  • How do I enable/disable a module?
  • When creating the options how to I set up the get/set functions without haveing to create a popup that reloads the ui?

Thanks for any help with this.
Coke


EDIT:

I was able to get my in-game options working again but still have to do a reloadUI to get them to set.

Here are my core and options if anyone cares to help on the get/set.

Core:
Lua Code:
  1. local BasicUI = LibStub("AceAddon-3.0"):NewAddon("BasicUI")
  2.  
  3. -- Media --
  4. local BASIC_BORDER = [[Interface\Tooltips\UI-Tooltip-Border]]
  5. local BASIC_BACKGROUND = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]]
  6. local BASIC_STATUSBAR = [[Interface\TargetingFrame\UI-StatusBar]]
  7. local BASIC_BORDERPANEL = [[Interface\AddOns\BasicUI\Media\UI-DialogBox-Border.blp]]
  8.  
  9. SlashCmdList['RELOADUI'] = function()
  10.     ReloadUI()
  11. end
  12. SLASH_RELOADUI1 = '/rl'
  13.    
  14. local defaults = {
  15.  
  16.     profile = {
  17.    
  18.         ModuleEnabledState = {
  19.             ["*"] = true
  20.         },
  21.        
  22.         fontNormal =        [[Interface\Addons\BasicUI\Media\NORMAL.ttf]],
  23.         fontBold =          [[Interface\Addons\BasicUI\Media\BOLD.ttf]],
  24.         fontItalic =        [[Interface\Addons\BasicUI\Media\ITALIC.ttf]],
  25.         fontBoldItalic =    [[Interface\Addons\BasicUI\Media\BOLDITALIC.ttf]],
  26.         fontNumber =        [[Interface\Addons\BasicUI\Media\NUMBER.ttf]],
  27.        
  28.         media = {
  29.             fontSize = 15,
  30.             classcolor = true,
  31.         },
  32.        
  33.         actionbar = {
  34.             enable = true,
  35.             showHotKeys = false,
  36.             showMacronames = false,
  37.             auraborder = false,
  38.            
  39.             -- Button Colors
  40.             color = {
  41.                 enable = true,
  42.                 OutOfRange = { r = 0.9, g = 0, b = 0 },
  43.                 OutOfMana = { r = 0, g = 0, b = 0.9 },         
  44.                 NotUsable = { r = 0.3, g = 0.3, b = 0.3 },
  45.             },
  46.         },
  47.        
  48.         buff = {
  49.             enable = true,
  50.             scale = 1.19,
  51.         },
  52.        
  53.         castbar = {
  54.             enable = true,
  55.             border = BASIC_BORDER,
  56.             background = BASIC_BACKGROUND,
  57.             statusbar = BASIC_STATUSBAR,
  58.            
  59.  
  60.             CastingBarFrame = {
  61.                 enable = true,
  62.                 fontSize = 18,
  63.                 textPosition = "CENTER",
  64.                 enableLag = true,
  65.                 enableTimer = true,
  66.                 selfAnchor = "BOTTOM",
  67.                 relAnchor = "BOTTOM",
  68.                 offSetX = 0,
  69.                 offSetY = 175,
  70.             },
  71.             TargetFrameSpellBar = {
  72.                 enable = false,
  73.                 fontSize = 18,
  74.                 textPosition = "CENTER",
  75.                 enableLag = true,
  76.                 enableTimer = true,
  77.                 selfAnchor = "TOP",
  78.                 relAnchor = "TOP",
  79.                 offSetX = 0,
  80.                 offSetY = -250,
  81.             },
  82.             FocusFrameSpellBar = {
  83.                 enable = true,
  84.                 fontSize = 18,
  85.                 textPosition = "CENTER",
  86.                 enableLag = true,
  87.                 enableTimer = true,
  88.                 selfAnchor = "TOP",
  89.                 relAnchor = "TOP",
  90.                 offSetX = 0,
  91.                 offSetY = -165,
  92.             },
  93.             MirrorTimer1 = {
  94.                 enable = true,
  95.                 fontSize = 18,
  96.                 enableTimer = true,
  97.                 selfAnchor = "TOP",
  98.                 relAnchor = "TOP",
  99.                 offSetX = 0,
  100.                 offSetY = -75,
  101.             },
  102.             PetCastingBarFrame = {
  103.                 enable = true,
  104.                 fontSize = 18,
  105.                 textPosition = "CENTER",
  106.                 enableTimer = true,
  107.                 selfAnchor = "BOTTOM",
  108.                 relAnchor = "BOTTOM",
  109.                 offSetX = 0,
  110.                 offSetY = 200,
  111.             },
  112.         },     
  113.         chat = {
  114.             enable = true,
  115.             disableFade = false,
  116.             chatOutline = false,
  117.             windowborder = false,
  118.             enableborder = false,
  119.            
  120.             -- Chat Media
  121.             border = BASIC_BORDER,
  122.             background = BASIC_BACKGROUND,
  123.             editboxborder = BASIC_BORDER,
  124.             editboxbackground = BASIC_BACKGROUND,
  125.             sound = [[Interface\Addons\BasicUI\Media\Whisper.mp3]],
  126.            
  127.             enableBottomButton = true,
  128.             enableHyperlinkTooltip = true,
  129.             enableBorderColoring = true,
  130.  
  131.             tab = {
  132.                 fontSize = 15,
  133.                 fontOutline = true,
  134.                 normalColor = {r = 1, g = 1, b = 1},
  135.                 specialColor = {r = 1, g = 0, b = 1},
  136.                 selectedColor = {r = 0, g = 0.75, b = 1},
  137.             },     
  138.         }
  139.         datapanel = {
  140.            
  141.             enable = true,
  142.             enablepanel = true,
  143.             battleground = true,                                -- enable 3 stats in battleground only that replace stat1,stat2,stat3.
  144.             bag = false,                                        -- True = Open Backpack; False = Open All bags         
  145.  
  146.             -- nData Media
  147.             border = BASIC_BORDERPANEL,                         -- Border for Datapanel ( Choose either Datapanel or Neav for border choice)
  148.             background = BASIC_BACKGROUND,                      -- Background for Datapanel
  149.            
  150.             -- Color Datatext
  151.             color = true,                                       -- Enable Datatext Coloring    
  152.             customcolor = { r = 1, g = 1, b = 1},               -- Color of Text for Datapanel
  153.             classcolor = true,                                  -- Enable Classcolor for Text
  154.            
  155.             panel = "bottom",                                   -- 3 Choices for panel placement = "top", "bottom", or "shortbar". Shortbar is to match nMainbar shortbar.
  156.             armor = 0,                                          -- show your armor value against the level mob you are currently targeting.
  157.             avd = 0,                                            -- show your current avoidance against the level of the mob your targeting 
  158.             bags = 9,                                           -- show space used in bags on panel.
  159.             haste = 0,                                          -- show your haste rating on panels.   
  160.             system = 0,                                         -- show total memory and others systems info (FPS/MS) on panel.
  161.             guild = 4,                                          -- show number on guildmate connected on panel.
  162.             dur = 8,                                            -- show your equipment durability on panel.
  163.             friends = 6,                                        -- show number of friends connected.
  164.             dps_text = 0,                                       -- show a dps meter on panel.
  165.             hps_text = 0,                                       -- show a heal meter on panel.
  166.             spec = 5,                                           -- show your current spec on panel.
  167.             coords = 0,                                         -- show your current coords on panel.
  168.             pro = 7,                                            -- shows your professions and tradeskills
  169.             stat1 = 1,                                          -- Stat Based on your Role (Avoidance-Tank, AP-Melee, SP/HP-Caster)
  170.             stat2 = 3,                                          -- Stat Based on your Role (Armor-Tank, Crit-Melee, Crit-Caster)
  171.             recount = 2,                                        -- Stat Based on Recount"s DPS
  172.             recountraiddps = false,                             -- Enables tracking or Recounts Raid DPS
  173.             calltoarms = 0,                                     -- Show Current Call to Arms.
  174.            
  175.         },
  176.         -- Merchant Options
  177.         merchant = {
  178.             enable = true,
  179.             sellMisc = true,        -- allows the user to add spacific items to sell at merchant (please see the local filter in merchant.lua)
  180.             autoSellGrey = true,    -- autosell grey items at merchant.
  181.             autoRepair = true,      -- autorepair at merchant.
  182.             gpay = false,           -- let your guild pay for your repairs if they allow.
  183.         },
  184.         minimap = {
  185.             enable = true,
  186.             gameclock = true,
  187.             farm = false,
  188.             farmscale = 1.5,
  189.         }
  190.         nameplates = {
  191.             enable = true,
  192.             enableTankMode = true,              -- Color the nameplate threat border green, if you have no aggro
  193.             colorNameWithThreat = true,         -- The name has the same color as the threat of the unit (better visibility)
  194.  
  195.             showFullHP = true,
  196.             showLevel = true,
  197.             showTargetBorder = true,
  198.             showEliteBorder = true,
  199.             showTotemIcon = true,
  200.             abbrevLongNames = true,
  201.         },
  202.        
  203.         -- Quest Options
  204.         quest = {
  205.             enable = true,          -- enable quest module.
  206.             autocomplete = false,   -- enable the autoaccept quest and autocomplete quest if no reward.
  207.         },
  208.        
  209.         vendor = {
  210.             enable = true,
  211.         },
  212.        
  213.         vellum = {
  214.             enable = true,
  215.         },
  216.        
  217.         -- Tooltip
  218.         tooltip = {
  219.             enable = true,
  220.             fontSize = 15,
  221.             fontOutline = true,
  222.             disableFade = false,                            -- Can cause errors or a buggy tooltip!
  223.             abbrevRealmNames = true,    
  224.             border = BASIC_BORDER,
  225.             background = BASIC_BACKGROUND,
  226.             statusbar = BASIC_STATUSBAR,
  227.             hideInCombat = false,                       -- Hide unit frame tooltips during combat  
  228.             hideRealmText = true,                      -- Hide the coalesced/interactive realm text
  229.             reactionBorderColor = true,
  230.             itemqualityBorderColor = true,
  231.            
  232.             showPlayerTitles = true,
  233.             showPVPIcons = false,                           -- Show pvp icons instead of just a prefix
  234.             showMouseoverTarget = true,
  235.             showOnMouseover = false,
  236.             showUnitRole = true,
  237.             showItemLevel = true,
  238.             showSpecializationIcon = false,
  239.            
  240.             healthbar = {
  241.                 showHealthValue = true,
  242.                 showOutline = true,
  243.                 healthFormat = '$cur / $max',           -- Possible: $cur, $max, $deficit, $perc, $smartperc, $smartcolorperc, $colorperc
  244.                 healthFullFormat = '$cur',              -- if the tooltip unit has 100% hp     
  245.                 textPos = "CENTER",                     -- Possible "TOP" "BOTTOM" "CENTER"
  246.                 reactionColoring = false,
  247.                 custom = {
  248.                     apply = false,
  249.                     color = { r = 1, g = 1, b = 0},
  250.                 },     
  251.                 fontSize = 15,
  252.             },     
  253.         },
  254.        
  255.         -- Unitframes
  256.         unitframes = {
  257.             enable = true,
  258.             player = {
  259.                 enable = true,          -- Enable Player Frame Adjustments
  260.                 scale = 1.15,           -- Player Frame Scale
  261.                 fontSize = 13,          -- Stausbar Font Size
  262.                 fontSizepet = 10,           -- Stausbar Font Size
  263.             },
  264.             target = {
  265.                 enable = true,          -- Enable Target Frame Adjustments
  266.                 scale = 1.15,           -- Target Frame Scale
  267.                 fontSize = 13,          -- Stausbar Font Size
  268.             },
  269.             focus = {
  270.                 enable = true,          -- Enable Focus Frame Adjustments
  271.                 scale = 1.15,           -- Focus Frame Scale
  272.                 fontSize = 13,          -- Stausbar Font Size
  273.             },
  274.             party = {
  275.                 enable = true,
  276.                 scale = 1.15,
  277.                 fontSize = 11,          -- Stausbar Font Size
  278.                 position = {
  279.                     relAnchor = "TOPLEFT",
  280.                     offSetX = 10,       -- Controls the X offset. (Left - Right)
  281.                     offSetY = -150,     -- Controls the Y offset. (Up - Down)
  282.                 },
  283.             },
  284.             arena = {
  285.                 enable = true,
  286.                 scale = 1.5,
  287.                 fontSize = 11,          -- Stausbar Font Size
  288.                 tracker = true,
  289.             },
  290.             boss = {
  291.                 enable = true,
  292.                 scale = 1.15,
  293.                 fontSize = 13,          -- Stausbar Font Size  
  294.                 position = {
  295.                     relAnchor = "TOPRIGHT",
  296.                     offSetX = -50,      -- Controls the X offset. (Left - Right)
  297.                     offSetY = -250,     -- Controls the Y offset. (Up - Down)
  298.                 },
  299.             },
  300.         },
  301.     },
  302. }
  303.  
  304. function BasicUI:OnInitialize()
  305.     -- Assuming the .toc says ## SavedVariables: MyAddonDB
  306.     self.db = LibStub("AceDB-3.0"):New("BasicDB", defaults, true)
  307.    
  308.     self.db.RegisterCallback(self, "OnProfileChanged", "OnProfileChanged")
  309.     self.db.RegisterCallback(self, "OnProfileCopied", "OnProfileChanged")
  310.     self.db.RegisterCallback(self, "OnProfileReset", "OnProfileChanged")
  311.    
  312.     for name, module in self:IterateModules() do
  313.         module:SetEnabledState(self.db.profile.ModuleEnabledState[name] or false)
  314.     end
  315.    
  316.     self:SetUpOptions();
  317.    
  318.     self.OnInitialize = nil
  319. end
  320.  
  321. function BasicUI:OnProfileChanged(event, database, newProfileKey)
  322.     for name, module in self:IterateModules() do
  323.         if self.db.profile.ModuleEnabledState[name] then
  324.             module:Enable()
  325.         else
  326.             module:Disable()
  327.         end
  328.     end
  329. end


Options:
Lua Code:
  1. local BasicUI = LibStub("AceAddon-3.0"):GetAddon("BasicUI")
  2.  
  3. local L = setmetatable({}, { __index = function(t,k)
  4.     local v = tostring(k)
  5.     rawset(t, k, v)
  6.     return v
  7. end })
  8.  
  9. local options = nil;
  10. local function GetOptions()
  11.     db = BasicUI.db.profile
  12.    
  13.     local regions ={['TOPLEFT'] = L['TOPLEFT'], ['TOP'] = L['TOP'], ['TOPRIGHT'] = L['TOPRIGHT'], ['LEFT'] = L['LEFT'], ['CENTER'] = L['CENTER'], ['RIGHT'] = L['RIGHT'], ['BOTTOMLEFT'] = L['BOTTOMLEFT'], ['BOTTOM'] = L['BOTTOM'], ['BOTTOMRIGHT'] = L['BOTTOMRIGHT']}
  14.    
  15.     StaticPopupDialogs["CFG_RELOAD"] = {
  16.         text = L["One or more of the changes you have made require a ReloadUI."],
  17.         button1 = ACCEPT,
  18.         button2 = CANCEL,
  19.         OnAccept = function() ReloadUI() end,
  20.         timeout = 0,
  21.         whileDead = 1,
  22.     }
  23.    
  24.     -----------------------
  25.     -- Options Order Chart
  26.     -----------------------
  27.     -- toggle = 1
  28.     -- select = 2
  29.     -- color = 3
  30.     -- range = 4
  31.     -- group = 5
  32.    
  33.     if not options then
  34.         options = {
  35.             type = "group",
  36.             name = "|cff00B4FFBasic|rUI",
  37.             handler = BasicUI,
  38.             childGroups = "tree",
  39.             args = {
  40.                 Header = {
  41.                     type = "header",           
  42.                     order = 1,
  43.                     name = L["Welcome to |cff00B4FFBasic|rUI Config Area!"],           
  44.                     width = "full",    
  45.                 },
  46.                 Text = {
  47.                     type = "header",           
  48.                     order = 2,
  49.                     name = L["When changes are made a Reload of the UI is needed."],           
  50.                     width = "full",    
  51.                 },
  52.                 sep1 = {
  53.                     type = "description",
  54.                     order = 3,             
  55.                     name = " ",
  56.                 },         
  57.                 Text2 = {
  58.                     type = "description",          
  59.                     order = 4,
  60.                     name = L["Special Thanks for |cff00B4FFBasic|rUI goes out to: Neav, Tuks, Elv, Baine, Treeston, and many more."],          
  61.                     width = "full",
  62.                     fontSize = "large",
  63.                 },
  64.                 Text3 = {
  65.                     type = "description",          
  66.                     order = 5,
  67.                     name = L["Thank you all for your AddOns, coding help, and support in creating |cff00B4FFBasic|rUI."],          
  68.                     width = "full",
  69.                     fontSize = "large",            
  70.                 },
  71.                 sep2 = {
  72.                     type = "description",
  73.                     order = 6,             
  74.                     name = " ",
  75.                 },             
  76.                 media = {
  77.                     type = "group",
  78.                     order = 0,             
  79.                     name = L["|cff00B4FFMedia|r"],
  80.                     desc = L["Media Module for |cff00B4FFBasic|rUI."],
  81.                     --childGroups = "tree",
  82.                     get = function(info) return db.media[ info[#info] ] end,
  83.                     set = function(info, value) db.media[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,               
  84.                     args = {
  85.                         ---------------------------
  86.                         --Option Type Seperators
  87.                         sep1 = {
  88.                             type = "description",
  89.                             order = 2,                     
  90.                             name = " ",
  91.                         },
  92.                         sep2 = {
  93.                             type = "description",
  94.                             order = 3,                     
  95.                             name = " ",
  96.                         },
  97.                         sep3 = {
  98.                             type = "description",
  99.                             order = 4,                     
  100.                             name = " ",
  101.                         },
  102.                         sep4 = {
  103.                             type = "description",
  104.                             order = 5,                     
  105.                             name = " ",
  106.                         }
  107.                         ---------------------------
  108.                         classcolor = {
  109.                             type = "toggle",                   
  110.                             order = 1,
  111.                             name = L["Class Color"],
  112.                             desc = L["Use your classcolor for border and some text color."],                       
  113.                         },                 
  114.                         fontSize = {
  115.                             type = "range",
  116.                             order = 5,                     
  117.                             name = L["Game Font Size"],
  118.                             desc = L["Controls the Size of the Game Font"],
  119.                             min = 0, max = 30, step = 1,
  120.                         },                                 
  121.                     },
  122.                 },
  123.                 vellum = {
  124.                     type = "toggle",
  125.                     order = 1,                     
  126.                     name = L["Vellum"],
  127.                     desc = L["Enables a vellum button for Enchanters to click."],                          
  128.                 },                                     
  129.                 actionbar = {                  
  130.                     type = "group",
  131.                     order = 5,                     
  132.                     name = L["|cff00B4FFActionbar|r"],
  133.                     desc = L["Actionbar Button Modifications."],                       
  134.                     childGroups = "tree",
  135.                     get = function(info) return db.actionbar[ info[#info] ] end,
  136.                     set = function(info, value) db.actionbar[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,
  137.                     args = {
  138.                         ---------------------------
  139.                         --Option Type Seperators
  140.                         sep1 = {
  141.                             type = "description",
  142.                             order = 2,                             
  143.                             name = " ",
  144.                         },
  145.                         sep2 = {
  146.                             type = "description",
  147.                             order = 3,
  148.                             name = " ",                            
  149.                         },
  150.                         sep3 = {
  151.                             type = "description",
  152.                             order = 4,
  153.                             name = " ",
  154.                         },
  155.                         sep4 = {
  156.                             type = "description",
  157.                             order = 5,
  158.                             name = " ",
  159.                         }
  160.                         ---------------------------                    
  161.                         enable = {
  162.                             type = "toggle",
  163.                             order = 0,                             
  164.                             name = L["Enable"],
  165.                             desc = L["Enables Actionbar Button Module"],
  166.                             width = "full",
  167.                         },
  168.                         auraborder = {
  169.                             type = "toggle",
  170.                             order = 1,                             
  171.                             name = L["Aura Border"],
  172.                             desc = L["Make & Color Aura Borders."],
  173.                             disabled = function() return not db.actionbar.enable end,                                                              
  174.                         },                         
  175.                         showHotKeys = {
  176.                             type = "toggle",
  177.                             order = 1,                             
  178.                             name = L["Show Hot Keys"],
  179.                             desc = L["If Checked Hot Keys will Show."],
  180.                             disabled = function() return not db.actionbar.enable end,                                                              
  181.                         },
  182.                         showMacronames = {
  183.                             type = "toggle",
  184.                             order = 1,                             
  185.                             name = L["Show Macro Names"],
  186.                             desc = L["If Checked Macros Will Show."],
  187.                             disabled = function() return not db.actionbar.enable end,                                                              
  188.                         },
  189.                         color = {
  190.                             type = "group",
  191.                             order = 5,                             
  192.                             name = L["Actionbar Button Color"],
  193.                             desc = L["Enables Actionbar Button Color Modifications."],
  194.                             guiInline  = true,
  195.                             get = function(info) return db.actionbar.color[ info[#info] ] end,
  196.                             set = function(info, value) db.actionbar.color[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,
  197.                             args = {
  198.                                 ---------------------------
  199.                                 --Option Type Seperators
  200.                                 sep1 = {
  201.                                     type = "description",
  202.                                     order = 2,                                     
  203.                                     name = " ",
  204.                                 },
  205.                                 sep2 = {
  206.                                     type = "description",
  207.                                     order = 3,                                     
  208.                                     name = " ",
  209.                                 },
  210.                                 sep3 = {
  211.                                     type = "description",
  212.                                     order = 4,                                     
  213.                                     name = " ",
  214.                                 },
  215.                                 sep4 = {
  216.                                     type = "description",
  217.                                     order = 5,                                     
  218.                                     name = " ",
  219.                                 }
  220.                                 ---------------------------                            
  221.                                 enable = {
  222.                                     type = "toggle",
  223.                                     order = 0,                                     
  224.                                     name = L["Enable"],
  225.                                     desc = L["Enables Coloring"],
  226.                                     width = "full",
  227.                                 },                             
  228.                                 OutOfRange = {
  229.                                     type = "color",
  230.                                     order = 3,                                     
  231.                                     name = L["Out of Range"],
  232.                                     desc = L["Picks the Out of Range Button Fade Color."],
  233.                                     disabled = function() return not db.actionbar.enable or not db.actionbar.color.enable end,                                     
  234.                                     get = function(info)
  235.                                         local rc = db.actionbar.color[ info[#info] ]
  236.                                         return rc.r, rc.g, rc.b
  237.                                     end,
  238.                                     set = function(info, r, g, b)
  239.                                         db.actionbar.color[ info[#info] ] = {}
  240.                                         local rc = db.actionbar.color[ info[#info] ]
  241.                                         rc.r, rc.g, rc.b = r, g, b
  242.                                     end,                                       
  243.                                 },
  244.                                 OutOfMana = {
  245.                                     type = "color",
  246.                                     order = 3,                                     
  247.                                     name = L["Out of Mana"],
  248.                                     desc = L["Picks the Out of Mana Button Fade Color."],
  249.                                     disabled = function() return not db.actionbar.enable or not db.actionbar.color.enable end,                                 
  250.                                     get = function(info)
  251.                                         local mc = db.actionbar.color[ info[#info] ]
  252.                                         return mc.r, mc.g, mc.b
  253.                                     end,
  254.                                     set = function(info, r, g, b)
  255.                                         db.actionbar.color[ info[#info] ] = {}
  256.                                         local mc = db.actionbar.color[ info[#info] ]
  257.                                         mc.r, mc.g, mc.b = r, g, b
  258.                                     end,                                   
  259.                                 },
  260.                                 NotUsable = {
  261.                                     type = "color",
  262.                                     order = 3,                                     
  263.                                     name = L["Not Usable"],
  264.                                     desc = L["Picks the Not Usable Button Fade Color."],
  265.                                     disabled = function() return not db.actionbar.enable or not db.actionbar.color.enable end,                                 
  266.                                     get = function(info)
  267.                                         local nu = db.actionbar.color[ info[#info] ]
  268.                                         return nu.r, nu.g, nu.b
  269.                                     end,
  270.                                     set = function(info, r, g, b)
  271.                                         db.actionbar.color[ info[#info] ] = {}
  272.                                         local nu = db.actionbar.color[ info[#info] ]
  273.                                         nu.r, nu.g, nu.b = r, g, b
  274.                                     end,                                       
  275.                                 },
  276.                             },
  277.                         },
  278.                     },
  279.                 },                 
  280.                 buff = {
  281.                     type = "group",        
  282.                     order = 2,
  283.                     name = L["|cff00B4FFBuff|r"],
  284.                     desc = L["Buff Module for |cff00B4FFBasic|rUI."],
  285.                     get = function(info) return db.buff[ info[#info] ] end,
  286.                     set = function(info, value) db.buff[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,            
  287.                     args = {
  288.                         ---------------------------
  289.                         --Option Type Seperators
  290.                         sep1 = {
  291.                             type = "description",
  292.                             order = 2,                                     
  293.                             name = " ",
  294.                         },
  295.                         sep2 = {
  296.                             type = "description",
  297.                             order = 3,                                     
  298.                             name = " ",
  299.                         },
  300.                         sep3 = {
  301.                             type = "description",
  302.                             order = 4,                                     
  303.                             name = " ",
  304.                         },
  305.                         sep4 = {
  306.                             type = "description",
  307.                             order = 5,                                     
  308.                             name = " ",
  309.                         }
  310.                         ---------------------------            
  311.                         enable = {
  312.                             type = "toggle",                   
  313.                             order = 0,
  314.                             name = L["Enable"],
  315.                             desc = L["Enables Buff Module."],
  316.                             width = "full",                    
  317.                         },
  318.                         scale = {
  319.                             type = "range",                
  320.                             order = 4,
  321.                             name = L["Buff Scale"],
  322.                             --desc = L["Controls the scaling of the Buff Frames"],
  323.                             min = 0.5, max = 5, step = 0.05,
  324.                             disabled = function() return not db.buff.enable end,
  325.                         },                 
  326.                     },
  327.                 }
  328.                 castbar = {
  329.                     type = "group",
  330.                     order = 3,
  331.                     name = L["|cff00B4FFCastbar|r"],
  332.                     desc = L["Castbar Module for |cff00B4FFBasic|rUI."],
  333.                     childGroups = "tree",
  334.                     get = function(info) return db.castbar[ info[#info] ] end,
  335.                     set = function(info, value) db.castbar[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,             
  336.                     args = {
  337.                         ---------------------------
  338.                         --Option Type Seperators
  339.                         sep1 = {
  340.                             type = "description",
  341.                             order = 2,                                     
  342.                             name = " ",
  343.                         },
  344.                         sep2 = {
  345.                             type = "description",
  346.                             order = 3,                                     
  347.                             name = " ",
  348.                         },
  349.                         sep3 = {
  350.                             type = "description",
  351.                             order = 4,                                     
  352.                             name = " ",
  353.                         },
  354.                         sep4 = {
  355.                             type = "description",
  356.                             order = 5,                                     
  357.                             name = " ",
  358.                         }
  359.                         ---------------------------                
  360.                         enable = {
  361.                             type = "toggle",                   
  362.                             order = 0,
  363.                             name = L["Enable"],
  364.                             desc = L["Enables Buff Module"],
  365.                             width = "full",                        
  366.                         },             
  367.                         CastingBarFrame = {
  368.                             type = "group",
  369.                             order = 5,
  370.                             name = L["Player's Castbar."],
  371.                             desc = L["Settings for the Player Castbar."],
  372.                             guiInline  = true,
  373.                             disabled = function() return not db.castbar.enable end,
  374.                             get = function(info) return db.castbar.CastingBarFrame[ info[#info] ] end,
  375.                             set = function(info, value) db.castbar.CastingBarFrame[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                 
  376.                             args = {
  377.                                 ---------------------------
  378.                                 --Option Type Seperators
  379.                                 sep1 = {
  380.                                     type = "description",
  381.                                     order = 1,                             
  382.                                     name = " ",
  383.                                 },
  384.                                 sep2 = {
  385.                                     type = "description",
  386.                                     order = 2,
  387.                                     name = " ",                            
  388.                                 },
  389.                                 sep3 = {
  390.                                     type = "description",
  391.                                     order = 3,
  392.                                     name = " ",
  393.                                 },
  394.                                 sep4 = {
  395.                                     type = "description",
  396.                                     order = 4,
  397.                                     name = " ",
  398.                                 }
  399.                                 ---------------------------                    
  400.                                 enable = {
  401.                                     type = "toggle",                           
  402.                                     order = 0,
  403.                                     name = L["Enable"],
  404.                                     desc = L["Enables Player's Castbar."],
  405.                                     disabled = function() return not db.castbar.enable end,
  406.                                     width = "full",                            
  407.                                 },
  408.                                 fontSize = {
  409.                                     type = "range",
  410.                                     order = 0,                     
  411.                                     name = L["Font Size"],
  412.                                     desc = L["Controls the Size of the Font"],
  413.                                     min = 0, max = 30, step = 1,
  414.                                 },                         
  415.                                 textPosition = {
  416.                                     type = "select",
  417.                                     order = 2,
  418.                                     name = L["Text Position"],
  419.                                     desc = L["Spell Text Position."],
  420.                                     disabled = function() return not db.castbar.enable or not db.castbar.CastingBarFrame.enable end,
  421.                                     values = regions;
  422.                                 },
  423.                                 enableLag = {
  424.                                     type = "toggle",                           
  425.                                     order = 1,
  426.                                     name = L["Enable Lag"],
  427.                                     desc = L["Enables lag to show on castbar."],
  428.                                     disabled = function() return not db.castbar.enable or not db.castbar.CastingBarFrame.enable end,
  429.                                 },
  430.                                 enableTimer = {
  431.                                     type = "toggle",                           
  432.                                     order = 1,
  433.                                     name = L["Show Timer"],
  434.                                     desc = L["Enables timer to show on castbar."],
  435.                                     disabled = function() return not db.castbar.enable or not db.castbar.CastingBarFrame.enable end,
  436.                                 },
  437.                                 selfAnchor = {
  438.                                     type = "select",
  439.                                     order = 2,
  440.                                     name = L["Self Anchor"],
  441.                                     desc = L["Self Anchor Position."],
  442.                                     disabled = function() return not db.castbar.enable or not db.castbar.CastingBarFrame.enable end,
  443.                                     values = regions;
  444.                                 },
  445.                                 relAnchor = {
  446.                                     type = "select",
  447.                                     order = 2,
  448.                                     name = L["Relative Anchor"],
  449.                                     desc = L["Relative Anchor Position."],
  450.                                     disabled = function() return not db.castbar.enable or not db.castbar.CastingBarFrame.enable end,
  451.                                     values = regions;
  452.                                 },
  453.                                 offSetX = {
  454.                                     type = "range",                        
  455.                                     order = 4,
  456.                                     name = L["X Offset"],
  457.                                     desc = L["Controls the X offset. (Left - Right)"],
  458.                                     min = -250, max = 250, step = 5,
  459.                                     disabled = function() return not db.castbar.enable or not db.castbar.CastingBarFrame.enable end,
  460.                                 },
  461.                                 offSetY = {
  462.                                     type = "range",                        
  463.                                     order = 4,
  464.                                     name = L["Y Offset"],
  465.                                     desc = L["Controls the Y offset. (Up - Down)"],
  466.                                     min = -250, max = 250, step = 5,
  467.                                     disabled = function() return not db.castbar.enable or not db.castbar.CastingBarFrame.enable end,
  468.                                 },
  469.                             },
  470.                         },
  471.                         PetCastingBarFrame = {
  472.                             type = "group",
  473.                             order = 6,
  474.                             name = L["Pet Castbar"],
  475.                             desc = L["Settings for the Pet Casting Bar."],
  476.                             guiInline  = true,
  477.                             disabled = function() return not db.castbar.enable end,
  478.                             get = function(info) return db.castbar.PetCastingBarFrame[ info[#info] ] end,
  479.                             set = function(info, value) db.castbar.PetCastingBarFrame[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                  
  480.                             args = {
  481.                                 ---------------------------
  482.                                 --Option Type Seperators
  483.                                 sep1 = {
  484.                                     type = "description",
  485.                                     order = 1,                             
  486.                                     name = " ",
  487.                                 },
  488.                                 sep2 = {
  489.                                     type = "description",
  490.                                     order = 2,
  491.                                     name = " ",                            
  492.                                 },
  493.                                 sep3 = {
  494.                                     type = "description",
  495.                                     order = 3,
  496.                                     name = " ",
  497.                                 },
  498.                                 sep4 = {
  499.                                     type = "description",
  500.                                     order = 4,
  501.                                     name = " ",
  502.                                 }
  503.                                 ---------------------------                    
  504.                                 enable = {
  505.                                     type = "toggle",                           
  506.                                     order = 0,
  507.                                     name = L["Enable"],
  508.                                     desc = L["Enables Pet's Castbar."],
  509.                                     disabled = function() return not db.castbar.enable end,
  510.                                     width = "full",                            
  511.                                 },
  512.                                 fontSize = {
  513.                                     type = "range",
  514.                                     order = 0,                     
  515.                                     name = L["Font Size"],
  516.                                     desc = L["Controls the Size of the Font"],
  517.                                     min = 0, max = 30, step = 1,
  518.                                 },
  519.                                 textPosition = {
  520.                                     type = "select",                           
  521.                                     order = 2,
  522.                                     name = L["Text Position"],
  523.                                     desc = L["Spell Text Position."],
  524.                                     disabled = function() return not db.castbar.enable or not db.castbar.PetCastingBarFrame.enable end,
  525.                                     values = regions;
  526.                                 },
  527.                                 enableTimer = {
  528.                                     type = "toggle",                           
  529.                                     order = 1,
  530.                                     name = L["Show Timer"],
  531.                                     desc = L["Enables timer to show on castbar."],
  532.                                     disabled = function() return not db.castbar.enable or not db.castbar.PetCastingBarFrame.enable end,
  533.                                 },
  534.                                 selfAnchor = {
  535.                                     type = "select",                           
  536.                                     order = 2,
  537.                                     name = L["Self Anchor"],
  538.                                     desc = L["Self Anchor Position."],
  539.                                     disabled = function() return not db.castbar.enable or not db.castbar.PetCastingBarFrame.enable end,
  540.                                     values = regions;
  541.                                 },
  542.                                 relAnchor = {
  543.                                     type = "select",                           
  544.                                     order = 2,
  545.                                     name = L["Relative Anchor"],
  546.                                     desc = L["Relative Anchor Position."],
  547.                                     disabled = function() return not db.castbar.enable or not db.castbar.PetCastingBarFrame.enable end,
  548.                                     values = regions;
  549.                                 },
  550.                                 offSetX = {
  551.                                     type = "range",                        
  552.                                     order = 4,
  553.                                     name = L["X Offset."],
  554.                                     desc = L["Controls the X offset. (Left - Right)"],
  555.                                     min = -250, max = 250, step = 5,
  556.                                     disabled = function() return not db.castbar.enable or not db.castbar.PetCastingBarFrame.enable end,
  557.                                 },
  558.                                 offSetY = {
  559.                                     type = "range",                        
  560.                                     order = 4,
  561.                                     name = L["Y Offset."],
  562.                                     desc = L["Controls the Y offset. (Up - Down)"],
  563.                                     min = -250, max = 250, step = 5,
  564.                                     disabled = function() return not db.castbar.enable or not db.castbar.PetCastingBarFrame.enable end,
  565.                                 },
  566.                             },
  567.                         },                                         
  568.                         TargetFrameSpellBar = {
  569.                             type = "group",
  570.                             order = 7,
  571.                             name = L["Target's Castbar."],
  572.                             desc = L["Settings for the Target Castbar."],
  573.                             guiInline  = true,
  574.                             disabled = function() return not db.castbar.enable end,
  575.                             get = function(info) return db.castbar.TargetFrameSpellBar[ info[#info] ] end,
  576.                             set = function(info, value) db.castbar.TargetFrameSpellBar[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                 
  577.                             args = {
  578.                                 ---------------------------
  579.                                 --Option Type Seperators
  580.                                 sep1 = {
  581.                                     type = "description",
  582.                                     order = 1,                             
  583.                                     name = " ",
  584.                                 },
  585.                                 sep2 = {
  586.                                     type = "description",
  587.                                     order = 2,
  588.                                     name = " ",                            
  589.                                 },
  590.                                 sep3 = {
  591.                                     type = "description",
  592.                                     order = 3,
  593.                                     name = " ",
  594.                                 },
  595.                                 sep4 = {
  596.                                     type = "description",
  597.                                     order = 4,
  598.                                     name = " ",
  599.                                 },     
  600.                                 ---------------------------                    
  601.                                 enable = {
  602.                                     type = "toggle",                           
  603.                                     order = 0,
  604.                                     name = L["Enable"],
  605.                                     desc = L["Enables Target's Castbar."],
  606.                                     disabled = function() return not db.castbar.enable end,
  607.                                     width = "full",                            
  608.                                 },
  609.                                 fontSize = {
  610.                                     type = "range",
  611.                                     order = 0,                     
  612.                                     name = L["Font Size"],
  613.                                     desc = L["Controls the Size of the Font"],
  614.                                     min = 0, max = 30, step = 1,
  615.                                 },
  616.                                 textPosition = {
  617.                                     type = "select",
  618.                                     order = 2,
  619.                                     name = L["Text Position"],
  620.                                     desc = L["Spell Text Position."],
  621.                                     disabled = function() return not db.castbar.enable or not db.castbar.TargetFrameSpellBar.enable end,
  622.                                     values = regions;
  623.                                 },
  624.                                 enableLag = {
  625.                                     type = "toggle",                           
  626.                                     order = 1,
  627.                                     name = L["Enable Lag"],
  628.                                     desc = L["Enables lag to show on castbar."],
  629.                                     disabled = function() return not db.castbar.enable or not db.castbar.TargetFrameSpellBar.enable end,
  630.                                 },
  631.                                 enableTimer = {
  632.                                     type = "toggle",                           
  633.                                     order = 1,
  634.                                     name = L["Show Timer"],
  635.                                     desc = L["Enables timer to show on castbar."],
  636.                                     disabled = function() return not db.castbar.enable or not db.castbar.TargetFrameSpellBar.enable end,
  637.                                 },
  638.                                 selfAnchor = {
  639.                                     type = "select",
  640.                                     order = 2,
  641.                                     name = L["Self Anchor"],
  642.                                     desc = L["Self Anchor Position."],
  643.                                     disabled = function() return not db.castbar.enable or not db.castbar.TargetFrameSpellBar.enable end,
  644.                                     values = regions;
  645.                                 },
  646.                                 relAnchor = {
  647.                                     type = "select",                           
  648.                                     order = 2,
  649.                                     name = L["Relative Anchor"],
  650.                                     desc = L["Relative Anchor Position."],
  651.                                     disabled = function() return not db.castbar.enable or not db.castbar.TargetFrameSpellBar.enable end,
  652.                                     values = regions;
  653.                                 },
  654.                                 offSetX = {
  655.                                     type = "range",                        
  656.                                     order = 4,
  657.                                     name = L["X Offset"],
  658.                                     desc = L["Controls the X offset. (Left - Right)"],
  659.                                     min = -250, max = 250, step = 5,
  660.                                     disabled = function() return not db.castbar.enable or not db.castbar.TargetFrameSpellBar.enable end,
  661.                                 },
  662.                                 offSetY = {
  663.                                     type = "range",                        
  664.                                     order = 4,
  665.                                     name = L["Y Offset"],
  666.                                     desc = L["Controls the Y offset. (Up - Down)"],
  667.                                     min = -250, max = 250, step = 5,
  668.                                     disabled = function() return not db.castbar.enable or not db.castbar.TargetFrameSpellBar.enable end,
  669.                                 },
  670.                             },
  671.                         },                     
  672.                         FocusFrameSpellBar = {
  673.                             type = "group",
  674.                             order = 8,
  675.                             name = L["Focus Castbar."],
  676.                             desc = L["Settings for the Focus Castbar."],
  677.                             guiInline  = true,
  678.                             disabled = function() return not db.castbar.enable end,
  679.                             get = function(info) return db.castbar.FocusFrameSpellBar[ info[#info] ] end,
  680.                             set = function(info, value) db.castbar.FocusFrameSpellBar[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                  
  681.                             args = {
  682.                                 ---------------------------
  683.                                 --Option Type Seperators
  684.                                 sep1 = {
  685.                                     type = "description",
  686.                                     order = 1,                             
  687.                                     name = " ",
  688.                                 },
  689.                                 sep2 = {
  690.                                     type = "description",
  691.                                     order = 2,
  692.                                     name = " ",                            
  693.                                 },
  694.                                 sep3 = {
  695.                                     type = "description",
  696.                                     order = 3,
  697.                                     name = " ",
  698.                                 },
  699.                                 sep4 = {
  700.                                     type = "description",
  701.                                     order = 4,
  702.                                     name = " ",
  703.                                 }
  704.                                 ---------------------------                    
  705.                                 enable = {
  706.                                     type = "toggle",                           
  707.                                     order = 0,
  708.                                     name = L["Enable"],
  709.                                     desc = L["Enables Focus' Castbar."],
  710.                                     disabled = function() return not db.castbar.enable end,
  711.                                     width = "full",                            
  712.                                 },
  713.                                 fontSize = {
  714.                                     type = "range",
  715.                                     order = 0,                     
  716.                                     name = L["Font Size"],
  717.                                     desc = L["Controls the Size of the Font"],
  718.                                     min = 0, max = 30, step = 1,
  719.                                 },
  720.                                 textPosition = {
  721.                                     type = "select",                           
  722.                                     order = 2,
  723.                                     name = L["Text Position"],
  724.                                     desc = L["Spell Text Position."],
  725.                                     disabled = function() return not db.castbar.enable or not db.castbar.FocusFrameSpellBar.enable end,
  726.                                     values = regions;
  727.                                 },
  728.                                 enableLag = {
  729.                                     type = "toggle",                           
  730.                                     order = 1,
  731.                                     name = L["Enable Lag"],
  732.                                     desc = L["Enables lag to show on castbar."],
  733.                                     disabled = function() return not db.castbar.enable or not db.castbar.FocusFrameSpellBar.enable end,
  734.                                 },
  735.                                 enableTimer = {
  736.                                     type = "toggle",                           
  737.                                     order = 1,
  738.                                     name = L["Show Timer"],
  739.                                     desc = L["Enables timer to show on castbar."],
  740.                                     disabled = function() return not db.castbar.enable or not db.castbar.FocusFrameSpellBar.enable end,
  741.                                 },
  742.                                 selfAnchor = {
  743.                                     type = "select",                           
  744.                                     order = 2,
  745.                                     name = L["Self Anchor"],
  746.                                     desc = L["Self Anchor Position."],
  747.                                     disabled = function() return not db.castbar.enable or not db.castbar.FocusFrameSpellBar.enable end,
  748.                                     values = regions;
  749.                                 },
  750.                                 relAnchor = {
  751.                                     type = "select",                           
  752.                                     order = 2,
  753.                                     name = L["Relative Anchor"],
  754.                                     desc = L["Relative Anchor Position."],
  755.                                     disabled = function() return not db.castbar.enable or not db.castbar.FocusFrameSpellBar.enable end,
  756.                                     values = regions;
  757.                                 },
  758.                                 offSetX = {
  759.                                     type = "range",                        
  760.                                     order = 4,
  761.                                     name = L["X Offset"],
  762.                                     desc = L["Controls the X offset. (Left - Right)"],
  763.                                     min = -250, max = 250, step = 5,
  764.                                     disabled = function() return not db.castbar.enable or not db.castbar.FocusFrameSpellBar.enable end,
  765.                                 },
  766.                                 offSetY = {
  767.                                     type = "range",                        
  768.                                     order = 4,
  769.                                     name = L["Y Offset"],
  770.                                     desc = L["Controls the Y offset. (Up - Down)"],
  771.                                     min = -250, max = 250, step = 5,
  772.                                     disabled = function() return not db.castbar.enable or not db.castbar.FocusFrameSpellBar.enable end,
  773.                                 },
  774.                             },
  775.                         },                     
  776.                         MirrorTimer1 = {
  777.                             type = "group",
  778.                             order = 9,
  779.                             name = L["Mirror Timer."],
  780.                             desc = L["Settings for Mirror Timer."],
  781.                             guiInline  = true,
  782.                             disabled = function() return not db.castbar.enable end,
  783.                             get = function(info) return db.castbar.MirrorTimer1[ info[#info] ] end,
  784.                             set = function(info, value) db.castbar.MirrorTimer1[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                
  785.                             args = {
  786.                                 ---------------------------
  787.                                 --Option Type Seperators
  788.                                 sep1 = {
  789.                                     type = "description",
  790.                                     order = 1,                             
  791.                                     name = " ",
  792.                                 },
  793.                                 sep2 = {
  794.                                     type = "description",
  795.                                     order = 2,
  796.                                     name = " ",                            
  797.                                 },
  798.                                 sep3 = {
  799.                                     type = "description",
  800.                                     order = 3,
  801.                                     name = " ",
  802.                                 },
  803.                                 sep4 = {
  804.                                     type = "description",
  805.                                     order = 4,
  806.                                     name = " ",
  807.                                 },     
  808.                                 ---------------------------                    
  809.                                 enable = {
  810.                                     type = "toggle",                           
  811.                                     order = 0,
  812.                                     name = L["Enable"],
  813.                                     desc = L["Enables Mirror Timer."],
  814.                                     disabled = function() return not db.castbar.enable end,
  815.                                     width = "full",                            
  816.                                 },
  817.                                 fontSize = {
  818.                                     type = "range",
  819.                                     order = 0,                     
  820.                                     name = L["Font Size"],
  821.                                     desc = L["Controls the Size of the Font"],
  822.                                     min = 0, max = 30, step = 1,
  823.                                 },
  824.                                 enableTimer = {
  825.                                     type = "toggle",                           
  826.                                     order = 1,
  827.                                     name = L["Show Timer"],
  828.                                     desc = L["Enables timer to show on castbar."],
  829.                                     disabled = function() return not db.castbar.enable or not db.castbar.MirrorTimer1.enable end,
  830.                                 },
  831.                                 selfAnchor = {
  832.                                     type = "select",                           
  833.                                     order = 2,
  834.                                     name = L["Self Anchor"],
  835.                                     desc = L["Self Anchor Position."],
  836.                                     disabled = function() return not db.castbar.enable or not db.castbar.MirrorTimer1.enable end,
  837.                                     values = regions;
  838.                                 },
  839.                                 relAnchor = {
  840.                                     type = "select",                           
  841.                                     order = 2,
  842.                                     name = L["Relative Anchor"],
  843.                                     desc = L["Relative Anchor Position."],
  844.                                     disabled = function() return not db.castbar.enable or not db.castbar.MirrorTimer1.enable end,
  845.                                     values = regions;
  846.                                 },
  847.                                 offSetX = {
  848.                                     type = "range",                        
  849.                                     order = 4,
  850.                                     name = L["X Offset"],
  851.                                     desc = L["Controls the X offset. (Left - Right)"],
  852.                                     min = -250, max = 250, step = 5,
  853.                                     disabled = function() return not db.castbar.enable or not db.castbar.MirrorTimer1.enable end,
  854.                                 },
  855.                                 offSetY = {
  856.                                     type = "range",                        
  857.                                     order = 4,
  858.                                     name = L["Y Offset"],
  859.                                     desc = L["Controls the Y offset. (Up - Down)"],
  860.                                     min = -250, max = 250, step = 5,
  861.                                     disabled = function() return not db.castbar.enable or not db.castbar.MirrorTimer1.enable end,
  862.                                 },
  863.                             },
  864.                         },                     
  865.                     },
  866.                 },         
  867.                 chat = {
  868.                     type = "group",        
  869.                     order = 4,
  870.                     name = L["|cff00B4FFChat|r"],
  871.                     desc = L["Chat Module for |cff00B4FFBasic|rUI."],
  872.                     childGroups = "tree",
  873.                     get = function(info) return db.chat[ info[#info] ] end,
  874.                     set = function(info, value) db.chat[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,            
  875.                     args = {
  876.                         ---------------------------
  877.                         --Option Type Seperators
  878.                         sep1 = {
  879.                             type = "description",
  880.                             order = 2,                                     
  881.                             name = " ",
  882.                         },
  883.                         sep2 = {
  884.                             type = "description",
  885.                             order = 3,                                     
  886.                             name = " ",
  887.                         },
  888.                         sep3 = {
  889.                             type = "description",
  890.                             order = 4,                                     
  891.                             name = " ",
  892.                         },
  893.                         sep4 = {
  894.                             type = "description",
  895.                             order = 5,                                     
  896.                             name = " ",
  897.                         }
  898.                         ---------------------------                    
  899.                         enable = {
  900.                             type = "toggle",                   
  901.                             order = 0,
  902.                             name = L["Enable"],
  903.                             desc = L["Enables Chat Module."],
  904.                             width = "full",
  905.                         },
  906.                         windowborder = {
  907.                             type = "toggle",                   
  908.                             order = 1,
  909.                             name = L["Window Border"],
  910.                             desc = L["Enables Chat Window Border."],
  911.                             disabled = function() return not db.chat.enable end,                           
  912.                         },                 
  913.                         disableFade = {
  914.                             type = "toggle",                   
  915.                             order = 1,
  916.                             name = L["Disable Fade"],
  917.                             desc = L["Disables Chat Fading."],
  918.                             disabled = function() return not db.chat.enable end,
  919.                         },
  920.                         chatOutline = {
  921.                             type = "toggle",                   
  922.                             order = 1,
  923.                             name = L["Chat Outline"],
  924.                             desc = L["Outlines the chat Text."],
  925.                             disabled = function() return not db.chat.enable end,
  926.                         },
  927.                         enableBottomButton = {
  928.                             type = "toggle",                   
  929.                             order = 1,
  930.                             name = L["Enable Bottom Button"],
  931.                             desc = L["Enables the scroll down button in the lower right hand corner."],
  932.                             disabled = function() return not db.chat.enable end,
  933.                         },
  934.                         enableHyperlinkTooltip = {
  935.                             type = "toggle",                   
  936.                             order = 1,
  937.                             name = L["Enable Hyplerlink Tooltip"],
  938.                             desc = L["Enables the mouseover items in chat tooltip."],
  939.                             disabled = function() return not db.chat.enable end,
  940.                         },
  941.                         enableBorderColoring = {
  942.                             type = "toggle",                   
  943.                             order = 1,
  944.                             name = L["Enable Editbox Channel Border Coloring"],
  945.                             desc = L["Enables the coloring of the border to the edit box to match what channel you are typing in."],
  946.                             disabled = function() return not db.chat.enable end,
  947.                         },                 
  948.                         tab = {
  949.                             type = "group",
  950.                             order = 5,
  951.                             name = L["Tabs"],
  952.                             desc = L["Tab Font Settings."],
  953.                             guiInline  = true,
  954.                             disabled = function() return not db.chat.enable end,
  955.                             get = function(info) return db.chat.tab[ info[#info] ] end,
  956.                             set = function(info, value) db.chat.tab[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                
  957.                             args = {
  958.                                 ---------------------------
  959.                                 --Option Type Seperators
  960.                                 sep1 = {
  961.                                     type = "description",
  962.                                     order = 2,                             
  963.                                     name = " ",
  964.                                 },
  965.                                 sep2 = {
  966.                                     type = "description",
  967.                                     order = 3,
  968.                                     name = " ",                            
  969.                                 },
  970.                                 sep3 = {
  971.                                     type = "description",
  972.                                     order = 4,
  973.                                     name = " ",
  974.                                 },
  975.                                 sep4 = {
  976.                                     type = "description",
  977.                                     order = 5,
  978.                                     name = " ",
  979.                                 }
  980.                                 ---------------------------                    
  981.                                 fontSize = {
  982.                                     type = "range",
  983.                                     order = 4,
  984.                                     name = L["Font Size"],
  985.                                     desc = L["Controls the size of the tab font"],
  986.                                     type = "range",
  987.                                     min = 9, max = 20, step = 1,                                   
  988.                                 },
  989.                                 fontOutline = {
  990.                                     type = "toggle",                           
  991.                                     order = 1,
  992.                                     name = L["Outline Tab Font"],
  993.                                     desc = L["Enables the outlineing of tab font."],                               
  994.                                 },
  995.                                 normalColor = {
  996.                                     type = "color",                        
  997.                                     order = 3,
  998.                                     name = L["Tab Normal Color"],
  999.                                     desc = L["Picks the Normal Color of the Chat Tab."],
  1000.                                     hasAlpha = false,
  1001.                                     disabled = function() return not db.chat.enable end,
  1002.                                     get = function(info)
  1003.                                         local hb = db.chat.tab[ info[#info] ]
  1004.                                         return hb.r, hb.g, hb.b
  1005.                                     end,
  1006.                                     set = function(info, r, g, b)
  1007.                                         db.chat.tab[ info[#info] ] = {}
  1008.                                         local hb = db.chat.tab[ info[#info] ]
  1009.                                         hb.r, hb.g, hb.b = r, g, b
  1010.                                         StaticPopup_Show("CFG_RELOAD")
  1011.                                     end,                   
  1012.                                 },
  1013.                                 specialColor = {
  1014.                                     type = "color",                        
  1015.                                     order = 3,
  1016.                                     name = L["Tab Special Color"],
  1017.                                     desc = L["Picks the Special Color of the Chat Tab."],
  1018.                                     hasAlpha = false,
  1019.                                     disabled = function() return not db.chat.enable end,
  1020.                                     get = function(info)
  1021.                                         local hb = db.chat.tab[ info[#info] ]
  1022.                                         return hb.r, hb.g, hb.b
  1023.                                     end,
  1024.                                     set = function(info, r, g, b)
  1025.                                         db.chat.tab[ info[#info] ] = {}
  1026.                                         local hb = db.chat.tab[ info[#info] ]
  1027.                                         hb.r, hb.g, hb.b = r, g, b
  1028.                                         StaticPopup_Show("CFG_RELOAD")
  1029.                                     end,                   
  1030.                                 },
  1031.                                 selectedColor = {
  1032.                                     type = "color",                        
  1033.                                     order = 3,
  1034.                                     name = L["Tab Selected Color"],
  1035.                                     desc = L["Picks the Selected Color of the Chat Tab."],
  1036.                                     hasAlpha = false,
  1037.                                     disabled = function() return not db.chat.enable end,
  1038.                                     get = function(info)
  1039.                                         local hb = db.chat.tab[ info[#info] ]
  1040.                                         return hb.r, hb.g, hb.b
  1041.                                     end,
  1042.                                     set = function(info, r, g, b)
  1043.                                         db.chat.tab[ info[#info] ] = {}
  1044.                                         local hb = db.chat.tab[ info[#info] ]
  1045.                                         hb.r, hb.g, hb.b = r, g, b
  1046.                                         StaticPopup_Show("CFG_RELOAD")
  1047.                                     end,                   
  1048.                                 },                         
  1049.                             },
  1050.                         },
  1051.                     },
  1052.                 },         
  1053.                 datapanel = {
  1054.                     type = "group",        
  1055.                     order = 5,
  1056.                     name = L["|cff00B4FFDatapanel|r"],
  1057.                     desc = L["datapanel Module for |cff00B4FFBasic|rUI."],
  1058.                     childGroups = "tree",
  1059.                     get = function(info) return db.datapanel[ info[#info] ] end,
  1060.                     set = function(info, value) db.datapanel[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,               
  1061.                     args = {
  1062.                         ---------------------------
  1063.                         --Option Type Seperators
  1064.                         sep1 = {
  1065.                             type = "description",
  1066.                             order = 2,                                     
  1067.                             name = " ",
  1068.                         },
  1069.                         sep2 = {
  1070.                             type = "description",
  1071.                             order = 3,                                     
  1072.                             name = " ",
  1073.                         },
  1074.                         sep3 = {
  1075.                             type = "description",
  1076.                             order = 4,                                     
  1077.                             name = " ",
  1078.                         },
  1079.                         sep4 = {
  1080.                             type = "description",
  1081.                             order = 5,                                     
  1082.                             name = " ",
  1083.                         }
  1084.                         ---------------------------            
  1085.                         enable = {
  1086.                             type = "toggle",                   
  1087.                             order = 0,
  1088.                             name = L["Enable"],
  1089.                             desc = L["Enables datapanel Module."],                         
  1090.                         },
  1091.                         time24 = {
  1092.                             type = "toggle",                   
  1093.                             order = 1,
  1094.                             name = L["24-Hour Time"],
  1095.                             desc = L["Display time datapanel on a 24 hour time scale"],
  1096.                             disabled = function() return not db.datapanel.enable end,                  
  1097.                         },                 
  1098.                         bag = {
  1099.                             type = "toggle",                   
  1100.                             order = 1,
  1101.                             name = L["Bag Open"],
  1102.                             desc = L["Checked opens Backpack only, Unchecked opens all bags."],
  1103.                             disabled = function() return not db.datapanel.enable end,                      
  1104.                         },             
  1105.                         battleground = {
  1106.                             type = "toggle",                   
  1107.                             order = 1,
  1108.                             name = L["Battleground Text"],
  1109.                             desc = L["Display special datapanels when inside a battleground"],
  1110.                             disabled = function() return not db.datapanel.enable end,                      
  1111.                         },                                 
  1112.                         recountraiddps = {
  1113.                             type = "toggle",                   
  1114.                             order = 1,
  1115.                             name = L["Recount Raid DPS"],
  1116.                             desc = L["Display Recount's Raid DPS (RECOUNT MUST BE INSTALLED)"],
  1117.                             disabled = function() return not db.datapanel.enable end,                              
  1118.                         },                                                         
  1119.                         DataGroup = {
  1120.                             type = "group",                
  1121.                             order = 5,
  1122.                             name = L["Text Positions"],
  1123.                             guiInline  = true,
  1124.                             disabled = function() return not db.datapanel.enable end,                      
  1125.                             args = {
  1126.                                 ---------------------------
  1127.                                 --Option Type Seperators
  1128.                                 sep1 = {
  1129.                                     type = "description",
  1130.                                     order = 2,                             
  1131.                                     name = " ",
  1132.                                 },
  1133.                                 sep2 = {
  1134.                                     type = "description",
  1135.                                     order = 3,
  1136.                                     name = " ",                            
  1137.                                 },
  1138.                                 sep3 = {
  1139.                                     type = "description",
  1140.                                     order = 4,
  1141.                                     name = " ",
  1142.                                 },
  1143.                                 sep4 = {
  1144.                                     type = "description",
  1145.                                     order = 5,
  1146.                                     name = " ",
  1147.                                 }
  1148.                                 ---------------------------                    
  1149.                                 bags = {
  1150.                                     type = "range",                        
  1151.                                     order = 4,
  1152.                                     name = L["Bags"],
  1153.                                     desc = L["Display ammount of bag space"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1154.                                     min = 0, max = 9, step = 1,
  1155.                                     disabled = function() return not db.datapanel.enable end,
  1156.                                 },
  1157.                                 calltoarms = {
  1158.                                     type = "range",                        
  1159.                                     order = 4,
  1160.                                     name = L["Call to Arms"],
  1161.                                     desc = L["Display the active roles that will recieve a reward for completing a random dungeon"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1162.                                     min = 0, max = 9, step = 1,
  1163.                                     disabled = function() return not db.datapanel.enable end,
  1164.                                 },
  1165.                                 coords = {
  1166.                                     type = "range",                        
  1167.                                     order = 4,
  1168.                                     name = L["Coordinates"],
  1169.                                     desc = L["Display Player's Coordinates"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1170.                                     min = 0, max = 9, step = 1,
  1171.                                     disabled = function() return not db.datapanel.enable end,
  1172.                                 },                     
  1173.                                 dps_text = {
  1174.                                     type = "range",                        
  1175.                                     order = 4,
  1176.                                     name = L["DPS"],
  1177.                                     desc = L["Display ammount of DPS"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1178.                                     min = 0, max = 9, step = 1,
  1179.                                     disabled = function() return not db.datapanel.enable end,
  1180.                                 },                     
  1181.                                 dur = {
  1182.                                     type = "range",                        
  1183.                                     order = 4,
  1184.                                     name = L["Durability"],
  1185.                                     desc = L["Display your current durability"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1186.                                     min = 0, max = 9, step = 1,
  1187.                                     disabled = function() return not db.datapanel.enable end,
  1188.                                 },
  1189.                                 friends = {
  1190.                                     type = "range",                            
  1191.                                     order = 4,
  1192.                                     name = L["Friends"],
  1193.                                     desc = L["Display current online friends"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1194.                                     min = 0, max = 9, step = 1,
  1195.                                     disabled = function() return not db.datapanel.enable end,
  1196.                                 },
  1197.                                 guild = {
  1198.                                     type = "range",                        
  1199.                                     order = 4,
  1200.                                     name = L["Guild"],
  1201.                                     desc = L["Display current online people in guild"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1202.                                     min = 0, max = 9, step = 1,
  1203.                                     disabled = function() return not db.datapanel.enable end,
  1204.                                 },
  1205.                                 hps_text = {
  1206.                                     type = "range",                        
  1207.                                     order = 4,
  1208.                                     name = L["HPS"],
  1209.                                     desc = L["Display ammount of HPS"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1210.                                     min = 0, max = 9, step = 1,
  1211.                                     disabled = function() return not db.datapanel.enable end,
  1212.                                 },
  1213.                                 pro = {
  1214.                                     type = "range",                        
  1215.                                     order = 4,
  1216.                                     name = L["Professions"],
  1217.                                     desc = L["Display Professions"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1218.                                     min = 0, max = 9, step = 1,
  1219.                                     disabled = function() return not db.datapanel.enable end,
  1220.                                 },
  1221.                                 recount = {
  1222.                                     type = "range",                        
  1223.                                     order = 4,
  1224.                                     name = L["Recount"],
  1225.                                     desc = L["Display Recount's DPS (RECOUNT MUST BE INSTALLED)"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1226.                                     min = 0, max = 9, step = 1,
  1227.                                     disabled = function() return not db.datapanel.enable end,
  1228.                                 },                         
  1229.                                 spec = {
  1230.                                     type = "range",                        
  1231.                                     order = 4,
  1232.                                     name = L["Talent Spec"],
  1233.                                     desc = L["Display current spec"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1234.                                     min = 0, max = 9, step = 1,
  1235.                                     disabled = function() return not db.datapanel.enable end,
  1236.                                 },
  1237.                                 stat1 = {
  1238.                                     type = "range",                        
  1239.                                     order = 4,
  1240.                                     name = L["Stat #1"],
  1241.                                     desc = L["Display stat based on your role (Avoidance-Tank, AP-Melee, SP/HP-Caster)"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1242.                                     min = 0, max = 9, step = 1,
  1243.                                     disabled = function() return not db.datapanel.enable end,
  1244.                                 },                         
  1245.                                 stat2 = {
  1246.                                     type = "range",                        
  1247.                                     order = 4,
  1248.                                     name = L["Stat #2"],
  1249.                                     desc = L["Display stat based on your role (Armor-Tank, Crit-Melee, Crit-Caster)"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1250.                                     min = 0, max = 9, step = 1,
  1251.                                     disabled = function() return not db.datapanel.enable end,
  1252.                                 },
  1253.                                 system = {
  1254.                                     type = "range",                        
  1255.                                     order = 4,
  1256.                                     name = L["System"],
  1257.                                     desc = L["Display FPS and Latency"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1258.                                     min = 0, max = 9, step = 1,
  1259.                                     disabled = function() return not db.datapanel.enable end,
  1260.                                 },
  1261.                                 wowtime = {
  1262.                                     type = "range",                        
  1263.                                     order = 4,
  1264.                                     name = L["Time"],
  1265.                                     desc = L["Display current time"]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1266.                                     min = 0, max = 9, step = 1,
  1267.                                     disabled = function() return not db.datapanel.enable end,
  1268.                                 },
  1269.                                 zone = {
  1270.                                     type = "range",                        
  1271.                                     order = 4,
  1272.                                     name = L["Zone"],
  1273.                                     desc = L["Display Player's Current Zone."]..L["\n\n0 - Disabled\n1 - POSITION #1\n2 - POSITION #2\n3 - POSITION #3\n4 - POSITION #4\n5 - POSITION #5\n6 - POSITION #6\n7 - POSITION #7\n8 - POSITION #8\n9 - POSITION #9"],
  1274.                                     min = 0, max = 9, step = 1,
  1275.                                     disabled = function() return not db.datapanel.enable end,
  1276.                                 },
  1277.                             },
  1278.                         },
  1279.                     },
  1280.                 },     
  1281.                 merchant = {
  1282.                     type = "group",        
  1283.                     order = 6,
  1284.                     name = L["|cff00B4FFMerchant|r"],
  1285.                     desc = L["Merchant Module for |cff00B4FFBasic|rUI."],
  1286.                     childGroups = "tree",
  1287.                     get = function(info) return db.merchant[ info[#info] ] end,
  1288.                     set = function(info, value) db.merchant[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                
  1289.                     args = {
  1290.                         ---------------------------
  1291.                         --Option Type Seperators
  1292.                         sep1 = {
  1293.                             type = "description",
  1294.                             order = 2,                                     
  1295.                             name = " ",
  1296.                         },
  1297.                         sep2 = {
  1298.                             type = "description",
  1299.                             order = 3,                                     
  1300.                             name = " ",
  1301.                         },
  1302.                         sep3 = {
  1303.                             type = "description",
  1304.                             order = 4,                                     
  1305.                             name = " ",
  1306.                         },
  1307.                         sep4 = {
  1308.                             type = "description",
  1309.                             order = 5,                                     
  1310.                             name = " ",
  1311.                         }
  1312.                         ---------------------------            
  1313.                         enable = {
  1314.                             type = "toggle",
  1315.                             order = 0,
  1316.                             name = L["Enable"],
  1317.                             desc = L["Enable Merchant Settings"],
  1318.                             width = "full",
  1319.                         },
  1320.                         autoRepair = {
  1321.                             type = "toggle",
  1322.                             order = 1,
  1323.                             name = L["Auto Repair"],
  1324.                             desc = L["Automatically repair when visiting a vendor"],
  1325.                             disabled = function() return not db.merchant.enable end,
  1326.                         },
  1327.                         autoSellGrey = {
  1328.                             type = "toggle",
  1329.                             order = 1,
  1330.                             name = L["Sell Grays"],
  1331.                             desc = L["Automatically sell gray items when visiting a vendor"],
  1332.                             disabled = function() return not db.merchant.enable end,
  1333.                         },                 
  1334.                         sellMisc = {
  1335.                             type = "toggle",
  1336.                             order = 1,
  1337.                             name = L["Sell Misc Items"],
  1338.                             desc = L["Automatically sell a user selected item."],
  1339.                             disabled = function() return not db.merchant.enable end,
  1340.                         },
  1341.                     },
  1342.                 },
  1343.                 minimap = {
  1344.                     type = "group",
  1345.                     order = 7,
  1346.                     name = L["|cff00B4FFMinimap|r"],
  1347.                     desc = L["Enables Minimap Modifications."],
  1348.                     get = function(info) return db.minimap[ info[#info] ] end,
  1349.                     set = function(info, value) db.minimap[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,
  1350.                     args = {
  1351.                         ---------------------------
  1352.                         --Option Type Seperators
  1353.                         sep1 = {
  1354.                             type = "description",
  1355.                             order = 2,                                     
  1356.                             name = " ",
  1357.                         },
  1358.                         sep2 = {
  1359.                             type = "description",
  1360.                             order = 3,                                     
  1361.                             name = " ",
  1362.                         },
  1363.                         sep3 = {
  1364.                             type = "description",
  1365.                             order = 4,                                     
  1366.                             name = " ",
  1367.                         },
  1368.                         sep4 = {
  1369.                             type = "description",
  1370.                             order = 5,                                     
  1371.                             name = " ",
  1372.                         }
  1373.                         ---------------------------            
  1374.                         enable = {
  1375.                             type = "toggle",                   
  1376.                             order = 0,
  1377.                             name = L["Enable"],
  1378.                             desc = L["Enables Minimap Modifications."],
  1379.                             width = "full"
  1380.                         },
  1381.                         farm = {
  1382.                             type = "toggle",                   
  1383.                             order = 1,
  1384.                             name = L["Farming"],
  1385.                             desc = L["Enlarges the Minimap when Farming."],
  1386.                             disabled = function() return not db.minimap.enable end,                    
  1387.                         },
  1388.                         farmscale = {
  1389.                             type = "range",
  1390.                             order = 4,                     
  1391.                             name = L["Farming Map Scale"],
  1392.                             desc = L["Controls the Size of the Farming Map"],
  1393.                             disabled = function() return not db.minimap.enable or not db.minimap.farm end,                 
  1394.                             min = 1, max = 5, step = 0.1,
  1395.                         },                 
  1396.                         gameclock = {
  1397.                             type = "toggle",                   
  1398.                             order = 1,
  1399.                             name = L["Game Clock"],
  1400.                             desc = L["Enable the Clock Frame on Minimap."],
  1401.                             disabled = function() return not db.minimap.enable end,                            
  1402.                         },                                                 
  1403.                     },
  1404.                 },         
  1405.                 nameplates = {
  1406.                     type = "group",        
  1407.                     order = 6,
  1408.                     name = L["|cff00B4FFNameplate|r"],
  1409.                     desc = L["Nameplate Module for |cff00B4FFBasic|rUI."],
  1410.                     get = function(info) return db.nameplates[ info[#info] ] end,
  1411.                     set = function(info, value) db.nameplates[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                  
  1412.                     args = {
  1413.                         ---------------------------
  1414.                         --Option Type Seperators
  1415.                         sep1 = {
  1416.                             type = "description",
  1417.                             order = 2,                                     
  1418.                             name = " ",
  1419.                         },
  1420.                         sep2 = {
  1421.                             type = "description",
  1422.                             order = 3,                                     
  1423.                             name = " ",
  1424.                         },
  1425.                         sep3 = {
  1426.                             type = "description",
  1427.                             order = 4,                                     
  1428.                             name = " ",
  1429.                         },
  1430.                         sep4 = {
  1431.                             type = "description",
  1432.                             order = 5,                                     
  1433.                             name = " ",
  1434.                         }
  1435.                         ---------------------------            
  1436.                         enable = {
  1437.                             type = "toggle",
  1438.                             order = 0,
  1439.                             name = L["Enable"],
  1440.                             desc = L["Enable Nameplate Settings"]
  1441.                             width = "full",                    
  1442.                         },
  1443.                         enableTankMode = {
  1444.                             type = "toggle",
  1445.                             order = 1,
  1446.                             name = L["Enable Tank Mode"],
  1447.                             disabled = function() return not db.nameplates.enable end,
  1448.                         },             
  1449.                         colorNameWithThreat = {
  1450.                             type = "toggle",
  1451.                             order = 1,
  1452.                             name = L["Color Name With Threat"],
  1453.                             disabled = function() return not db.nameplates.enable end,
  1454.                         },
  1455.                         showFullHP = {
  1456.                             type = "toggle",
  1457.                             order = 1,
  1458.                             name = L["Show Full HP"],
  1459.                             disabled = function() return not db.nameplates.enable end,
  1460.                         }
  1461.                         showLevel = {
  1462.                             type = "toggle",
  1463.                             order = 1,
  1464.                             name = L["Show Level"],
  1465.                             disabled = function() return not db.nameplates.enable end,
  1466.                         }
  1467.                         showTargetBorder = {
  1468.                             type = "toggle",
  1469.                             order = 1,
  1470.                             name = L["Show Target Border"],
  1471.                             disabled = function() return not db.nameplates.enable end,
  1472.                         }
  1473.                         showEliteBorder = {
  1474.                             type = "toggle",
  1475.                             order = 1,
  1476.                             name = L["Show Elite Border"],
  1477.                             disabled = function() return not db.nameplates.enable end,
  1478.                         }
  1479.                         showTotemIcon = {
  1480.                             type = "toggle",
  1481.                             order = 1,
  1482.                             name = L["Show Totem Icon"],
  1483.                             disabled = function() return not db.nameplates.enable end,
  1484.                         },
  1485.                         abbrevLongNames = {
  1486.                             type = "toggle",
  1487.                             order = 1,
  1488.                             name = L["Abbrev Long Names"],
  1489.                             disabled = function() return not db.nameplates.enable end,
  1490.                         },                     
  1491.                     },
  1492.                 },         
  1493.                 quest = {
  1494.                     type = "group",        
  1495.                     order = 10,
  1496.                     name = L["|cff00B4FFQuest|r"],
  1497.                     desc = L["Quest Module for |cff00B4FFBasic|rUI."],
  1498.                     childGroups = "tree",
  1499.                     get = function(info) return db.quest[ info[#info] ] end,
  1500.                     set = function(info, value) db.quest[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                   
  1501.                     args = {
  1502.                         ---------------------------
  1503.                         --Option Type Seperators
  1504.                         sep1 = {
  1505.                             type = "description",
  1506.                             order = 2,                                     
  1507.                             name = " ",
  1508.                         },
  1509.                         sep2 = {
  1510.                             type = "description",
  1511.                             order = 3,                                     
  1512.                             name = " ",
  1513.                         },
  1514.                         sep3 = {
  1515.                             type = "description",
  1516.                             order = 4,                                     
  1517.                             name = " ",
  1518.                         },
  1519.                         sep4 = {
  1520.                             type = "description",
  1521.                             order = 5,                                     
  1522.                             name = " ",
  1523.                         }
  1524.                         ---------------------------            
  1525.                         enable = {
  1526.                             type = "toggle",                   
  1527.                             order = 0,
  1528.                             name = L["Enable"],
  1529.                             desc = L["Enables Quest Module"],                          
  1530.                         },                 
  1531.                         autocomplete = {
  1532.                             type = "toggle",                   
  1533.                             order = 1,
  1534.                             name = L["Autocomplete"],
  1535.                             desc = L["Automatically complete your quest."],
  1536.                             disabled = function() return not db.quest.enable end,
  1537.                         },
  1538.                     },
  1539.                 },         
  1540.                 tooltip = {
  1541.                     type = "group",        
  1542.                     order = 12,
  1543.                     name = L["|cff00B4FFTooltip|r"],
  1544.                     desc = L["Tooltip Module for |cff00B4FFBasic|rUI."],
  1545.                     childGroups = "tree",
  1546.                     get = function(info) return db.tooltip[ info[#info] ] end,
  1547.                     set = function(info, value) db.tooltip[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                 
  1548.                     args = {
  1549.                         ---------------------------
  1550.                         --Option Type Seperators
  1551.                         sep1 = {
  1552.                             type = "description",
  1553.                             order = 2,                                     
  1554.                             name = " ",
  1555.                         },
  1556.                         sep2 = {
  1557.                             type = "description",
  1558.                             order = 3,                                     
  1559.                             name = " ",
  1560.                         },
  1561.                         sep3 = {
  1562.                             type = "description",
  1563.                             order = 4,                                     
  1564.                             name = " ",
  1565.                         },
  1566.                         sep4 = {
  1567.                             type = "description",
  1568.                             order = 5,                                     
  1569.                             name = " ",
  1570.                         }
  1571.                         ---------------------------            
  1572.                         enable = {
  1573.                             type = "toggle",                   
  1574.                             order = 0,
  1575.                             name = L["Enable"],
  1576.                             desc = L["Enables Tooltip Module"],                        
  1577.                         },                 
  1578.                         disableFade = {
  1579.                             type = "toggle",                   
  1580.                             order = 1,
  1581.                             name = L["Disable Fade"],
  1582.                             desc = L["Disables Tooltip Fade."],
  1583.                             disabled = function() return not db.tooltip.enable end,
  1584.                         },                 
  1585.                         reactionBorderColor = {
  1586.                             type = "toggle",                   
  1587.                             order = 1,
  1588.                             name = L["Reaction Border Color"],
  1589.                             desc = L["Colors the borders match targets classcolors."],
  1590.                             disabled = function() return not db.tooltip.enable end,
  1591.                         },
  1592.                         itemqualityBorderColor = {
  1593.                             type = "toggle",                   
  1594.                             order = 1,
  1595.                             name = L["Item Quality Border Color"],
  1596.                             desc = L["Colors the border of the tooltip to match the items quality."],
  1597.                             disabled = function() return not db.tooltip.enable end,
  1598.                         },
  1599.                         showPlayerTitles = {
  1600.                             type = "toggle",                   
  1601.                             order = 1,
  1602.                             name = L["Player Titles"],
  1603.                             desc = L["Shows players title in tooltip."],
  1604.                             disabled = function() return not db.tooltip.enable end,
  1605.                         },
  1606.                         showPVPIcons = {
  1607.                             type = "toggle",                   
  1608.                             order = 1,
  1609.                             name = L["PVP Icons"],
  1610.                             desc = L["Shows PvP Icons in tooltip."],
  1611.                             disabled = function() return not db.tooltip.enable end,
  1612.                         },
  1613.                         showUnitRole = {
  1614.                             type = "toggle",                   
  1615.                             order = 1,
  1616.                             name = L["Show Units Role"],
  1617.                             desc = L["Shows Units Role in tooltip."],
  1618.                             disabled = function() return not db.tooltip.enable end,
  1619.                         },
  1620.                         abbrevRealmNames = {
  1621.                             type = "toggle",                   
  1622.                             order = 1,
  1623.                             name = L["Abberviate Realm Names"],
  1624.                             desc = L["Abberviates Players Realm Name."],
  1625.                             disabled = function() return not db.tooltip.enable end,
  1626.                         },
  1627.                         showMouseoverTarget = {
  1628.                             type = "toggle",                   
  1629.                             order = 1,
  1630.                             name = L["Mouseover Target"],
  1631.                             desc = L["Shows mouseover target."],
  1632.                             disabled = function() return not db.tooltip.enable end,
  1633.                         },
  1634.                         showItemLevel = {
  1635.                             type = "toggle",                   
  1636.                             order = 1,
  1637.                             name = L["Item Level"],
  1638.                             desc = L["Shows targets average item level."],
  1639.                             disabled = function() return not db.tooltip.enable end,
  1640.                         },
  1641.                         hideInCombat = {
  1642.                             type = "toggle",                   
  1643.                             order = 1,
  1644.                             name = L["Hide in Combat"],
  1645.                             desc = L["Hides unit frame tooltips during combat."],
  1646.                             disabled = function() return not db.tooltip.enable end,
  1647.                         },
  1648.                         hideRealmText = {
  1649.                             type = "toggle",                   
  1650.                             order = 1,
  1651.                             name = L["Hide Realm Text"],
  1652.                             desc = L["Hide the coalesced/interactive realm text."],
  1653.                             disabled = function() return not db.tooltip.enable end,
  1654.                         },                 
  1655.                         healthbar = {
  1656.                             type = "group",
  1657.                             order = 5,
  1658.                             name = L["Healthbar"],
  1659.                             desc = L["Players Healthbar Options."],
  1660.                             guiInline  = true,
  1661.                             disabled = function() return not db.tooltip.enable end,
  1662.                             get = function(info) return db.tooltip.healthbar[ info[#info] ] end,
  1663.                             set = function(info, value) db.tooltip.healthbar[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                       
  1664.                             args = {
  1665.                                 ---------------------------
  1666.                                 --Option Type Seperators
  1667.                                 sep1 = {
  1668.                                     type = "description",
  1669.                                     order = 2,                             
  1670.                                     name = " ",
  1671.                                 },
  1672.                                 sep2 = {
  1673.                                     type = "description",
  1674.                                     order = 3,
  1675.                                     name = " ",                            
  1676.                                 },
  1677.                                 sep3 = {
  1678.                                     type = "description",
  1679.                                     order = 4,
  1680.                                     name = " ",
  1681.                                 },
  1682.                                 sep4 = {
  1683.                                     type = "description",
  1684.                                     order = 5,
  1685.                                     name = " ",
  1686.                                 }
  1687.                                 ---------------------------                    
  1688.                                 showHealthValue = {
  1689.                                     type = "toggle",                           
  1690.                                     order = 1,
  1691.                                     name = L["Health Value"],
  1692.                                     desc = L["Shows health value over healthbar."],
  1693.                                     disabled = function() return not db.tooltip.enable end,
  1694.                                 },
  1695.                                 showOutline = {
  1696.                                     type = "toggle",                           
  1697.                                     order = 1,
  1698.                                     name = L["Font Outline"],
  1699.                                     desc = L["Adds a font outline to health value."],
  1700.                                     disabled = function() return not db.tooltip.enable end,
  1701.                                 },
  1702.                                 reactionColoring = {
  1703.                                     type = "toggle",                           
  1704.                                     order = 1,
  1705.                                     name = L["Reaction Coloring"],
  1706.                                     desc = L["Change healthbar color to targets classcolor. (Overides Custom Color)"],
  1707.                                     disabled = function() return not db.tooltip.enable end,
  1708.                                 },                                                     
  1709.                                 custom = {
  1710.                                     type = "group",
  1711.                                     order = 5,
  1712.                                     name = L["Custom"],
  1713.                                     desc = L["Custom Coloring"],
  1714.                                     childGroups = "tree",
  1715.                                     disabled = function() return not db.tooltip.enable end,
  1716.                                     get = function(info) return db.tooltip.healthbar.custom[ info[#info] ] end,
  1717.                                     set = function(info, value) db.tooltip.healthbar.custom[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                    
  1718.                                     args = {
  1719.                                         ---------------------------
  1720.                                         --Option Type Seperators
  1721.                                         sep1 = {
  1722.                                             type = "description",
  1723.                                             name = " ",
  1724.                                             order = 2,
  1725.                                         },
  1726.                                         sep2 = {
  1727.                                             type = "description",
  1728.                                             name = " ",
  1729.                                             order = 3,
  1730.                                         },
  1731.                                         sep3 = {
  1732.                                             type = "description",
  1733.                                             name = " ",
  1734.                                             order = 4,
  1735.                                         },
  1736.                                         sep4 = {
  1737.                                             type = "description",
  1738.                                             name = " ",
  1739.                                             order = 5,
  1740.                                         }
  1741.                                         ---------------------------                            
  1742.                                         apply = {
  1743.                                             type = "toggle",                                   
  1744.                                             order = 1,
  1745.                                             name = L["Apply Custom Color"],
  1746.                                             desc = L["Use the Custom Color you have chosen."],
  1747.                                             disabled = function() return not db.tooltip.enable end,
  1748.                                         },
  1749.                                         color = {
  1750.                                             type = "color",                                
  1751.                                             order = 3,
  1752.                                             name = L["Custom Color"],
  1753.                                             desc = L["Picks a Custom Color for the tooltip border."],
  1754.                                             hasAlpha = false,
  1755.                                             disabled = function() return not db.tooltip.healthbar.custom.apply or not db.tooltip.enable end,
  1756.                                             get = function(info)
  1757.                                                 local hb = db.tooltip.healthbar.custom[ info[#info] ]
  1758.                                                 return hb.r, hb.g, hb.b
  1759.                                             end,
  1760.                                             set = function(info, r, g, b)
  1761.                                                 db.tooltip.healthbar.custom[ info[#info] ] = {}
  1762.                                                 local hb = db.tooltip.healthbar.custom[ info[#info] ]
  1763.                                                 hb.r, hb.g, hb.b = r, g, b
  1764.                                             end,                   
  1765.                                         },
  1766.                                     },
  1767.                                 },
  1768.                                 textPos = {
  1769.                                     type = "select",
  1770.                                     order = 2,
  1771.                                     name = L["Text Position"],
  1772.                                     desc = L["Health Value Position."],
  1773.                                     disabled = function() return not db.tooltip.enable end,
  1774.                                     values = regions;
  1775.                                 },                     
  1776.                                 fontSize= {
  1777.                                     type = "range",                        
  1778.                                     order = 4,
  1779.                                     name = L["Font Size"],
  1780.                                     desc = L["Controls the healthbar value font size."],
  1781.                                     min = 8, max = 25, step = 1,
  1782.                                     disabled = function() return not db.tooltip.enable end,
  1783.                                 },                         
  1784.                             },
  1785.                         },                 
  1786.                     },
  1787.                 },
  1788.                 unitframes = {
  1789.                     type = "group",        
  1790.                     order = 13,
  1791.                     name = L["|cff00B4FFUnitframes|r"],
  1792.                     desc = L["Unitframes Module for |cff00B4FFBasic|rUI."],
  1793.                     childGroups = "tree",
  1794.                     get = function(info) return db.unitframes[ info[#info] ] end,
  1795.                     set = function(info, value) db.unitframes[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                  
  1796.                     args = {
  1797.                         ---------------------------
  1798.                         --Option Type Seperators
  1799.                         sep1 = {
  1800.                             type = "description",
  1801.                             order = 1,                                     
  1802.                             name = " ",
  1803.                         },
  1804.                         sep2 = {
  1805.                             type = "description",
  1806.                             order = 2,                                     
  1807.                             name = " ",
  1808.                         },
  1809.                         sep3 = {
  1810.                             type = "description",
  1811.                             order = 3,                                     
  1812.                             name = " ",
  1813.                         },
  1814.                         sep4 = {
  1815.                             type = "description",
  1816.                             order = 4,                                     
  1817.                             name = " ",
  1818.                         },
  1819.                         sep5 = {
  1820.                             type = "description",
  1821.                             order = 5,                                     
  1822.                             name = " ",
  1823.                         },
  1824.                         sep6 = {
  1825.                             type = "description",
  1826.                             order = 6,                                     
  1827.                             name = " ",
  1828.                         },
  1829.                         sep7 = {
  1830.                             type = "description",
  1831.                             order = 7,                                     
  1832.                             name = " ",
  1833.                         },                 
  1834.                         ---------------------------            
  1835.                         enable = {
  1836.                             type = "toggle",                   
  1837.                             order = 0,
  1838.                             name = L["Enable"],
  1839.                             desc = L["Enables Uniframes Module"],                          
  1840.                         },             
  1841.                         player = {
  1842.                             type = "group",
  1843.                             order = 3,
  1844.                             name = L["Player Frame"],
  1845.                             desc = L["Adjust the Player Frame."],  
  1846.                             guiInline  = true,
  1847.                             get = function(info) return db.unitframes.player[ info[#info] ] end,
  1848.                             set = function(info, value) db.unitframes.player[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                       
  1849.                             args = {
  1850.                                 ---------------------------
  1851.                                 --Option Type Seperators
  1852.                                 sep1 = {
  1853.                                     type = "description",
  1854.                                     order = 1,                                     
  1855.                                     name = " ",
  1856.                                 },
  1857.                                 sep2 = {
  1858.                                     type = "description",
  1859.                                     order = 2,                                     
  1860.                                     name = " ",
  1861.                                 },
  1862.                                 sep3 = {
  1863.                                     type = "description",
  1864.                                     order = 3,                                     
  1865.                                     name = " ",
  1866.                                 },
  1867.                                 sep4 = {
  1868.                                     type = "description",
  1869.                                     order = 4,                                     
  1870.                                     name = " ",
  1871.                                 },
  1872.                                 ---------------------------                                            
  1873.                                 enable = {
  1874.                                     type = "toggle",                   
  1875.                                     order = 0,
  1876.                                     name = L["Enable"],
  1877.                                     desc = L["Enables Player Frame Adjustments"],                          
  1878.                                 },
  1879.                                 scale = {
  1880.                                     type = "range",                        
  1881.                                     order = 1,
  1882.                                     name = L["Frame Scale"],
  1883.                                     desc = L["Controls the scaling of Blizzard's Player Frame"],
  1884.                                     min = 0.5, max = 2, step = 0.05,
  1885.                                     disabled = function() return not db.unitframes.enable or not db.unitframes.player.enable end,
  1886.                                 },
  1887.                                 fontSize= {
  1888.                                     type = "range",                        
  1889.                                     order = 2,
  1890.                                     name = L["HP/Mana Font Size"],
  1891.                                     desc = L["Controls the Player Healthbar/Manabar value font size."],
  1892.                                     min = 8, max = 25, step = 1,
  1893.                                     disabled = function() return not db.unitframes.enable or not db.unitframes.player.enable end,
  1894.                                 },
  1895.                                 fontSizepet= {
  1896.                                     type = "range",                        
  1897.                                     order = 2,
  1898.                                     name = L["HP/Mana Font Size for your pet"],
  1899.                                     desc = L["Controls the Player Pet Healthbar/Manabar value font size."],
  1900.                                     min = 8, max = 25, step = 1,
  1901.                                     disabled = function() return not db.unitframes.enable or not db.unitframes.player.enable end,
  1902.                                 },                         
  1903.                             },
  1904.                         },
  1905.                         target = {
  1906.                             type = "group",
  1907.                             order = 4,
  1908.                             name = L["Target Frame"],
  1909.                             desc = L["Adjust the Target Frame."],  
  1910.                             guiInline  = true,
  1911.                             get = function(info) return db.unitframes.target[ info[#info] ] end,
  1912.                             set = function(info, value) db.unitframes.target[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                       
  1913.                             args = {
  1914.                                 ---------------------------
  1915.                                 --Option Type Seperators
  1916.                                 sep1 = {
  1917.                                     type = "description",
  1918.                                     order = 1,                                     
  1919.                                     name = " ",
  1920.                                 },
  1921.                                 sep2 = {
  1922.                                     type = "description",
  1923.                                     order = 2,                                     
  1924.                                     name = " ",
  1925.                                 },
  1926.                                 sep3 = {
  1927.                                     type = "description",
  1928.                                     order = 3,                                     
  1929.                                     name = " ",
  1930.                                 },
  1931.                                 sep4 = {
  1932.                                     type = "description",
  1933.                                     order = 4,                                     
  1934.                                     name = " ",
  1935.                                 },
  1936.                                 ---------------------------                                            
  1937.                                 enable = {
  1938.                                     type = "toggle",                   
  1939.                                     order = 0,
  1940.                                     name = L["Enable"],
  1941.                                     desc = L["Enables Target Frame Adjustments"],                          
  1942.                                 },
  1943.                                 scale = {
  1944.                                     type = "range",                        
  1945.                                     order = 1,
  1946.                                     name = L["Frame Scale"],
  1947.                                     desc = L["Controls the scaling of Blizzard's Target Frame"],
  1948.                                     min = 0.5, max = 2, step = 0.05,
  1949.                                     disabled = function() return not db.unitframes.enable or not db.unitframes.target.enable end,
  1950.                                 },
  1951.                                 fontSize= {
  1952.                                     type = "range",                        
  1953.                                     order = 2,
  1954.                                     name = L["HP/Mana Font Size"],
  1955.                                     desc = L["Controls the Target Healthbar/Manabar value font size."],
  1956.                                     min = 8, max = 25, step = 1,
  1957.                                     disabled = function() return not db.unitframes.enable or not db.unitframes.target.enable end,
  1958.                                 },                             
  1959.                             },
  1960.                         },
  1961.                         focus = {
  1962.                             type = "group",
  1963.                             order = 5,
  1964.                             name = L["Focus Frame"],
  1965.                             desc = L["Adjust the Focus Frame."],   
  1966.                             guiInline  = true,
  1967.                             get = function(info) return db.unitframes.focus[ info[#info] ] end,
  1968.                             set = function(info, value) db.unitframes.focus[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                    
  1969.                             args = {
  1970.                                 ---------------------------
  1971.                                 --Option Type Seperators
  1972.                                 sep1 = {
  1973.                                     type = "description",
  1974.                                     order = 1,                                     
  1975.                                     name = " ",
  1976.                                 },
  1977.                                 sep2 = {
  1978.                                     type = "description",
  1979.                                     order = 2,                                     
  1980.                                     name = " ",
  1981.                                 },
  1982.                                 sep3 = {
  1983.                                     type = "description",
  1984.                                     order = 3,                                     
  1985.                                     name = " ",
  1986.                                 },
  1987.                                 sep4 = {
  1988.                                     type = "description",
  1989.                                     order = 4,                                     
  1990.                                     name = " ",
  1991.                                 },
  1992.                                 ---------------------------                                            
  1993.                                 enable = {
  1994.                                     type = "toggle",                   
  1995.                                     order = 0,
  1996.                                     name = L["Enable"],
  1997.                                     desc = L["Enables Focus Frame Adjustments"],                           
  1998.                                 },
  1999.                                 scale = {
  2000.                                     type = "range",                        
  2001.                                     order = 1,
  2002.                                     name = L["Frame Scale"],
  2003.                                     desc = L["Controls the scaling of Blizzard's Focus Frame"],
  2004.                                     min = 0.5, max = 2, step = 0.05,
  2005.                                     disabled = function() return not db.unitframes.enable or not db.unitframes.focus.enable end,
  2006.                                 },
  2007.                                 fontSize= {
  2008.                                     type = "range",                        
  2009.                                     order = 2,
  2010.                                     name = L["HP/Mana Font Size"],
  2011.                                     desc = L["Controls the Focus Healthbar/Manabar value font size."],
  2012.                                     min = 8, max = 25, step = 1,
  2013.                                     disabled = function() return not db.unitframes.enable or not db.unitframes.focus.enable end,
  2014.                                 },                             
  2015.                             },
  2016.                         },
  2017.                         party = {
  2018.                             type = "group",
  2019.                             order = 6,
  2020.                             name = L["Party Frame"],
  2021.                             desc = L["Adjust the scale of Blizzards Unit Frames."],
  2022.                             guiInline  = true,
  2023.                             get = function(info) return db.unitframes.party[ info[#info] ] end,
  2024.                             set = function(info, value) db.unitframes.party[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                    
  2025.                             args = {
  2026.                                 ---------------------------
  2027.                                 sep1 = {
  2028.                                     type = "description",
  2029.                                     order = 1,                                     
  2030.                                     name = " ",
  2031.                                 },
  2032.                                 sep2 = {
  2033.                                     type = "description",
  2034.                                     order = 2,                                     
  2035.                                     name = " ",
  2036.                                 },
  2037.                                 sep3 = {
  2038.                                     type = "description",
  2039.                                     order = 3,                                     
  2040.                                     name = " ",
  2041.                                 },
  2042.                                 sep4 = {
  2043.                                     type = "description",
  2044.                                     order = 4,                                     
  2045.                                     name = " ",
  2046.                                 },
  2047.                                 sep5 = {
  2048.                                     type = "description",
  2049.                                     order = 5,                                     
  2050.                                     name = " ",
  2051.                                 },
  2052.                                 ---------------------------
  2053.                                 enable = {
  2054.                                     type = "toggle",                   
  2055.                                     order = 0,
  2056.                                     name = L["Enable"],
  2057.                                     desc = L["Enables Party Frame Adjustments"],                           
  2058.                                 },                         
  2059.                                 scale = {
  2060.                                     type = "range",                        
  2061.                                     order = 1,
  2062.                                     name = L["Scale"],
  2063.                                     desc = L["Controls the scaling of Blizzard's Party Frame"],
  2064.                                     min = 0.5, max = 2, step = 0.05,
  2065.                                     disabled = function() return not db.unitframes.enable end,
  2066.                                 },
  2067.                                 fontSize= {
  2068.                                     type = "range",                        
  2069.                                     order = 2,
  2070.                                     name = L["HP/Mana Font Size"],
  2071.                                     desc = L["Controls the Party Healthbar/Manabar value font size."],
  2072.                                     min = 8, max = 25, step = 1,
  2073.                                     disabled = function() return not db.unitframes.enable or not db.unitframes.party.enable end,
  2074.                                 }
  2075.                                 position = {
  2076.                                     type = "group",
  2077.                                     order = 2,
  2078.                                     childGroups = "tree",
  2079.                                     name = L["Position"],
  2080.                                     --desc = L["Combo Points Options"],
  2081.                                     disabled = function() return not db.unitframes.enable end,                     
  2082.                                     get = function(info) return db.unitframes.party.position[ info[#info] ] end,
  2083.                                     set = function(info, value) db.unitframes.party.position[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                       
  2084.                                     args = {
  2085.                                         ---------------------------
  2086.                                         --Option Type Seperators
  2087.                                         sep1 = {
  2088.                                             type = "description",
  2089.                                             order = 1,                             
  2090.                                             name = " ",
  2091.                                         },
  2092.                                         sep2 = {
  2093.                                             type = "description",
  2094.                                             order = 2,
  2095.                                             name = " ",                            
  2096.                                         },
  2097.                                         sep3 = {
  2098.                                             type = "description",
  2099.                                             order = 3,
  2100.                                             name = " ",
  2101.                                         },
  2102.                                         sep4 = {
  2103.                                             type = "description",
  2104.                                             order = 4,
  2105.                                             name = " ",
  2106.                                         }
  2107.                                         ---------------------------                        
  2108.                                         relAnchor = {
  2109.                                             order = 1,
  2110.                                             name = L["Self Anchor"],
  2111.                                             --desc = L["Style of Border for Sqaure Minimap."],
  2112.                                             disabled = function() return not db.unitframes.enable end,
  2113.                                             type = "select",
  2114.                                             values = regions;
  2115.                                         },                                 
  2116.                                         offSetX = {
  2117.                                             type = "range",                        
  2118.                                             order = 2,
  2119.                                             name = L["X Offset"],
  2120.                                             desc = L["Controls the X offset. (Left - Right)"],
  2121.                                             min = -250, max = 250, step = 5,
  2122.                                             disabled = function() return not db.unitframes.enable end,
  2123.                                         },
  2124.                                         offSetY = {
  2125.                                             type = "range",                        
  2126.                                             order = 3,
  2127.                                             name = L["Y Offset"],
  2128.                                             desc = L["Controls the Y offset. (Up - Down)"],
  2129.                                             min = -250, max = 250, step = 5,
  2130.                                             disabled = function() return not db.unitframes.enable end,
  2131.                                         },
  2132.                                     },
  2133.                                 },                         
  2134.                             },
  2135.                         },
  2136.                         arena = {
  2137.                             type = "group",
  2138.                             order = 7,
  2139.                             name = L["Arena Frames"],
  2140.                             desc = L["Adjust the Arena Frames."],  
  2141.                             guiInline  = true,
  2142.                             get = function(info) return db.unitframes.arena[ info[#info] ] end,
  2143.                             set = function(info, value) db.unitframes.arena[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                    
  2144.                             args = {
  2145.                                 ---------------------------
  2146.                                 sep1 = {
  2147.                                     type = "description",
  2148.                                     order = 1,                                     
  2149.                                     name = " ",
  2150.                                 },
  2151.                                 sep2 = {
  2152.                                     type = "description",
  2153.                                     order = 2,                                     
  2154.                                     name = " ",
  2155.                                 },
  2156.                                 sep3 = {
  2157.                                     type = "description",
  2158.                                     order = 3,                                     
  2159.                                     name = " ",
  2160.                                 },
  2161.                                 sep4 = {
  2162.                                     type = "description",
  2163.                                     order = 4,                                     
  2164.                                     name = " ",
  2165.                                 }
  2166.                                 ---------------------------
  2167.                                 enable = {
  2168.                                     type = "toggle",                   
  2169.                                     order = 0,
  2170.                                     name = L["Enable"],
  2171.                                     desc = L["Enables Arena Frame Adjustments"],                           
  2172.                                 },
  2173.                                 tracker = {
  2174.                                     type = "toggle",                   
  2175.                                     order = 1,
  2176.                                     name = L["Trinket Tracker"],
  2177.                                     desc = L["This puts icons to the right of the arena frames. Does not track WotF - it now simply shares 30 seconds CD with trinkets, so it's impossible to track with just 1 icon. Only enables in arenas"],                        
  2178.                                 },                         
  2179.                                 scale = {
  2180.                                     type = "range",                        
  2181.                                     order = 2,
  2182.                                     name = L["Scale"],
  2183.                                     desc = L["Controls the scaling of Blizzard's Arena Frames"],
  2184.                                     min = 0.5, max = 2, step = 0.05,
  2185.                                     disabled = function() return not db.unitframes.enable end,
  2186.                                 },
  2187.                                 fontSize= {
  2188.                                     type = "range",                        
  2189.                                     order = 2,
  2190.                                     name = L["HP/Mana Font Size"],
  2191.                                     desc = L["Controls the Arena Healthbar/Manabar value font size."],
  2192.                                     min = 8, max = 25, step = 1,
  2193.                                     disabled = function() return not db.unitframes.enable or not db.unitframes.arena.enable end,
  2194.                                 }
  2195.                             },
  2196.                         },
  2197.                         boss = {
  2198.                             type = "group",
  2199.                             order = 8,
  2200.                             name = L["Boss Frame"],
  2201.                             desc = L["Adjust the Boss Frames."],   
  2202.                             guiInline  = true,
  2203.                             get = function(info) return db.unitframes.boss[ info[#info] ] end,
  2204.                             set = function(info, value) db.unitframes.boss[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                     
  2205.                             args = {
  2206.                                 ---------------------------
  2207.                                 sep1 = {
  2208.                                     type = "description",
  2209.                                     order = 1,                                     
  2210.                                     name = " ",
  2211.                                 },
  2212.                                 sep2 = {
  2213.                                     type = "description",
  2214.                                     order = 2,                                     
  2215.                                     name = " ",
  2216.                                 },
  2217.                                 sep3 = {
  2218.                                     type = "description",
  2219.                                     order = 3,                                     
  2220.                                     name = " ",
  2221.                                 },
  2222.                                 sep4 = {
  2223.                                     type = "description",
  2224.                                     order = 4,                                     
  2225.                                     name = " ",
  2226.                                 },
  2227.                                 sep5 = {
  2228.                                     type = "description",
  2229.                                     order = 5,                                     
  2230.                                     name = " ",
  2231.                                 },
  2232.                                 ---------------------------
  2233.                                 enable = {
  2234.                                     type = "toggle",                   
  2235.                                     order = 0,
  2236.                                     name = L["Enable"],
  2237.                                     desc = L["Enables Boss Frame Adjustments"],                        
  2238.                                 },                         
  2239.                                 scale = {
  2240.                                     type = "range",                        
  2241.                                     order = 1,
  2242.                                     name = L["Scale"],
  2243.                                     desc = L["Controls the scaling of Blizzard's Boss Frames"],
  2244.                                     min = 0.5, max = 2, step = 0.05,
  2245.                                     disabled = function() return not db.unitframes.enable end,
  2246.                                 },
  2247.                                 fontSize= {
  2248.                                     type = "range",                        
  2249.                                     order = 2,
  2250.                                     name = L["HP/Mana Font Size"],
  2251.                                     desc = L["Controls the Boss Healthbar/Manabar value font size."],
  2252.                                     min = 8, max = 25, step = 1,
  2253.                                     disabled = function() return not db.unitframes.enable or not db.unitframes.boss.enable end,
  2254.                                 }
  2255.                                 position = {
  2256.                                     type = "group",
  2257.                                     order = 5,
  2258.                                     childGroups = "tree",
  2259.                                     name = L["Position"],
  2260.                                     --desc = L["Combo Points Options"],
  2261.                                     disabled = function() return not db.unitframes.enable end,                     
  2262.                                     get = function(info) return db.unitframes.boss.position[ info[#info] ] end,
  2263.                                     set = function(info, value) db.unitframes.boss.position[ info[#info] ] = value; StaticPopup_Show("CFG_RELOAD") end,                    
  2264.                                     args = {
  2265.                                         ---------------------------
  2266.                                         --Option Type Seperators
  2267.                                         sep1 = {
  2268.                                             type = "description",
  2269.                                             order = 1,                             
  2270.                                             name = " ",
  2271.                                         },
  2272.                                         sep2 = {
  2273.                                             type = "description",
  2274.                                             order = 2,
  2275.                                             name = " ",                            
  2276.                                         },
  2277.                                         sep3 = {
  2278.                                             type = "description",
  2279.                                             order = 3,
  2280.                                             name = " ",
  2281.                                         },
  2282.                                         sep4 = {
  2283.                                             type = "description",
  2284.                                             order = 4,
  2285.                                             name = " ",
  2286.                                         }
  2287.                                         ---------------------------                        
  2288.                                         relAnchor = {
  2289.                                             type = "select",                           
  2290.                                             order = 1,
  2291.                                             name = L["Relative Anchor"],
  2292.                                             desc = L["Relative Anchor Position."],
  2293.                                             disabled = function() return not db.unitframes.enable end,
  2294.                                             values = regions;
  2295.                                         },                                 
  2296.                                         offSetX = {
  2297.                                             type = "range",                        
  2298.                                             order = 2,
  2299.                                             name = L["X Offset"],
  2300.                                             desc = L["Controls the X offset. (Left - Right)"],
  2301.                                             min = -250, max = 250, step = 5,
  2302.                                             disabled = function() return not db.unitframes.enable end,
  2303.                                         },
  2304.                                         offSetY = {
  2305.                                             type = "range",                        
  2306.                                             order = 3,
  2307.                                             name = L["Y Offset"],
  2308.                                             desc = L["Controls the Y offset. (Up - Down)"],
  2309.                                             min = -250, max = 250, step = 5,
  2310.                                             disabled = function() return not db.unitframes.enable end,
  2311.                                         },
  2312.                                     },
  2313.                                 },
  2314.                             },
  2315.                         },
  2316.                     },
  2317.                 },
  2318.             },
  2319.         }
  2320.     end
  2321.    
  2322.     return options
  2323. end
  2324.  
  2325.  
  2326. function BasicUI:SetUpOptions()
  2327.     db = BasicUI.db.profile;
  2328.  
  2329.     LibStub("AceConfig-3.0"):RegisterOptionsTable("BasicUI", GetOptions);
  2330.     LibStub("AceConfig-3.0"):RegisterOptionsTable("BasicUI-Profiles", LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db));
  2331.    
  2332.     self.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("BasicUI", "|cff00B4FFBasic|rUI");
  2333.     self.profilesFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("BasicUI-Profiles", "Profiles", "|cff00B4FFBasic|rUI");
  2334.    
  2335. end

Hope these aren't to long.

Thanks
Coke

Last edited by cokedrivers : 03-24-14 at 03:16 PM.
  Reply With Quote
03-24-14, 07:56 PM   #7
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Can you just zip up the whole thing and attach it to your post? Trying to wade through thousands of lines of code inline in a forum post is not really ideal.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
03-24-14, 09:14 PM   #8
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Phanx View Post
Can you just zip up the whole thing and attach it to your post? Trying to wade through thousands of lines of code inline in a forum post is not really ideal.

There you be.

Thanks for taking a look at it.

Coke
Attached Files
File Type: zip BasicUI.zip (497.2 KB, 101 views)
  Reply With Quote
04-03-14, 02:26 AM   #9
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Finally got a bit of time to look into this. I've only looked at a few of the files, but here's some feedback:

Originally Posted by cokedrivers View Post
How do I enable/disable a module?
module:SetEnabled(true|false)

Originally Posted by cokedrivers View Post
Am I using the Modules from Ace correctly?
Basically yes, but not if you intend for it to be possible to disable a module without reloading the UI. For example, in your Chat module, you overwrite a ton of globals, and set up several secure function hooks. If you try to disable the module as-is, nothing will happen -- all the globals will still be overwritten by the module's custom versions, and all the hooks will still be running. If this is how you want it to work, you're fine, but if you want users to be able to disable modules without reloading the UI, you need to do several things:

(1) Keep a copy of each global's original value before you overwrite it, eg. in a table:

Code:
local globals = {}

-- Save the old value if it wasn't already saved:
if not globals.CHAT_FRAME_TAB_SELECTED_MOUSEOVER_ALPHA then
	globals.CHAT_FRAME_TAB_SELECTED_MOUSEOVER_ALPHA = CHAT_FRAME_TAB_SELECTED_MOUSEOVER_ALPHA
end
-- before you set the new value:
CHAT_FRAME_TAB_SELECTED_MOUSEOVER_ALPHA = 1
To make this easier since you're doing this to a lot of globals, you could use a helper function:

Code:
-- Put this near the top of your file, outside of any functions:
local globals = {}
local function setglobal(k, v)
	globals[k] = globals[k] or _G[k] -- here is an actual valid use of _G
	_G[k] = v
end

-- Then do this in your OnEnable function:
setglobal("CHAT_FRAME_TAB_SELECTED_MOUSEOVER_ALPHA", 1)
setglobal("CHAT_FRAME_TAB_SELECTED_NOMOUSE_ALPHA", 0)
Then in your module's OnDisable function (which you'd need to add, as you don't have one currently) go through the table and restore all the globals to their original values:

Code:
for k, v in pairs(globals) do
	_G[k] = v
end
The note about a valid use of _G in the comment of the code above refers to you doing things like this:

Code:
_G.CHAT_FRAME_TAB_SELECTED_MOUSEOVER_ALPHA = 1
This is totally pointless, and just makes your code cluttered. These globals are being set once when your addon is enabled, so there's no need to micro-optimize here. Just access them directly:

Code:
CHAT_FRAME_TAB_SELECTED_MOUSEOVER_ALPHA = 1
Non-secure function/method hooks are also easy to back up and restore:

Code:
-- At the top of the file:
local methods = {}

-- In your ModChat function, store the original "AddMessage" method for each frame:
methods[chat] = methods[chat] or {}
methods[chat].AddMessage = chat.AddMessage
-- ... before you overwrite it:
chat.AddMessage = FCF_AddMessage
Then in your OnDisable function, go through and restore everything:

Code:
for frame, t in pairs(methods) do
	for method, func in pairs(t) do
		frame[method] = func
	end
end
Secure hooks are slightly more complicated, as there's no way to actually remove them. Create a variable to store your module's enable state, and define the hook function, outside of your other functions:

Code:
local DISABLED = true

function MyModule.ChatFrameMenu_UpdateAnchorPoint()
	if DISABLED then return end
	if FCF_GetButtonSide(DEFAULT_CHAT_FRAME) == 'right' then
		ChatMenu:ClearAllPoints()
		ChatMenu:SetPoint('BOTTOMRIGHT', ChatFrame1Tab, 'TOPLEFT')
	else
		ChatMenu:ClearAllPoints()
		ChatMenu:SetPoint('BOTTOMLEFT', ChatFrame1Tab, 'TOPRIGHT')
	end
end
In your OnEnable and OnDisable functions, set the value of the DISABLED variable to false or true, respectively.

Just set up the hook once in your OnEnable function, and remove the reference to the function as a member of your module as a means of keeping track of whether it's been set already:

Code:
	if self.ChatFrameMenu_UpdateAnchorPoint then
		hooksecurefunc("ChatFrameMenu_UpdateAnchorPoint", self.ChatFrameMenu_UpdateAnchorPoint)
		self.ChatFrameMenu_UpdateAnchorPoint = nil
	end
Since functions are passed by reference, this doesn't actually delete the function, it just removes the ability to access it via self.ChatFrameMenu_UpdateAnchorPoint.

However, you should look into whether it's actually necessary to use a secure hook here; for example, it's not necessary -- and also much easier -- to use an insecure hook for FCF_OpenTemporaryWindow:

Code:
	local FCF_OTW = FCF_OpenTemporaryWindow
	function FCF_OpenTemporaryWindow = function(...)
		-- Call the original function with whatever arguments were passed in,
		-- and capture the returned frame reference:
		local window = FCF_OTW(...)
		-- Pass the frame to your function:
		SetChatStyle(window)
		-- And finally return the frame:
		return window
	end
Then you can remove all that looping business from your SetChatStyle function, and just check if the provided chat frame was already modified:

Code:
local function SetChatStyle(chat)
	if not chat or chat.hasModification then return end
	
	-- do the rest of the stuff here
end
Finally, rather than defining all of these local functions inside your OnEnable function, you'll need to move them outside of it, or make them methods of your module, eg:

Code:
function BasicUI_Chat:SetChatStyle(chat)
	-- do stuff
end
Then call those methods instead of the local functions. The advantage of using methods is that you can organize your code however you want, without worrying about whether the function is defined above the line where you call it.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-03-14, 02:36 AM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by cokedrivers View Post
When creating the options how to I set up the get/set functions without haveing to create a popup that reloads the ui?
1. Don't show a popup every time any option is changed. Nobody is ever going to change one option, reload the UI, change one option, reload the UI, etc. People want to be able to change everything they want to change at once, without a popup annoying them over and over. Get rid of the popup.

2. You have a variety of options for applying changes without a reload. The most straightforward method is to simply add code to each option's set function that applies the change. For example, if you have a fontstring called "MyFontString" and an option that changes the size of the fontstring, your set function might include something like this (in addition to the existing code that saves the new value to the database) assuming that "value" refers to the value passed into your set function:

Code:
local fontFile, _, fontFlag = MyFontString:GetFont()
MyFontString:SetFont(fontFile, value, fontFlag)
Alternatively, you can add a function to each module that applies all of the module's settings, eg. MyModule:ApplySettings() and call it from both your module's OnEnable function (where it will get called immediately after login to apply the user's settings) and from your option set function(s) for that module (where it will get called each time the user changes a setting).

You could expand on that idea and create several functions -- eg. MyModule:ApplyFontSettings(), MyModule:UpdateFramePositions(), etc. -- to minimize the amount of updating being done each time an option is changed.

Or, you can use a hybrid approach, in which some options call module methods, and others have their own set functions with in-line "apply the change" code.

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

Aside from all that, I modified your options table and setup functions a bit. Adding that many options in a single panel is not really ideal. I modified them to use sub-panels instead. I also removed the popup, though I didn't add any code to apply the options on the fly.

I also noticed that many of your option descriptions just repeat the title. If the title is self-explanatory (eg. "Show hotkey text") just remove the description. If it's not, then the description should include more text to actually describe what the option does. For top-level group descriptions, it should describe the module, and remind the user to reload the UI after making changes (at least until you convert all your modules to support on-the-fly changes).

See attachment.
Attached Files
File Type: lua Options.lua (71.9 KB, 116 views)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-06-14, 09:25 AM   #11
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Phanx,

First off let me tell you thank you for everything you have helped me with. I am by no means a code writer and yet you still take the time to help out.

Second I enjoy working with the code and trying to get things to work, My learning style is more trial and error vs reading a programming guide and figuring it out. As stated earlier I learn by doing, As most can kinda figure out by my name I work at Coca-Cola and am a forkilift driver (also drove a semi for 4 years)... and that is how I came up with Cokedrivers.

I'm going to try to go threw a adjust the modules to your specs and work on what I can, this time of year starts to get busy at work beings people drink pop when its sunny and warm and we have the 3 maojor holidays coming up soon, Memorial Day, independence Day and Labor Day.

This post has a few reasons for the text in it, to thank you for everything you have helped me with also to give you a little background into what I do and how I try my damdest to understand what most of you programmers are talking about.


Thanks again

Coke.
  Reply With Quote
04-06-14, 06:27 PM   #12
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by cokedrivers View Post
... people drink pop ...
You must live in the south.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-06-14, 06:42 PM   #13
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
No, "pop" is Midwest.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-06-14, 06:48 PM   #14
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I'm on the west coast... the Midwest and the South all just kind of blur together in a haze of "mostly-flat places with climates unsuitable for human habitation" in my mind. Actually, I guess if you remove the "mostly-flat" qualifier then the whole East Coast can join that party, too. >_>
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-06-14, 07:01 PM   #15
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Phanx View Post
You must live in the south.
Actually I live in Washington State about 30 miles south of Seattle.

And to me pop sounds better then soda, people that say "would you like a soda?" sound snobby or are from England.
  Reply With Quote
04-06-14, 08:43 PM   #16
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Phanx View Post
1. Don't show a popup every time any option is changed. Nobody is ever going to change one option, reload the UI, change one option, reload the UI, etc. People want to be able to change everything they want to change at once, without a popup annoying them over and over. Get rid of the popup.

2. You have a variety of options for applying changes without a reload. The most straightforward method is to simply add code to each option's set function that applies the change. For example, if you have a fontstring called "MyFontString" and an option that changes the size of the fontstring, your set function might include something like this (in addition to the existing code that saves the new value to the database) assuming that "value" refers to the value passed into your set function:

Code:
local fontFile, _, fontFlag = MyFontString:GetFont()
MyFontString:SetFont(fontFile, value, fontFlag)
Alternatively, you can add a function to each module that applies all of the module's settings, eg. MyModule:ApplySettings() and call it from both your module's OnEnable function (where it will get called immediately after login to apply the user's settings) and from your option set function(s) for that module (where it will get called each time the user changes a setting).

You could expand on that idea and create several functions -- eg. MyModule:ApplyFontSettings(), MyModule:UpdateFramePositions(), etc. -- to minimize the amount of updating being done each time an option is changed.

Or, you can use a hybrid approach, in which some options call module methods, and others have their own set functions with in-line "apply the change" code.

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

Aside from all that, I modified your options table and setup functions a bit. Adding that many options in a single panel is not really ideal. I modified them to use sub-panels instead. I also removed the popup, though I didn't add any code to apply the options on the fly.

I also noticed that many of your option descriptions just repeat the title. If the title is self-explanatory (eg. "Show hotkey text") just remove the description. If it's not, then the description should include more text to actually describe what the option does. For top-level group descriptions, it should describe the module, and remind the user to reload the UI after making changes (at least until you convert all your modules to support on-the-fly changes).

See attachment.
Thank You for the information.

A quick fix so I can play for a while and yet make it so that when someone changes a option they don't see a popup I added a executable button to reload the ui after they have made all there changes.

Also I changed up how the options where viewed in the interface area, I made it so they where all tabs so when one opens the option they can click on the tab for the options they want to change this way I only need to make one "APPLY CHANGES" button.

Again Thanks for the info I will work with the information you have ginven me at a later time.

Coke

Here is a screen shot of what the new options looks like:
  Reply With Quote
04-07-14, 12:34 AM   #17
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by cokedrivers View Post
Actually I live in Washington State about 30 miles south of Seattle.
Oh hey, that's where I'm from! I don't live there anymore, but I grew up out on the peninsula and spent a few years in Redmond. It was "pop" when I was really young, but everyone seemed to switch to "soda" at some point... and down here in California it's all "soda".

Originally Posted by cokedrivers View Post
A quick fix so I can play for a while and yet make it so that when someone changes a option they don't see a popup I added a executable button to reload the ui after they have made all there changes.
That's a good interim solution.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.

Last edited by Phanx : 04-07-14 at 12:38 AM.
  Reply With Quote
04-07-14, 10:37 AM   #18
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Originally Posted by cokedrivers View Post
Here is a screen shot of what the new options looks like:
I would personally make those sub-menus in the tree on the left instead of tabs.

/edit: that's a lot of tabs... :P
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-07-14, 11:46 AM   #19
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Seerah View Post
I would personally make those sub-menus in the tree on the left instead of tabs.

/edit: that's a lot of tabs... :P
But for the "Quick Fix" I need to be able to have the "APPLY CHANGES" button available at all times, if I put them on the left then they will have to go back to the main screen to apply the changes. This way they are all together and there is one button to click once someone is done changing there options.

But thanks for the tips.

Coke
  Reply With Quote
04-07-14, 12:20 PM   #20
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Seerah View Post
I would personally make those sub-menus in the tree on the left instead of tabs.

/edit: that's a lot of tabs... :P
Yeah, the modified options file I posted further up the thread moves them all into sub-panels in the left-most list, instead of adding a third column to the window. I think having a note at the top of each panel, or even just a note on the main panel, is sufficient, as long as you also have a note on the download page. That way people who miss the in-game note will see it when they come to complain that the changes that have never applied instantly are still not applying instantly... hopefully before they actually post their complaint. :P
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Help with Ace coding.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off