So I played on a private server for a while which was running 3.3.5 and I made my self a recount skin based on TukUI. But for the past 3 months I have been playing on retail 5.4.7 (well .8 now) and I wanted to use my recount skin but it's not letting me. The code I used to access recount was
Code:
local function SkinFrame(frame)
all my skinning code
end
local elements = {
Recount.MainWindow,
Recount.ConfigWindow,
Recount.GraphWindow,
Recount.DetailWindow,
Recount.ResetFrame,
}
I am guessing something changed in the API that wont let me do that anymore... Anyone think they can help me out with this?
The code I posted above was just the parts I thought relevant.. here is the rest of it, with the exception of the recount button skinning since its very long and irrelevant.
Code:
local backdrop = {bgFile = "Interface\\AddOns\\BlastSkins\\textures\\blank", edgeFile = "Interface\\AddOns\\BlastSkins\\textures\\blank", tile = false, edgeSize = 1, insets = {left = 0, right = 0, top = 0, bottom = 0}}
local backdrop2 = {bgFile = "Interface\\AddOns\\BlastSkins\\textures\\blank", edgeFile = "Interface\\AddOns\\BlastSkins\\textures\\blank", tile = false, edgeSize = 1, insets = {left = -1, right = -1, top = 6, bottom = -1}}
local function SkinFrame(frame)
frame.bgMain = CreateFrame("Frame", nil, frame)
frame.bgMain:SetBackdrop(backdrop)
frame.bgMain:SetBackdropColor(0.1,0.1,0.1,0.35)
frame.bgMain:SetBackdropBorderColor(0.6,0.6,0.6,1)
frame.bgMain:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT")
frame.bgMain:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT")
frame.bgMain:SetPoint("TOP", frame, "TOP", 0, -7)
frame.bgMain:SetFrameLevel(frame:GetFrameLevel())
frame.CloseButton:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -1, -9)
frame:SetBackdrop(backdrop2)
frame:SetBackdropColor(0.1,0.1,0.1,0.35)
frame:SetBackdropBorderColor(0.6,0.6,0.6,0)
frame.TitleBackground = CreateFrame("Frame", nil, frame.bgMain)
frame.TitleBackground:SetPoint("TOP", 0)
frame.TitleBackground:SetPoint("LEFT", 0)
frame.TitleBackground:SetPoint("RIGHT", 0)
frame.TitleBackground:SetHeight(24)
frame.TitleBackground:SetBackdrop(backdrop)
frame.TitleBackground:SetBackdropColor(0.1,0.1,0.1)
frame.TitleBackground:SetBackdropBorderColor(0.6,0.6,0.6)
frame.Title:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\TukNormal.ttf", 11)
frame.Title:SetParent(frame.TitleBackground)
frame.Title:ClearAllPoints()
frame.Title:SetPoint("LEFT", 4, 0)
frame.CloseButton:SetNormalTexture("")
frame.CloseButton:SetPushedTexture("")
frame.CloseButton:SetHighlightTexture("")
frame.CloseButton.t = frame.CloseButton:CreateFontString(nil, "OVERLAY")
frame.CloseButton.t:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\TukPixel.ttf", 12)
frame.CloseButton.t:SetPoint("CENTER", -2, 2)
frame.CloseButton.t:SetText("X")
end
Recount.UpdateBarTextures = function(self)
for k, v in pairs(Recount.MainWindow.Rows) do
v.StatusBar:SetStatusBarTexture("Interface\\AddOns\\SharedMedia_MyMedia\\statusbar\\DsmV3")
v.StatusBar:GetStatusBarTexture():SetHorizTile(false)
v.StatusBar:GetStatusBarTexture():SetVertTile(false)
v.LeftText:SetPoint("LEFT", 4, 1)
v.LeftText:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\TukNormal.ttf", 12)
v.RightText:SetPoint("RIGHT", -4, 1)
v.RightText:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\TukNormal.ttf", 12)
end
end
Recount.SetBarTextures = Recount.UpdateBarTextures
-- Fix bar textures as they\'re created
Recount.SetupBar_ = Recount.SetupBar
Recount.SetupBar = function(self, bar)
self:SetupBar_(bar)
bar.StatusBar:SetStatusBarTexture("Interface\\AddOns\\SharedMedia_MyMedia\\statusbar\\DsmV3")
end
-- Skin frames when they\'re created
Recount.CreateFrame_ = Recount.CreateFrame
Recount.CreateFrame = function(self, Name, Title, Height, Width, ShowFunc, HideFunc)
local frame = self:CreateFrame_(Name, Title, Height, Width, ShowFunc, HideFunc)
SkinFrame(frame)
return frame
end
-- frame we want to skins
local elements = {
Recount.MainWindow,
Recount.ConfigWindow,
Recount.GraphWindow,
Recount.DetailWindow,
Recount.ResetFrame,
}
-- skin them
for i = 1, getn(elements) do
local frame = elements[i]
if frame then
SkinFrame(frame)
end
end
--Update Textures
Recount:UpdateBarTextures()