View Single Post
01-14-15, 03:46 AM   #62
Kygo
A Theradrim Guardian
 
Kygo's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 64
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:
  1. local addon, ns = ...
  2. local name, ns = ...
  3. local cfg = CreateFrame('Frame')
  4. local _, class = UnitClass('player')
  5. local cfg = {}
  6.  
  7. local mediaPath = "Interface\\AddOns\\oUF_Kygo\\Media\\"
  8. cfg.texture = mediaPath.."normTex2.tga"
  9. cfg.bgFile = mediaPath.."backdrop"
  10. cfg.edgeFile = mediaPath.."backdrop_edge"
  11. cfg.Icon = mediaPath.."Neal_border"
  12. cfg.CPoint = mediaPath.."NCPoint"
  13.  
  14. cfg.font, cfg.fontsize, cfg.fontflag = "Interface\\AddOns\\oUF_Kygo\\Media\\Fonts\\ExpresswayRg.ttf", 10, 0, 0, "Outlinemonochrome"
  15.  
  16.     cfg.ClassPowerText = {
  17.         Priest = {26/255, 160/255, 255/255}, --Mana
  18.         Shaman = {26/255, 160/255, 255/255}, -- Mana
  19.         Warlock = {26/255, 160/255, 255/255}, -- Mana
  20.         Paladin = {26/255, 160/255, 255/255}, -- Mana
  21.         MonkMistweaver = {26/255, 160/255, 255/255}, --How to check if monk is MW or not status: Unknown atm
  22.         Mage = {26/255, 160/255, 255/255}, -- Mana
  23.         DruidRestoBalance = {26/255, 160/255, 255/255}, -- Mana
  24.         Warrior = {255/255, 26/255, 48/255}, -- Rage
  25.         DruidGuardian = {255/255, 26/255, 48/255}, --Rage
  26.         Hunter = {255/255, 128/255, 64/255}, -- Focus
  27.         Rogue = {255/255, 225/255, 26/255}, -- Energy
  28.         DruidFeral = {255/255, 225/255, 26/255}, -- Energy
  29.         DeathKnight = {0.00, 0.82, 1.00}, -- Runic Power
  30. }
  31.  
  32. ns.cfg = cfg
  Reply With Quote