d76a52e - Change width/height to global setting
authorAleksi Blinnikka <aleksi.blinnikka@gmail.com>
Sun, 28 Jan 2018 13:51:46 +0000
committerAleksi Blinnikka <aleksi.blinnikka@gmail.com>
Sun, 28 Jan 2018 13:51:46 +0000
OmaRF/Events.lua
OmaRF/RaidFrame.lua
OmaRF/Settings.lua
OmaUF/Events.lua
OmaUF/Settings.lua
OmaUF/UnitFrames.lua

index d4f3e77..4d2a1a1 100644 (file)
@@ -29,7 +29,7 @@ local overlayColorDispel = Settings.OverlayColorDispel;
 local overlayColorCharm = Settings.OverlayColorCharm;
 local overlayColorAlert = Settings.OverlayColorAlert;
 local powerColors = Settings.PowerColors;
-local width = 10;
+local width = Settings.Width;
 
 local M = {};
 OmaRFEvents = M;
@@ -376,7 +376,3 @@ eventFuncs["PLAYER_FOCUS_CHANGED"] = eventFuncs["UPDATE_ALL_BARS"];
 function M.UnitEvent(self, event)
     eventFuncs[event](self);
 end
-
-function M.LoadChar()
-    width = Settings.Character.Width;
-end
index 4259c67..783cdeb 100644 (file)
@@ -22,9 +22,9 @@ local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
 local healpredColor = Settings.HealpredColor;
 local healabsorbColor = Settings.HealabsorbColor;
+local width, height = Settings.Width, Settings.Height;
 -- placeholders with visible values when error happens
 local positions = {};
-local width, height = 10, 10;
 local anchorX, anchorY = 10, 10;
 local attributes = {};
 
@@ -109,7 +109,7 @@ local function frameHide(frame)
 end
 
 local function showTooltip(frame)
-    GameTooltip_SetDefaultAnchor(GameTooltip, PlayerFrame);
+    GameTooltip_SetDefaultAnchor(GameTooltip, frame);
     GameTooltip:SetUnit(frame:GetAttribute("unit"));
 end
 
@@ -323,7 +323,6 @@ local function initializeFocus(parent)
 end
 
 local function loadCharSettings()
-    width, height = Settings.Character.Width, Settings.Character.Height;
     anchorX, anchorY = Settings.Character.AnchorX, Settings.Character.AnchorY;
     attributes = Settings.Character.Clickheal;
     positions = Settings.Character.Positions;
