How my .toc file currently looks:
Code:
## Interface: 60000
## Title: oUF_Kygo
## Author: Kygo
## Version: 1.2
## Dependencies: oUF
cfg.lua
elements\BurningEmbers.lua
Frames.lua
What I'm aware of so does WoW read all files in a top-to-bottom order.
And I changed around inside the "cfg" file itself last night to find a way to tell Frames.lua for example, "powerText:SetFont(cfg.font, cfg.fontsize, cfg.fontflag)". But in game, it gives me errors saying that's not how "SetFont" works.
Just gonna throw the three lines on the top the Frames.lua aswell in here if those are the ones that are wrong.
Code:
local _, ns = ...
local oUF = ns.oUF or oUF
local cfg = ns.cfg
How the "cfg" file looks atm (the ClassPowerText is there to somehow call that table to set the powerText on both player and target to the color that their power is (eg mana is blue, rage is red..))
Lua Code:
local addon, ns = ...
local name, ns = ...
local cfg = CreateFrame('Frame')
local _, class = UnitClass('player')
local cfg = {}
local mediaPath = "Interface\\AddOns\\oUF_Kygo\\Media\\"
cfg.texture = mediaPath.."normTex2.tga"
cfg.bgFile = mediaPath.."backdrop"
cfg.edgeFile = mediaPath.."backdrop_edge"
cfg.Icon = mediaPath.."Neal_border"
cfg.CPoint = mediaPath.."NCPoint"
cfg.font, cfg.fontsize, cfg.fontflag = "Interface\\AddOns\\oUF_Kygo\\Media\\Fonts\\ExpresswayRg.ttf", 10, 0, 0, "Outlinemonochrome"
cfg.ClassPowerText = {
Priest = {26/255, 160/255, 255/255}, --Mana
Shaman = {26/255, 160/255, 255/255}, -- Mana
Warlock = {26/255, 160/255, 255/255}, -- Mana
Paladin = {26/255, 160/255, 255/255}, -- Mana
MonkMistweaver = {26/255, 160/255, 255/255}, --How to check if monk is MW or not status: Unknown atm
Mage = {26/255, 160/255, 255/255}, -- Mana
DruidRestoBalance = {26/255, 160/255, 255/255}, -- Mana
Warrior = {255/255, 26/255, 48/255}, -- Rage
DruidGuardian = {255/255, 26/255, 48/255}, --Rage
Hunter = {255/255, 128/255, 64/255}, -- Focus
Rogue = {255/255, 225/255, 26/255}, -- Energy
DruidFeral = {255/255, 225/255, 26/255}, -- Energy
DeathKnight = {0.00, 0.82, 1.00}, -- Runic Power
}
ns.cfg = cfg