From 7e5757f77778c5c58bb35a2541130facebcf39fa Mon Sep 17 00:00:00 2001 From: Ackis Date: Tue, 25 Nov 2008 20:02:00 +0000 Subject: [PATCH] Move more functions around --- ARLFrame.lua | 174 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/ARLFrame.lua b/ARLFrame.lua index b66335a..b221b3b 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -394,6 +394,93 @@ end -- Expected result: -- Input: -- Output: + +local function ClearRecipeButtonTooltip(bIndex) + + local pButton = addon.PlusListButton[bIndex] + local rButton = addon.RecipeListButton[bIndex] + pButton:SetScript("OnEnter", function () end) + pButton:SetScript("OnLeave", function () end) + rButton:SetScript("OnEnter", function () end) + rButton:SetScript("OnLeave", function () end) + +end + +-- Description: +-- Expected result: +-- Input: +-- Output: +-- This sets the tooltip on the button during a recipelist update + +local function SetRecipeButtonTooltip(bIndex) + + local pButton = addon.PlusListButton[bIndex] + local rButton = addon.RecipeListButton[bIndex] + local dStringIndex = rButton.sI + local rIndex = DisplayStrings[dStringIndex].sID + local playerFaction = playerData.playerFaction + local exclude = addon.db.profile.exclusionlist + + pButton:SetScript("OnEnter", + function (pButton) + GenerateTooltipContent(pButton, rIndex, playerFaction, exclude) + end + ) + + pButton:SetScript("OnLeave", + function() + arlTooltip:Hide() + arlTooltip2:Hide() + end + ) + + rButton:SetScript("OnEnter", + function (rButton) + GenerateTooltipContent(rButton, rIndex, playerFaction, exclude) + end + ) + + rButton:SetScript("OnLeave", + function() + arlTooltip:Hide() + arlTooltip2:Hide() + end + ) + +end + + +-- Description: +-- Expected result: +-- Input: +-- Output: + +local function CheckDisplayFaction(filterDB, faction) + + if (filterDB.general.faction ~= true) then + + if ((faction == BFAC[myFaction]) or (faction == BFAC["Neutral"]) or (faction == nil)) then + + return true + + else + + return false + + end + + else + + return true + + end + +end + +-- Description: +-- Expected result: +-- Input: +-- Output: -- Scrollframe update stuff local function RecipeList_Update() @@ -1547,22 +1634,6 @@ end -- Input: -- Output: -local function ClearRecipeButtonTooltip(bIndex) - - local pButton = addon.PlusListButton[bIndex] - local rButton = addon.RecipeListButton[bIndex] - pButton:SetScript("OnEnter", function () end) - pButton:SetScript("OnLeave", function () end) - rButton:SetScript("OnEnter", function () end) - rButton:SetScript("OnLeave", function () end) - -end - --- Description: --- Expected result: --- Input: --- Output: - local function GenerateTooltipContent(owner, rIndex, playerFaction, exclude) local clr1, clr2 = "", "" @@ -1945,77 +2016,6 @@ end -- Expected result: -- Input: -- Output: --- This sets the tooltip on the button during a recipelist update - -local function SetRecipeButtonTooltip(bIndex) - - local pButton = addon.PlusListButton[bIndex] - local rButton = addon.RecipeListButton[bIndex] - local dStringIndex = rButton.sI - local rIndex = DisplayStrings[dStringIndex].sID - local playerFaction = playerData.playerFaction - local exclude = addon.db.profile.exclusionlist - - pButton:SetScript("OnEnter", - function (pButton) - GenerateTooltipContent(pButton, rIndex, playerFaction, exclude) - end - ) - - pButton:SetScript("OnLeave", - function() - arlTooltip:Hide() - arlTooltip2:Hide() - end - ) - - rButton:SetScript("OnEnter", - function (rButton) - GenerateTooltipContent(rButton, rIndex, playerFaction, exclude) - end - ) - - rButton:SetScript("OnLeave", - function() - arlTooltip:Hide() - arlTooltip2:Hide() - end - ) - -end - - --- Description: --- Expected result: --- Input: --- Output: - -local function CheckDisplayFaction(filterDB, faction) - - if (filterDB.general.faction ~= true) then - - if ((faction == BFAC[myFaction]) or (faction == BFAC["Neutral"]) or (faction == nil)) then - - return true - - else - - return false - - end - - else - - return true - - end - -end - --- Description: --- Expected result: --- Input: --- Output: local function expandEntry(dsIndex) -- 1.7.9.5