@@ -390,7 +389,6 @@ CFrame:RegisterEvent("PLAYER_REGEN_ENABLED");
 CFrame:SetScript("OnEvent", function(self, event, addon)
     if event == "PLAYER_LOGIN" then
         OmaRFLoadChar();
-        OmaRFEvents.LoadChar();
         OmaRFIndicators.LoadChar();
         hideBlizzardRaid();
         initialize();
index 80a3e41..2015a1a 100644 (file)
@@ -10,8 +10,6 @@ local rawget = rawget;
 -- character specific settings
 local charDefaults = {
     Positions = {"TOPRIGHT", "BOTTOMLEFT"},
-    Width = 80,
-    Height = 40,
     AnchorX = 0,
     AnchorY = -330,
     WatchedAuras = {
@@ -23,8 +21,6 @@ local chars = {
     ["Stormreaver"] = {
         ["Vildan"] = {
             Positions = {"TOPRIGHT", "BOTTOMLEFT"},
-            Width = 80,
-            Height = 40,
             AnchorX = 0,
             AnchorY = -330,
             WatchedAuras = {
@@ -54,8 +50,6 @@ local chars = {
         },
         ["Gedren"] = {
             Positions = {"TOPLEFT", "TOPRIGHT", "BOTTOMLEFT"},
-            Width = 80,
-            Height = 40,
             AnchorX = 0,
             AnchorY = -330,
             WatchedAuras = {
@@ -82,6 +76,8 @@ local chars = {
 
 -- account-wide settings
 local settings = {
+    Width = 80,
+    Height = 40,
     IndSize = 14,
     BaseColor = {0, 0, 0},
     BgColor = {0.7, 0.7, 0.7},
index d68affe..f745434 100644 (file)
@@ -27,7 +27,7 @@ local overlayColorDispel = Settings.OverlayColorDispel;
 local overlayColorCharm = Settings.OverlayColorCharm;
 local overlayColorAlert = Settings.OverlayColorAlert;
 local powerColors = Settings.PowerColors;
-local width = 10;
+local width = Settings.Width;
 
 local M = {};
 OmaUFEvents = M;
@@ -473,7 +473,3 @@ eventFuncs["PLAYER_TARGET_CHANGED"] = eventFuncs["UPDATE_ALL_BARS"];
 function M.UnitEvent(self, event, arg1)
     eventFuncs[event](self, arg1);
 end
-
-function M.LoadChar()
-    width = Settings.Character.Width;
-end
index a73a9e7..002cf5e 100644 (file)
@@ -9,8 +9,6 @@ local rawget = rawget;
 -- configurable settings
 -- character specific settings
 local charDefaults = {
-    Width = 80,
-    Height = 40,
     AnchorX = 0,
     AnchorY = -330,
     Clickheal = {
@@ -19,8 +17,6 @@ local charDefaults = {
 local chars = {
     ["Stormreaver"] = {
         ["Vildan"] = {
-            Width = 160,
-            Height = 50,
             AnchorX = 0,
             AnchorY = -330,
             Clickheal = {
@@ -43,8 +39,6 @@ local chars = {
             },
         },
         ["Gedren"] = {
-            Width = 160,
-            Height = 50,
             AnchorX = 0,
             AnchorY = -330,
             Clickheal = {
@@ -67,6 +61,8 @@ local chars = {
 
 -- account-wide settings
 local settings = {
+    Width = 160,
+    Height = 50,
     BaseColor = {0, 0, 0, 0.5},
     BgColor = {0.1, 0.1, 0.1, 0.4},
     HealthColor = {0.5, 0.5, 0.5},
@@ -84,26 +80,6 @@ local settings = {
         [PowerTypeEnergy] = {1, 0.8, 0},
         [PowerTypeRunic] = {0.8, 0, 0.2},
     },
-    MajorAuras = {
-        -- Antorus
-        ["Psychic Assault"] = true,
-        ["Everburning Flames"] = true,
-        ["Corrupt"] = true,
-        ["Sleep Canister"] = true,
-        ["Misery"] = true,
-        ["Necrotic Embrace"] = true,
-        ["Fulminating Pulse"] = true,
-        ["Chilled Blood"] = true,
-        ["Soulblight"] = true,
-        ["Soulburst"] = true,
-        ["Soulbomb"] = true,
-        -- Proving Grounds for testing
-        ["Aqua Bomb"] = true,
-        -- Mythic+
-        [209858] = true, -- Necrotic Rot
-        [240559] = true, -- Grievous Wound
-        [240443] = true, -- Burst
-    },
 };
 OmaUFSettings = settings;
 -- watch to not remove mana entry
index c0fe00c..815fa17 100644 (file)
@@ -21,8 +21,8 @@ local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
 local healpredColor = Settings.HealpredColor;
 local healabsorbColor = Settings.HealabsorbColor;
+local width, height = Settings.Width, Settings.Height;
 -- placeholders with visible values when error happens
-local width, height = 10, 10;
 local anchorX, anchorY = 10, 10;
 local attributes = {};
 
@@ -69,7 +69,7 @@ local function frameHide(frame)
 end
 
 local function showTooltip(frame)
-    GameTooltip_SetDefaultAnchor(GameTooltip, PlayerFrame);
+    GameTooltip_SetDefaultAnchor(GameTooltip, frame);
     GameTooltip:SetUnit(frame:GetAttribute("unit"));
 end
 
@@ -234,7 +234,6 @@ local function initializeTarget(parent)
 end
 
 local function loadCharSettings()
-    width, height = Settings.Character.Width, Settings.Character.Height;
     anchorX, anchorY = Settings.Character.AnchorX, Settings.Character.AnchorY;
     attributes = Settings.Character.Clickheal;
 end
@@ -286,7 +285,6 @@ UnitFrames:RegisterEvent("PLAYER_LOGIN");
 UnitFrames:SetScript("OnEvent", function(self, event)
     if event == "PLAYER_LOGIN" then
         OmaUFLoadChar();
-        OmaUFEvents.LoadChar();
         hideBlizzardFrames();
         initialize();
     end