From cec6a4513bdb7e1f14f26ae906a3a2de9add7607 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Wed, 24 Mar 2010 21:59:43 -0400 Subject: [PATCH] Moved ListItem_OnClick() and the initialization of the entry/state buttons into the same do-block as the other button scripts. --- Frame.lua | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/Frame.lua b/Frame.lua index 0840e98..21da36e 100644 --- a/Frame.lua +++ b/Frame.lua @@ -2427,10 +2427,16 @@ MainPanel.scroll_frame.entries = {} MainPanel.scroll_frame.state_buttons = {} MainPanel.scroll_frame.entry_buttons = {} -------------------------------------------------------------------------------- --- Set the scripts for MainPanel.scroll_frame's buttons. -------------------------------------------------------------------------------- do + local highlight = CreateFrame("Frame", nil, UIParent) + highlight:SetFrameStrata("TOOLTIP") + highlight:Hide() + + highlight._texture = highlight:CreateTexture(nil, "OVERLAY") + highlight._texture:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight") + highlight._texture:SetBlendMode("ADD") + highlight._texture:SetAllPoints(highlight) + local function ListItem_OnClick(self, button) local clickedIndex = self.string_index @@ -2530,17 +2536,6 @@ do MainPanel.scroll_frame.state_buttons[i] = cur_state MainPanel.scroll_frame.entry_buttons[i] = cur_entry end -end -- do - -do - local highlight = CreateFrame("Frame", nil, UIParent) - highlight:SetFrameStrata("TOOLTIP") - highlight:Hide() - - highlight._texture = highlight:CreateTexture(nil, "OVERLAY") - highlight._texture:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight") - highlight._texture:SetBlendMode("ADD") - highlight._texture:SetAllPoints(highlight) local function Button_OnEnter(self) GenerateTooltipContent(self, MainPanel.scroll_frame.entries[self.string_index].recipe_id) @@ -2565,6 +2560,7 @@ do QTip:Release(acquire_tip) spell_tip:Hide() end + local SKILL_LEVEL_FORMAT = "[%d]" local SPELL_ENCHANTING = GetSpellInfo(51313) -- 1.7.9.5