976f219 - Add major aura indicator
[wowui.git] / OmaRF / Core.lua
index e4c2d29..74f5aed 100644 (file)
@@ -6,6 +6,7 @@ OmaRF.normalBackColor = {0.7, 0.7, 0.7};
 OmaRF.dispelBackColor = {0.5, 0.2, 0};
 
 OmaRF.frames = {};
 OmaRF.dispelBackColor = {0.5, 0.2, 0};
 
 OmaRF.frames = {};
+OmaRF.majorFrames = {};
 OmaRF.positions = {
     "TOPLEFT", "TOPRIGHT", "CENTER", "BOTTOMLEFT", "BOTTOMRIGHT"
 };
 OmaRF.positions = {
     "TOPLEFT", "TOPRIGHT", "CENTER", "BOTTOMLEFT", "BOTTOMRIGHT"
 };
@@ -14,11 +15,16 @@ OmaRF.running = false;
 
 local defaults = {
     profile = {
 
 local defaults = {
     profile = {
-        indicatorFont = "Arial Narrow",
-        showIcons = true,
         enabled = true,
         enabled = true,
+        majorAuras = {
+            auras = {"Aqua Bomb"},
+            max = 3;
+            iconSize = 24,
+            textSize = 10,
+        },
         indicators = {
             ['**'] = {
         indicators = {
             ['**'] = {
+                auras = {},
                 textSize = 10,
                 textColor = {1, 1, 1, 1},
                 mine = false,
                 textSize = 10,
                 textColor = {1, 1, 1, 1},
                 mine = false,
@@ -46,19 +52,24 @@ end
 
 function OmaRF:OnDisable()
     self.running = false;
 
 function OmaRF:OnDisable()
     self.running = false;
-    for _, frame in pairs(self.frames) do
+    for name, frame in pairs(self.frames) do
         for _, ind in pairs(frame) do
         for _, ind in pairs(frame) do
-            ind.text:SetText("");
-            ind.icon:SetTexture("");
+            ind.text:Hide();
+            ind.icon:Hide();
+        end
+        for _, ind in ipairs(self.majorFrames[name]) do
+            ind.icon:Hide();
+            ind.expire:Hide();
+            ind.stack:Hide();
         end
     end
 end
 
 SLASH_OMARF1 = "/omarf";
 function SlashCmdList.OMARF(msg, editBox)
         end
     end
 end
 
 SLASH_OMARF1 = "/omarf";
 function SlashCmdList.OMARF(msg, editBox)
-    local loaded, finished = IsAddonLoaded("OmaRFConfig");
+    local loaded, finished = IsAddOnLoaded("OmaRFConfig");
     if not loaded then
     if not loaded then
-        local loaded, reason = LoadAddon("OmaRFConfig");
+        local loaded, reason = LoadAddOn("OmaRFConfig");
         if not loaded then
             if reason == "DISABLED" then
                 print("OmaRFConfig is disabled");
         if not loaded then
             if reason == "DISABLED" then
                 print("OmaRFConfig is disabled");
@@ -78,5 +89,6 @@ function SlashCmdList.OMARF(msg, editBox)
         return;
     end
 
         return;
     end
 
+    InterfaceOptionsFrame_OpenToCategory(OmaRF.optionsFrames.Profile);
     InterfaceOptionsFrame_OpenToCategory(OmaRF.optionsFrames.Indicators);
 end
     InterfaceOptionsFrame_OpenToCategory(OmaRF.optionsFrames.Indicators);
 end