Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
greven committed Jul 26, 2018
1 parent 7563004 commit 63f8280
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 29 deletions.
4 changes: 2 additions & 2 deletions oUF_lumen.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 80000
## Author: greven
## Version: @project-version@
## Title: oUF_|cFF0d87d5l|r|cFF3f6abdu|r|cFF85419cm|r|cFFc81a7de|r|cFFf20269n|r
## Title: oUF_|cFF0d87d5L|r|cFF3f6abdu|r|cFF85419cm|r|cFFc81a7de|r|cFFf20269n|r
## Notes: oUF layout by greven (Kreoss @ Quel'Thalas EU)
## SavedVariables: oUF_LumenDB
## X-SavedVariables: oUF_LumenDB
Expand All @@ -16,6 +16,6 @@ media\media.lua
config\_config.xml
core\_core.xml
elements\_elements.xml
oUF_lumen.lua
oUF_Lumen.lua
units\_units.xml

8 changes: 4 additions & 4 deletions units/arena.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local _, ns = ...
local A, ns = ...

local lum, core, cfg, m, oUF = ns.lum, ns.core, ns.cfg, ns.m, ns.oUF

Expand Down Expand Up @@ -61,11 +61,11 @@ end
-- > SPAWN UNIT
-- -----------------------------------
-- if cfg.units[frame].show then
-- oUF:RegisterStyle("oUF_Lumen:"..frame:gsub("^%l", string.upper), createStyle)
-- oUF:SetActiveStyle("oUF_Lumen:"..frame:gsub("^%l", string.upper))
-- oUF:RegisterStyle(A..frame:gsub("^%l", string.upper), createStyle)
-- oUF:SetActiveStyle(A..frame:gsub("^%l", string.upper))
--
-- for index = 1, MAX_BOSS_FRAMES or 5 do
-- local arena = oUF:Spawn("arena" .. index, 'oUF_LumenArena' .. index)
-- local arena = oUF:Spawn(A..frame .. index, 'oUF_LumenArena' .. index)
--
-- if(index == 1) then
-- arena:SetPoint(cfg.units.arena.pos.a1, cfg.units.arena.pos.af, cfg.units.arena.pos.a2, cfg.units.arena.pos.x, cfg.units.arena.pos.y)
Expand Down
8 changes: 4 additions & 4 deletions units/focus.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local _, ns = ...
local A, ns = ...

local lum, core, cfg, m, oUF = ns.lum, ns.core, ns.cfg, ns.m, ns.oUF

Expand Down Expand Up @@ -59,7 +59,7 @@ end
-- > SPAWN UNIT
-- -----------------------------------
if cfg.units[frame].show then
oUF:RegisterStyle("oUF_Lumen:"..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle("oUF_Lumen:"..frame:gsub("^%l", string.upper))
oUF:Spawn(frame, "oUF_Lumen"..frame:gsub("^%l", string.upper))
oUF:RegisterStyle(A..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle(A..frame:gsub("^%l", string.upper))
oUF:Spawn(frame, A..frame:gsub("^%l", string.upper))
end
6 changes: 3 additions & 3 deletions units/party.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local _, ns = ...
local A, ns = ...

local lum, core, cfg, m, oUF = ns.lum, ns.core, ns.cfg, ns.m, ns.oUF
local auras, filters = ns.auras, ns.filters
Expand Down Expand Up @@ -189,8 +189,8 @@ end
-- > SPAWN UNIT
-- -----------------------------------
if cfg.units[frame].show then
oUF:RegisterStyle('oUF_Lumen:'..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle('oUF_Lumen:'..frame:gsub("^%l", string.upper))
oUF:RegisterStyle(A..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle(A..frame:gsub("^%l", string.upper))

local party = oUF:SpawnHeader(
-- 'oUF_LumenParty', nil, 'solo', 'showSolo', true, -- debug
Expand Down
8 changes: 4 additions & 4 deletions units/pet.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local _, ns = ...
local A, ns = ...

local lum, core, auras, oUF = ns.lum, ns.core, ns.auras, ns.oUF
local cfg, m, filters = ns.cfg, ns.m, ns.filters
Expand Down Expand Up @@ -87,7 +87,7 @@ end
-- > SPAWN UNIT
-- -----------------------------------
if cfg.units[frame].show then
oUF:RegisterStyle("oUF_Lumen:"..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle("oUF_Lumen:"..frame:gsub("^%l", string.upper))
oUF:Spawn(frame, "oUF_Lumen"..frame:gsub("^%l", string.upper))
oUF:RegisterStyle(A..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle(A..frame:gsub("^%l", string.upper))
oUF:Spawn(frame, A..frame:gsub("^%l", string.upper))
end
12 changes: 8 additions & 4 deletions units/player.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local _, ns = ...
local A, ns = ...

local lum, core, cfg, m, oUF = ns.lum, ns.core, ns.cfg, ns.m, ns.oUF
local auras, filters, debuffs = ns.auras, ns.filters, ns.debuffs
Expand Down Expand Up @@ -596,13 +596,17 @@ local createStyle = function(self)
barTimers.PostUpdateIcon = PostUpdateBarTimer
self.Buffs = barTimers
end

-- Frame Visibility
RegisterStateDriver(self, "visibility", cfg.units[frame].visibility)
end

-- -----------------------------------
-- > SPAWN UNIT
-- -----------------------------------
if cfg.units[frame].show then
oUF:RegisterStyle("oUF_Lumen:"..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle("oUF_Lumen:"..frame:gsub("^%l", string.upper))
oUF:Spawn(frame, "oUF_Lumen"..frame:gsub("^%l", string.upper))
print(A..frame)
oUF:RegisterStyle(A..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle(A..frame:gsub("^%l", string.upper))
oUF:Spawn(frame, A..frame:gsub("^%l", string.upper))
end
8 changes: 4 additions & 4 deletions units/target.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local _, ns = ...
local A, ns = ...

local lum, core, cfg, m, oUF = ns.lum, ns.core, ns.cfg, ns.m, ns.oUF
local auras, filters = ns.auras, ns.filters
Expand Down Expand Up @@ -147,7 +147,7 @@ end
-- > SPAWN UNIT
-- -----------------------------------
if cfg.units[frame].show then
oUF:RegisterStyle("oUF_Lumen:"..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle("oUF_Lumen:"..frame:gsub("^%l", string.upper))
oUF:Spawn(frame, "oUF_Lumen"..frame:gsub("^%l", string.upper))
oUF:RegisterStyle(A..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle(A..frame:gsub("^%l", string.upper))
oUF:Spawn(frame, A..frame:gsub("^%l", string.upper))
end
8 changes: 4 additions & 4 deletions units/targettarget.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local _, ns = ...
local A, ns = ...

local lum, core, cfg, m, oUF = ns.lum, ns.core, ns.cfg, ns.m, ns.oUF

Expand Down Expand Up @@ -54,7 +54,7 @@ end
-- > SPAWN UNIT
-- -----------------------------------
if cfg.units[frame].show then
oUF:RegisterStyle("oUF_Lumen:"..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle("oUF_Lumen:"..frame:gsub("^%l", string.upper))
oUF:Spawn(frame, "oUF_Lumen"..frame:gsub("^%l", string.upper))
oUF:RegisterStyle(A..frame:gsub("^%l", string.upper), createStyle)
oUF:SetActiveStyle(A..frame:gsub("^%l", string.upper))
oUF:Spawn(frame, A..frame:gsub("^%l", string.upper))
end

0 comments on commit 63f8280

Please sign in to comment.