2ddc77e - Remove AceTimer
[wowui.git] / Core.lua
index ad8d6b3..5ddbb44 100644 (file)
--- a/Core.lua
+++ b/Core.lua
@@ -1,4 +1,4 @@
-RaidFrameCustomization = LibStub("AceAddon-3.0"):NewAddon("RaidFrameCustomization", "AceTimer-3.0");
+RaidFrameCustomization = LibStub("AceAddon-3.0"):NewAddon("RaidFrameCustomization");
 
 RaidFrameCustomization.normalBarColor = CreateColor(0.3, 0.3, 0.3);
 RaidFrameCustomization.dispelBarColor = CreateColor(1, 0.5, 0);
@@ -10,6 +10,8 @@ RaidFrameCustomization.positions = {
     "TOPLEFT", "TOPRIGHT", "CENTER", "BOTTOMLEFT", "BOTTOMRIGHT"
 };
 
+RaidFrameCustomization.running = false;
+
 local defaults = {
     profile = {
         indicatorFont = "Arial Narrow",
@@ -18,13 +20,14 @@ local defaults = {
         indicators = {
             ['**'] = {
                 textSize = 10,
-                color = {1, 1, 1, 1},
+                textColor = {1, 1, 1, 1},
                 mine = false,
                 stack = true,
                 showText = true,
                 showIcon = true,
                 useDefaultIcon = true,
                 iconSize = 10,
+                iconColor = {1, 1, 1, 1},
             },
         },
     }
@@ -32,10 +35,10 @@ local defaults = {
 
 function RaidFrameCustomization:OnInitialize()
     self.db = LibStub("AceDB-3.0"):New("RaidFrameCustomizationDB", defaults);
-    self:SetupOptions();
     self.db.RegisterCallback(self, "OnProfileChanged", "RefreshConfig");
     self.db.RegisterCallback(self, "OnProfileCopied", "RefreshConfig");
     self.db.RegisterCallback(self, "OnProfileReset", "RefreshConfig");
+    self:SetupOptions();
 end
 
 function RaidFrameCustomization:OnEnable()
@@ -43,7 +46,7 @@ function RaidFrameCustomization:OnEnable()
 end
 
 function RaidFrameCustomization:OnDisable()
-    self:CancelAllTimers();
+    self.running = false;
     for _, frame in pairs(self.frames) do
         for _, ind in pairs(frame) do
             ind.text:SetText("");