From 140e3bda87baffb88b321a19bd5c8bf204e81489 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Wed, 3 Dec 2008 22:33:52 +0000 Subject: [PATCH] * Fix the bug where position was not properly saved * Actually added the ability to scale/alpha the title text --- TomTom_CrazyArrow.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/TomTom_CrazyArrow.lua b/TomTom_CrazyArrow.lua index 06b1eb7..74d5b0c 100644 --- a/TomTom_CrazyArrow.lua +++ b/TomTom_CrazyArrow.lua @@ -63,7 +63,7 @@ end local twopi = math.pi * 2 -local wayframe = CreateFrame("Button", "", UIParent) +local wayframe = CreateFrame("Button", "TomTomCrazyArrow", UIParent) wayframe:SetHeight(42) wayframe:SetWidth(56) wayframe:SetPoint("CENTER", 0, 0) @@ -71,9 +71,12 @@ wayframe:EnableMouse(true) wayframe:SetMovable(true) wayframe:Hide() -wayframe.title = wayframe:CreateFontString("OVERLAY", nil, "GameFontHighlightSmall") -wayframe.status = wayframe:CreateFontString("OVERLAY", nil, "GameFontNormalSmall") -wayframe.tta = wayframe:CreateFontString("OVERLAY", nil, "GameFontNormalSmall") +-- Frame used to control the scaling of the title and friends +local titleframe = CreateFrame("Frame", nil, wayframe) + +wayframe.title = titleframe:CreateFontString("OVERLAY", nil, "GameFontHighlightSmall") +wayframe.status = titleframe:CreateFontString("OVERLAY", nil, "GameFontNormalSmall") +wayframe.tta = titleframe:CreateFontString("OVERLAY", nil, "GameFontNormalSmall") wayframe.title:SetPoint("TOP", wayframe, "BOTTOM", 0, 0) wayframe.status:SetPoint("TOP", wayframe.title, "BOTTOM", 0, 0) wayframe.tta:SetPoint("TOP", wayframe.status, "BOTTOM", 0, 0) @@ -248,9 +251,8 @@ function TomTom:ShowHideCrazyArrow() wayframe.title:SetWidth(width) wayframe.title:SetHeight(height) - -- TODO: Implement this - --wayframe.title:SetScale(scale) - wayframe.title:SetAlpha(TomTom.db.profile.arrow.title_alpha) + titleframe:SetScale(scale) + titleframe:SetAlpha(TomTom.db.profile.arrow.title_alpha) if self.profile.arrow.showtta then tta:Show() -- 1.7.9.5