From 20c8cae44bd941222e12d6eda02911014f2a2fe4 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Fri, 9 Jul 2010 18:40:08 -0400 Subject: [PATCH] Re-designated SetTextColor() as a method of the private table. --- Frame.lua | 9 +++------ core.lua | 12 ++++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Frame.lua b/Frame.lua index eb5512f..f28a509 100644 --- a/Frame.lua +++ b/Frame.lua @@ -149,7 +149,10 @@ local FilterValueMap -- Assigned in InitializeFrame() ------------------------------------------------------------------------------- -- Upvalues ------------------------------------------------------------------------------- +local SetTextColor = private.SetTextColor + local ListFrame +local MainPanel ------------------------------------------------------------------------------- -- Table cache mechanism @@ -184,12 +187,6 @@ function addon:ClosePopups() end ------------------------------------------------------------------------------- --- Common to many functions throughout the file. -------------------------------------------------------------------------------- -local function SetTextColor(color_code, text) - return string.format("|cff%s%s|r", color_code or "ffffff", text) -end - local FormatRecipeText do local SKILL_LEVEL_FORMAT = "[%d]" diff --git a/core.lua b/core.lua index 329ecc7..24011b9 100644 --- a/core.lua +++ b/core.lua @@ -144,6 +144,18 @@ if MissingLibraries() then return end +------------------------------------------------------------------------------- +-- Functions common to most files in the AddOn. +------------------------------------------------------------------------------- +function private.SetTextColor(color_code, text) + return string.format("|cff%s%s|r", color_code or "ffffff", text) +end + + + +------------------------------------------------------------------------------- +-- Debugger. +------------------------------------------------------------------------------- function addon:Debug(...) if debugger then debugger:AddMessage(string.format(...)) -- 1.7.9.5