6f9efe3 - Remove font option
[wowui.git] / OmaRF / Indicators.lua
index ebece6c..929b960 100644 (file)
@@ -1,4 +1,3 @@
-local media = LibStub:GetLibrary("LibSharedMedia-3.0");
 local f = OmaRF.frames;
 local positions = OmaRF.positions;
 local pad = 2;
 local f = OmaRF.frames;
 local positions = OmaRF.positions;
 local pad = 2;
@@ -22,6 +21,8 @@ local UnitIsPlayer = UnitIsPlayer;
 local UnitIsConnected = UnitIsConnected;
 local UnitIsDeadOrGhost = UnitIsDeadOrGhost;
 local CompactRaidFrameContainer_ApplyToFrames = CompactRaidFrameContainer_ApplyToFrames;
 local UnitIsConnected = UnitIsConnected;
 local UnitIsDeadOrGhost = UnitIsDeadOrGhost;
 local CompactRaidFrameContainer_ApplyToFrames = CompactRaidFrameContainer_ApplyToFrames;
+local format = string.format;
+local unpack = unpack;
 
 -- list of important auras TODO try to use spellIDs
 local centerAuras = {
 
 -- list of important auras TODO try to use spellIDs
 local centerAuras = {
@@ -33,9 +34,8 @@ local function configureIndicators(frame, name)
     if not f[frameName] then return end
 
     local config = OmaRF.db.profile.indicators;
     if not f[frameName] then return end
 
     local config = OmaRF.db.profile.indicators;
-    local font = media and media:Fetch('font', config.indicatorFont) or STANDARD_TEXT_FONT;
     for pos, ind in pairs(f[frameName]) do
     for pos, ind in pairs(f[frameName]) do
-        ind.text:SetFont(font, config[pos]["textSize"]);
+        ind.text:SetFont(STANDARD_TEXT_FONT, config[pos]["textSize"]);
         ind.text:SetTextColor(unpack(config[pos]["textColor"]));
         ind.icon:SetWidth(config[pos]["iconSize"]);
         ind.icon:SetHeight(config[pos]["iconSize"]);
         ind.text:SetTextColor(unpack(config[pos]["textColor"]));
         ind.icon:SetWidth(config[pos]["iconSize"]);
         ind.icon:SetHeight(config[pos]["iconSize"]);
@@ -105,9 +105,9 @@ local function updateIndicators(frame)
                         local text;
                         local remaining = expires - current;
                         if remaining > 60 then
                         local text;
                         local remaining = expires - current;
                         if remaining > 60 then
-                            text = string.format("%dm", ceil(remaining/60));
+                            text = format("%dm", ceil(remaining/60));
                         else
                         else
-                            text = string.format("%d", floor(remaining+0.5));
+                            text = format("%d", floor(remaining+0.5));
                         end
                         if count > 1 and config.stack then
                             if text then
                         end
                         if count > 1 and config.stack then
                             if text then