From 3b8ddd4a00cd6d0431aa6ba606f5667920eee94f Mon Sep 17 00:00:00 2001 From: torhal Date: Thu, 26 Nov 2009 15:54:17 +0000 Subject: [PATCH] Changed addon.Flyaway to MainPanel.filter_menu Changed addon.Fly_Rep_WHATEVER to MainPanel.filter_menu.Rep.WHATEVER Changed FLYAWAY_WHATEVER to FILTERMENU_WHATEVER DoFlyaway() is now ToggleFilterMenu() Moved the setting of the scroll frame's attributes to just after its creation - was in addon:InitializeFrame() Various other syntax and name changes for clarity. --- ARLFrame.lua | 981 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 499 insertions(+), 482 deletions(-) diff --git a/ARLFrame.lua b/ARLFrame.lua index e1c927d..422bf57 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -83,12 +83,12 @@ local NUM_PROFESSIONS = 12 local NUM_RECIPE_LINES = 24 -- Number of visible lines in the scrollframe. local SEASONAL_CATEGORY = GetCategoryInfo(155) -- Localized string - "World Events" -local FLYAWAY_SINGLE_WIDTH = 136 -local FLYAWAY_DOUBLE_WIDTH = 300 -local FLYAWAY_HEIGHT = 312 +local FILTERMENU_SINGLE_WIDTH = 136 +local FILTERMENU_DOUBLE_WIDTH = 300 +local FILTERMENU_HEIGHT = 312 -local FLYAWAY_SMALL = 112 -local FLYAWAY_LARGE = 210 +local FILTERMENU_SMALL = 112 +local FILTERMENU_LARGE = 210 ------------------------------------------------------------------------------- @@ -97,7 +97,7 @@ local FLYAWAY_LARGE = 210 local FilterValueMap -- Assigned in addon:InitializeFrame() local ARL_SearchText, ARL_LastSearchedText -local ARL_ExpGeneralOptCB, ARL_ExpObtainOptCB, ARL_ExpBindingOptCB, ARL_ExpItemOptCB, ARL_ExpPlayerOptCB, ARL_ExpRepOptCB, ARL_RepOldWorldCB, ARL_RepBCCB, ARL_RepLKCB,ARL_ExpMiscOptCB +local ARL_ExpGeneralOptCB, ARL_ExpObtainOptCB, ARL_ExpBindingOptCB, ARL_ExpItemOptCB, ARL_ExpPlayerOptCB, ARL_ExpRepOptCB, ARL_Rep_ClassicCB, ARL_Rep_BCCB, ARL_Rep_LKCB,ARL_ExpMiscOptCB ------------------------------------------------------------------------------- -- Define the static popups we're going to call when people don't have a @@ -149,7 +149,6 @@ StaticPopupDialogs["ARL_SEARCHFILTERED"] = { hideOnEscape = 1 } - ------------------------------------------------------------------------------- -- Table cache mechanism ------------------------------------------------------------------------------- @@ -1559,11 +1558,10 @@ end -- do ------------------------------------------------------------------------------- local function ReDisplay() addon:UpdateFilters() - SortRecipeList() - Player:MarkExclusions() - MainPanel.scroll_frame:Update(false) + SortRecipeList() + MainPanel.scroll_frame:Update(false, false) MainPanel:UpdateProgressBar() -- Make sure our expand all button is set to expandall @@ -1664,16 +1662,18 @@ do -- depending if we're on the misc panel or not, set an alternative OnClick method if misc == 0 then - cButton:SetScript("OnClick", function() - FilterValueMap[scriptVal].svroot[scriptVal] = FilterValueMap[scriptVal].cb:GetChecked() and true or false - MainPanel:UpdateTitle() - ReDisplay() - end) + cButton:SetScript("OnClick", + function() + FilterValueMap[scriptVal].svroot[scriptVal] = FilterValueMap[scriptVal].cb:GetChecked() and true or false + MainPanel:UpdateTitle() + ReDisplay() + end) else - cButton:SetScript("OnClick", function() - addon.db.profile.ignoreexclusionlist = not addon.db.profile.ignoreexclusionlist - ReDisplay() - end) + cButton:SetScript("OnClick", + function() + addon.db.profile.ignoreexclusionlist = not addon.db.profile.ignoreexclusionlist + ReDisplay() + end) end SetTooltipScripts(cButton, ttText, 1) end @@ -1692,8 +1692,8 @@ do L["FILTERING_MISC_DESC"] -- 7 } - local function DoFlyaway(panel) - -- This manages the flyaway panel, as well as checking or unchecking the + local function ToggleFilterMenu(panel) + -- This manages the filter menu panel, as well as checking or unchecking the -- buttons that got us here in the first place -- -- our panels are: @@ -1707,12 +1707,13 @@ do local ChangeFilters = false - addon.Fly_Rep_OW:Hide() - addon.Fly_Rep_BC:Hide() - addon.Fly_Rep_LK:Hide() - ARL_RepOldWorldCB:SetChecked(false) - ARL_RepBCCB:SetChecked(false) - ARL_RepLKCB:SetChecked(false) + MainPanel.filter_menu.Rep.Classic:Hide() + MainPanel.filter_menu.Rep.BC:Hide() + MainPanel.filter_menu.Rep.LK:Hide() + + ARL_Rep_ClassicCB:SetChecked(false) + ARL_Rep_BCCB:SetChecked(false) + ARL_Rep_LKCB:SetChecked(false) if panel == 1 then if ARL_ExpGeneralOptCB:GetChecked() then @@ -1720,13 +1721,13 @@ do HideARL_ExpOptCB("general") -- display the correct subframe with all the buttons and such, hide the others - addon.Fly_General:Show() - addon.Fly_Obtain:Hide() - addon.Fly_Binding:Hide() - addon.Fly_Item:Hide() - addon.Fly_Player:Hide() - addon.Fly_Rep:Hide() - addon.Fly_Misc:Hide() + MainPanel.filter_menu.General:Show() + MainPanel.filter_menu.Obtain:Hide() + MainPanel.filter_menu.Binding:Hide() + MainPanel.filter_menu.Item:Hide() + MainPanel.filter_menu.Player:Hide() + MainPanel.filter_menu.Rep:Hide() + MainPanel.filter_menu.Misc:Hide() ChangeFilters = true else @@ -1738,13 +1739,13 @@ do HideARL_ExpOptCB("obtain") -- display the correct subframe with all the buttons and such, hide the others - addon.Fly_General:Hide() - addon.Fly_Obtain:Show() - addon.Fly_Binding:Hide() - addon.Fly_Item:Hide() - addon.Fly_Player:Hide() - addon.Fly_Rep:Hide() - addon.Fly_Misc:Hide() + MainPanel.filter_menu.General:Hide() + MainPanel.filter_menu.Obtain:Show() + MainPanel.filter_menu.Binding:Hide() + MainPanel.filter_menu.Item:Hide() + MainPanel.filter_menu.Player:Hide() + MainPanel.filter_menu.Rep:Hide() + MainPanel.filter_menu.Misc:Hide() ChangeFilters = true else @@ -1756,13 +1757,13 @@ do HideARL_ExpOptCB("binding") -- display the correct subframe with all the buttons and such, hide the others - addon.Fly_General:Hide() - addon.Fly_Obtain:Hide() - addon.Fly_Binding:Show() - addon.Fly_Item:Hide() - addon.Fly_Player:Hide() - addon.Fly_Rep:Hide() - addon.Fly_Misc:Hide() + MainPanel.filter_menu.General:Hide() + MainPanel.filter_menu.Obtain:Hide() + MainPanel.filter_menu.Binding:Show() + MainPanel.filter_menu.Item:Hide() + MainPanel.filter_menu.Player:Hide() + MainPanel.filter_menu.Rep:Hide() + MainPanel.filter_menu.Misc:Hide() ChangeFilters = true else @@ -1774,13 +1775,13 @@ do HideARL_ExpOptCB("item") -- display the correct subframe with all the buttons and such, hide the others - addon.Fly_General:Hide() - addon.Fly_Obtain:Hide() - addon.Fly_Binding:Hide() - addon.Fly_Item:Show() - addon.Fly_Player:Hide() - addon.Fly_Rep:Hide() - addon.Fly_Misc:Hide() + MainPanel.filter_menu.General:Hide() + MainPanel.filter_menu.Obtain:Hide() + MainPanel.filter_menu.Binding:Hide() + MainPanel.filter_menu.Item:Show() + MainPanel.filter_menu.Player:Hide() + MainPanel.filter_menu.Rep:Hide() + MainPanel.filter_menu.Misc:Hide() ChangeFilters = true else @@ -1792,13 +1793,13 @@ do HideARL_ExpOptCB("player") -- display the correct subframe with all the buttons and such, hide the others - addon.Fly_General:Hide() - addon.Fly_Obtain:Hide() - addon.Fly_Binding:Hide() - addon.Fly_Item:Hide() - addon.Fly_Player:Show() - addon.Fly_Rep:Hide() - addon.Fly_Misc:Hide() + MainPanel.filter_menu.General:Hide() + MainPanel.filter_menu.Obtain:Hide() + MainPanel.filter_menu.Binding:Hide() + MainPanel.filter_menu.Item:Hide() + MainPanel.filter_menu.Player:Show() + MainPanel.filter_menu.Rep:Hide() + MainPanel.filter_menu.Misc:Hide() ChangeFilters = true else @@ -1810,13 +1811,13 @@ do HideARL_ExpOptCB("rep") -- display the correct subframe with all the buttons and such, hide the others - addon.Fly_General:Hide() - addon.Fly_Obtain:Hide() - addon.Fly_Binding:Hide() - addon.Fly_Item:Hide() - addon.Fly_Player:Hide() - addon.Fly_Rep:Show() - addon.Fly_Misc:Hide() + MainPanel.filter_menu.General:Hide() + MainPanel.filter_menu.Obtain:Hide() + MainPanel.filter_menu.Binding:Hide() + MainPanel.filter_menu.Item:Hide() + MainPanel.filter_menu.Player:Hide() + MainPanel.filter_menu.Rep:Show() + MainPanel.filter_menu.Misc:Hide() ChangeFilters = true else @@ -1828,13 +1829,13 @@ do HideARL_ExpOptCB("misc") -- display the correct subframe with all the buttons and such, hide the others - addon.Fly_General:Hide() - addon.Fly_Obtain:Hide() - addon.Fly_Binding:Hide() - addon.Fly_Item:Hide() - addon.Fly_Player:Hide() - addon.Fly_Rep:Hide() - addon.Fly_Misc:Show() + MainPanel.filter_menu.General:Hide() + MainPanel.filter_menu.Obtain:Hide() + MainPanel.filter_menu.Binding:Hide() + MainPanel.filter_menu.Item:Hide() + MainPanel.filter_menu.Player:Hide() + MainPanel.filter_menu.Rep:Hide() + MainPanel.filter_menu.Misc:Show() ChangeFilters = true else @@ -1848,22 +1849,22 @@ do -- or two column if panel == 2 or panel == 3 or panel == 4 or panel == 7 then addon.flyTexture:ClearAllPoints() - addon.Flyaway:SetWidth(FLYAWAY_DOUBLE_WIDTH) + MainPanel.filter_menu:SetWidth(FILTERMENU_DOUBLE_WIDTH) addon.flyTexture:SetTexture([[Interface\Addons\AckisRecipeList\img\fly_2col]]) - addon.flyTexture:SetAllPoints(addon.Flyaway) - addon.flyTexture:SetTexCoord(0, (FLYAWAY_DOUBLE_WIDTH/256), 0, (FLYAWAY_HEIGHT/512)) + addon.flyTexture:SetAllPoints(MainPanel.filter_menu) + addon.flyTexture:SetTexCoord(0, (FILTERMENU_DOUBLE_WIDTH/256), 0, (FILTERMENU_HEIGHT/512)) elseif ((panel == 1) or (panel == 5) or (panel == 6)) then addon.flyTexture:ClearAllPoints() - addon.Flyaway:SetWidth(FLYAWAY_SINGLE_WIDTH) + MainPanel.filter_menu:SetWidth(FILTERMENU_SINGLE_WIDTH) addon.flyTexture:SetTexture([[Interface\Addons\AckisRecipeList\img\fly_1col]]) - addon.flyTexture:SetAllPoints(addon.Flyaway) - addon.flyTexture:SetTexCoord(0, (FLYAWAY_SINGLE_WIDTH/256), 0, (FLYAWAY_HEIGHT/512)) + addon.flyTexture:SetAllPoints(MainPanel.filter_menu) + addon.flyTexture:SetTexCoord(0, (FILTERMENU_SINGLE_WIDTH/256), 0, (FILTERMENU_HEIGHT/512)) end -- Change the filters to the current panel - addon.Flyaway:Show() + MainPanel.filter_menu:Show() else -- We're hiding, don't bother changing anything - addon.Flyaway:Hide() + MainPanel.filter_menu:Hide() end end @@ -1871,15 +1872,15 @@ do local ExpTextureSize = 34 local cButton - if bName == "ARL_RepOldWorldCB" or bName == "ARL_RepBCCB" or bName == "ARL_RepLKCB" then - cButton = CreateFrame("CheckButton", bName, addon.Fly_Rep) + if bName == "ARL_Rep_ClassicCB" or bName == "ARL_Rep_BCCB" or bName == "ARL_Rep_LKCB" then + cButton = CreateFrame("CheckButton", bName, MainPanel.filter_menu.Rep) cButton:SetWidth(100) cButton:SetHeight(46) cButton:SetChecked(false) local iconTex = cButton:CreateTexture(cButton:GetName() .. "buttonTex", "BORDER") - if bName == "ARL_RepLKCB" then + if bName == "ARL_Rep_LKCB" then iconTex:SetTexture("Interface\\Addons\\AckisRecipeList\\img\\" .. bTex) else iconTex:SetTexture('Interface/Glues/Common/' .. bTex) @@ -1906,9 +1907,9 @@ do cButton:SetCheckedTexture(checkedTexture) -- And throw up a tooltip - if bName == "ARL_RepOldWorldCB" then + if bName == "ARL_Rep_ClassicCB" then SetTooltipScripts(cButton, L["FILTERING_OLDWORLD_DESC"]) - elseif bName == "ARL_RepBCCB" then + elseif bName == "ARL_Rep_BCCB" then SetTooltipScripts(cButton, L["FILTERING_BC_DESC"]) else SetTooltipScripts(cButton, L["FILTERING_WOTLK_DESC"]) @@ -1917,9 +1918,10 @@ do cButton = CreateFrame("CheckButton", bName, MainPanel) -- , "UICheckButtonTemplate") cButton:SetWidth(ExpTextureSize) cButton:SetHeight(ExpTextureSize) - cButton:SetScript("OnClick", function() - DoFlyaway(panelIndex) - end) + cButton:SetScript("OnClick", + function() + ToggleFilterMenu(panelIndex) + end) local bgTex = cButton:CreateTexture(cButton:GetName() .. "bgTex", "BACKGROUND") bgTex:SetTexture('Interface/SpellBook/UI-Spellbook-SpellBackground') @@ -2358,8 +2360,7 @@ function addon:InitializeFrame() -- Uncheck the seven buttons HideARL_ExpOptCB() - -- Hide the flyaway panel - addon.Flyaway:Hide() + MainPanel.filter_menu:Hide() ARL_ResetButton:Hide() else -- Change the text and tooltip for the filter button @@ -2406,7 +2407,7 @@ function addon:InitializeFrame() self:SetText(L["EXPANDALL"]) SetTooltipScripts(self, L["EXPANDALL_DESC"]) end - MainPanel.scroll_frame:Update(expand_acquires) + MainPanel.scroll_frame:Update(expand_acquires, false) end) ARL_ExpandButton:SetText(L["EXPANDALL"]) SetTooltipScripts(ARL_ExpandButton, L["EXPANDALL_DESC"]) @@ -2462,7 +2463,7 @@ function addon:InitializeFrame() ARL_LastSearchedText = searchtext SearchRecipes(searchtext) - MainPanel.scroll_frame:Update(false) + MainPanel.scroll_frame:Update(false, false) ARL_ExpandButton:SetText(L["EXPANDALL"]) SetTooltipScripts(ARL_ExpandButton, L["EXPANDALL_DESC"]) @@ -2499,7 +2500,7 @@ function addon:InitializeFrame() -- Make sure to clear text for last search ARL_LastSearchedText = "" - MainPanel.scroll_frame:Update(false) + MainPanel.scroll_frame:Update(false, false) end) ARL_SearchText = CreateFrame("EditBox", "ARL_SearchText", MainPanel, "InputBoxTemplate") @@ -2512,7 +2513,7 @@ function addon:InitializeFrame() ARL_LastSearchedText = searchtext SearchRecipes(searchtext) - MainPanel.scroll_frame:Update(false) + MainPanel.scroll_frame:Update(false, false) ARL_ExpandButton:SetText(L["EXPANDALL"]) SetTooltipScripts(ARL_ExpandButton, L["EXPANDALL_DESC"]) @@ -2554,7 +2555,10 @@ function addon:InitializeFrame() local ARL_CloseButton = GenericCreateButton("ARL_CloseButton", MainPanel, 22, 69, "BOTTOMRIGHT", MainPanel, "BOTTOMRIGHT", -4, 3, "GameFontNormalSmall", "GameFontHighlightSmall", L["Close"], "CENTER", L["CLOSE_DESC"], 1) - ARL_CloseButton:SetScript("OnClick", function(self) MainPanel:Hide() end) + ARL_CloseButton:SetScript("OnClick", + function(self) + MainPanel:Hide() + end) ------------------------------------------------------------------------------- -- ProgressBar for our skills @@ -2590,12 +2594,9 @@ function addon:InitializeFrame() end -- do ------------------------------------------------------------------------------- - -- The main recipe list buttons and scrollframe + -- Set the scripts for MainPanel.scroll_frame's buttons. ------------------------------------------------------------------------------- do - MainPanel.scroll_frame.state_buttons = {} - MainPanel.scroll_frame.recipe_buttons = {} - local function RecipeItem_OnClick(self, button) local clickedIndex = self.string_index @@ -2659,14 +2660,14 @@ function addon:InitializeFrame() traverseIndex = clickedIndex - 1 - while (entries[traverseIndex] and not entries[traverseIndex].is_header) do + while entries[traverseIndex] and not entries[traverseIndex].is_header do traverseIndex = traverseIndex - 1 end entries[traverseIndex].is_expanded = false traverseIndex = traverseIndex + 1 -- now remove the expanded lines until we get to a recipe again - while (entries[traverseIndex] and not entries[traverseIndex].is_header) do + while entries[traverseIndex] and not entries[traverseIndex].is_header do ReleaseTable(tremove(entries, traverseIndex)) if not entries[traverseIndex] then @@ -2696,15 +2697,6 @@ function addon:InitializeFrame() MainPanel.scroll_frame.state_buttons[i] = temp_state MainPanel.scroll_frame.recipe_buttons[i] = temp_recipe end - MainPanel.scroll_frame:SetHeight(322) - MainPanel.scroll_frame:SetWidth(243) - MainPanel.scroll_frame:SetPoint("TOPLEFT", MainPanel, "TOPLEFT", 20, -97) - MainPanel.scroll_frame:SetScript("OnVerticalScroll", - function(self, arg1) - self.scrolling = true - FauxScrollFrame_OnVerticalScroll(self, arg1, 16, self.Update) - self.scrolling = nil - end) end -- do ------------------------------------------------------------------------------- @@ -2734,14 +2726,14 @@ function addon:InitializeFrame() if MainPanel:IsVisible() then MainPanel:UpdateTitle() HideARL_ExpOptCB() - addon.Flyaway:Hide() + MainPanel.filter_menu:Hide() ReDisplay() end end) ARL_ResetButton:Hide() ------------------------------------------------------------------------------- - -- EXPANDED : 7 buttons for opening/closing the flyaway + -- EXPANDED : 7 buttons for opening/closing the filter menu ------------------------------------------------------------------------------- ARL_ExpGeneralOptCB = CreateExpandedPanelCheckButton("ARL_ExpGeneralOptCB", "INV_Misc_Note_06", 1) ARL_ExpGeneralOptCB:SetPoint("TOPRIGHT", ARL_FilterButton, "BOTTOMLEFT", -1, -50) @@ -2765,51 +2757,52 @@ function addon:InitializeFrame() ARL_ExpMiscOptCB:SetPoint("TOPLEFT", ARL_ExpRepOptCB, "BOTTOMLEFT", -0, -8) ------------------------------------------------------------------------------- - -- Frame for the flyaway pane + -- Create the filter menu frame ------------------------------------------------------------------------------- - addon.Flyaway = CreateFrame("Frame", "ARL_Flyaway", MainPanel) - addon.Flyaway:SetWidth(FLYAWAY_DOUBLE_WIDTH) - addon.Flyaway:SetHeight(FLYAWAY_HEIGHT) + MainPanel.filter_menu = CreateFrame("Frame", "ARL_FilterMenu", MainPanel) + MainPanel.filter_menu:SetWidth(FILTERMENU_DOUBLE_WIDTH) + MainPanel.filter_menu:SetHeight(FILTERMENU_HEIGHT) - addon.flyTexture = addon.Flyaway:CreateTexture("AckisRecipeList.flyTexture", "ARTWORK") + addon.flyTexture = MainPanel.filter_menu:CreateTexture("AckisRecipeList.flyTexture", "ARTWORK") addon.flyTexture:SetTexture("Interface\\Addons\\AckisRecipeList\\img\\fly_2col") - addon.flyTexture:SetAllPoints(addon.Flyaway) - addon.flyTexture:SetTexCoord(0, (FLYAWAY_DOUBLE_WIDTH/256), 0, (FLYAWAY_HEIGHT/512)) - addon.Flyaway:SetHitRectInsets(5, 5, 5, 5) + addon.flyTexture:SetAllPoints(MainPanel.filter_menu) + addon.flyTexture:SetTexCoord(0, (FILTERMENU_DOUBLE_WIDTH/256), 0, (FILTERMENU_HEIGHT/512)) + MainPanel.filter_menu:SetHitRectInsets(5, 5, 5, 5) - addon.Flyaway:EnableMouse(true) - addon.Flyaway:EnableKeyboard(true) - addon.Flyaway:SetMovable(false) + MainPanel.filter_menu:EnableMouse(true) + MainPanel.filter_menu:EnableKeyboard(true) + MainPanel.filter_menu:SetMovable(false) - addon.Flyaway:ClearAllPoints() - addon.Flyaway:SetPoint("TOPLEFT", MainPanel, "TOPRIGHT", -6, -102) + MainPanel.filter_menu:ClearAllPoints() + MainPanel.filter_menu:SetPoint("TOPLEFT", MainPanel, "TOPRIGHT", -6, -102) ------------------------------------------------------------------------------- - -- Set all the current options in the flyaway panel to make sure they are + -- Set all the current options in the filter menu to make sure they are -- consistent with the SV options. ------------------------------------------------------------------------------- - addon.Flyaway:SetScript("OnShow", function() - for filter, info in pairs(FilterValueMap) do - if info.svroot then - info.cb:SetChecked(info.svroot[filter]) - end - end - -- Miscellaneous Options - ARL_IgnoreCB:SetChecked(addon.db.profile.ignoreexclusionlist) - end) - addon.Flyaway:Hide() + MainPanel.filter_menu:SetScript("OnShow", + function() + for filter, info in pairs(FilterValueMap) do + if info.svroot then + info.cb:SetChecked(info.svroot[filter]) + end + end + -- Miscellaneous Options + ARL_IgnoreCB:SetChecked(addon.db.profile.ignoreexclusionlist) + end) + MainPanel.filter_menu:Hide() ------------------------------------------------------------------------------- -- Flyaway virtual frames to group buttons/text easily (and make them easy to show/hide) ------------------------------------------------------------------------------- - addon.Fly_General = CreateFrame("Frame", "ARL_Fly_General", addon.Flyaway) - addon.Fly_General:SetWidth(FLYAWAY_SMALL) - addon.Fly_General:SetHeight(280) - addon.Fly_General:EnableMouse(true) - addon.Fly_General:EnableKeyboard(true) - addon.Fly_General:SetMovable(false) - addon.Fly_General:SetPoint("TOPLEFT", addon.Flyaway, "TOPLEFT", 17, -16) - addon.Fly_General:Hide() + MainPanel.filter_menu.General = CreateFrame("Frame", "ARL_FilterMenu_General", MainPanel.filter_menu) + MainPanel.filter_menu.General:SetWidth(FILTERMENU_SMALL) + MainPanel.filter_menu.General:SetHeight(280) + MainPanel.filter_menu.General:EnableMouse(true) + MainPanel.filter_menu.General:EnableKeyboard(true) + MainPanel.filter_menu.General:SetMovable(false) + MainPanel.filter_menu.General:SetPoint("TOPLEFT", MainPanel.filter_menu, "TOPLEFT", 17, -16) + MainPanel.filter_menu.General:Hide() ------------------------------------------------------------------------------- @@ -2830,27 +2823,27 @@ function addon:InitializeFrame() -- () Warlock -- () Warrior ------------------------------------------------------------------------------- - local ARL_SpecialtyCB = CreateFrame("CheckButton", "ARL_SpecialtyCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_SpecialtyCB, addon.Fly_General, L["SPECIALTY_DESC"], "specialty", 1, 1, 0) + local ARL_SpecialtyCB = CreateFrame("CheckButton", "ARL_SpecialtyCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_SpecialtyCB, MainPanel.filter_menu.General, L["SPECIALTY_DESC"], "specialty", 1, 1, 0) ARL_SpecialtyCBText:SetText(L["Specialties"]) - local ARL_LevelCB = CreateFrame("CheckButton", "ARL_LevelCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_LevelCB, addon.Fly_General, L["SKILL_DESC"], "skill", 2, 1, 0) + local ARL_LevelCB = CreateFrame("CheckButton", "ARL_LevelCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_LevelCB, MainPanel.filter_menu.General, L["SKILL_DESC"], "skill", 2, 1, 0) ARL_LevelCBText:SetText(_G.SKILL) - local ARL_FactionCB = CreateFrame("CheckButton", "ARL_FactionCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_FactionCB, addon.Fly_General, L["FACTION_DESC"], "faction", 3, 1, 0) + local ARL_FactionCB = CreateFrame("CheckButton", "ARL_FactionCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_FactionCB, MainPanel.filter_menu.General, L["FACTION_DESC"], "faction", 3, 1, 0) ARL_FactionCBText:SetText(_G.FACTION) - local ARL_KnownCB = CreateFrame("CheckButton", "ARL_KnownCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_KnownCB, addon.Fly_General, L["KNOWN_DESC"], "known", 4, 1, 0) + local ARL_KnownCB = CreateFrame("CheckButton", "ARL_KnownCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_KnownCB, MainPanel.filter_menu.General, L["KNOWN_DESC"], "known", 4, 1, 0) ARL_KnownCBText:SetText(L["Show Known"]) - local ARL_UnknownCB = CreateFrame("CheckButton", "ARL_UnknownCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_UnknownCB, addon.Fly_General, L["UNKNOWN_DESC"], "unknown", 5, 1, 0) + local ARL_UnknownCB = CreateFrame("CheckButton", "ARL_UnknownCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_UnknownCB, MainPanel.filter_menu.General, L["UNKNOWN_DESC"], "unknown", 5, 1, 0) ARL_UnknownCBText:SetText(L["Show Unknown"]) - local ARL_ClassButton = GenericCreateButton("ARL_ClassButton", addon.Fly_General, + local ARL_ClassButton = GenericCreateButton("ARL_ClassButton", MainPanel.filter_menu.General, 20, 105, "TOPLEFT", ARL_UnknownCB, "BOTTOMLEFT", -4, 6, "GameFontHighlight", "GameFontHighlightSmall", L["Classes"], "LEFT", L["CLASS_TEXT_DESC"], 0) ARL_ClassButton:SetText(L["Classes"] .. ":") @@ -2893,54 +2886,54 @@ function addon:InitializeFrame() local BCM = LOCALIZED_CLASS_NAMES_MALE --local BCF = LOCALIZED_CLASS_NAMES_FEMALE - local ARL_DeathKnightCB = CreateFrame("CheckButton", "ARL_DeathKnightCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_DeathKnightCB, addon.Fly_General, L["CLASS_DESC"], "deathknight", 7, 1, 0) + local ARL_DeathKnightCB = CreateFrame("CheckButton", "ARL_DeathKnightCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_DeathKnightCB, MainPanel.filter_menu.General, L["CLASS_DESC"], "deathknight", 7, 1, 0) ARL_DeathKnightCBText:SetText(BCM["DEATHKNIGHT"]) - local ARL_DruidCB = CreateFrame("CheckButton", "ARL_DruidCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_DruidCB, addon.Fly_General, L["CLASS_DESC"], "druid", 8, 1, 0) + local ARL_DruidCB = CreateFrame("CheckButton", "ARL_DruidCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_DruidCB, MainPanel.filter_menu.General, L["CLASS_DESC"], "druid", 8, 1, 0) ARL_DruidCBText:SetText(BCM["DRUID"]) - local ARL_HunterCB = CreateFrame("CheckButton", "ARL_HunterCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_HunterCB, addon.Fly_General, L["CLASS_DESC"], "hunter", 9, 1, 0) + local ARL_HunterCB = CreateFrame("CheckButton", "ARL_HunterCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_HunterCB, MainPanel.filter_menu.General, L["CLASS_DESC"], "hunter", 9, 1, 0) ARL_HunterCBText:SetText(BCM["HUNTER"]) - local ARL_MageCB = CreateFrame("CheckButton", "ARL_MageCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_MageCB, addon.Fly_General, L["CLASS_DESC"], "mage", 10, 1, 0) + local ARL_MageCB = CreateFrame("CheckButton", "ARL_MageCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_MageCB, MainPanel.filter_menu.General, L["CLASS_DESC"], "mage", 10, 1, 0) ARL_MageCBText:SetText(BCM["MAGE"]) - local ARL_PaladinCB = CreateFrame("CheckButton", "ARL_PaladinCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_PaladinCB, addon.Fly_General, L["CLASS_DESC"], "paladin", 11, 1, 0) + local ARL_PaladinCB = CreateFrame("CheckButton", "ARL_PaladinCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_PaladinCB, MainPanel.filter_menu.General, L["CLASS_DESC"], "paladin", 11, 1, 0) ARL_PaladinCBText:SetText(BCM["PALADIN"]) - local ARL_PriestCB = CreateFrame("CheckButton", "ARL_PriestCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_PriestCB, addon.Fly_General, L["CLASS_DESC"], "priest", 12, 1, 0) + local ARL_PriestCB = CreateFrame("CheckButton", "ARL_PriestCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_PriestCB, MainPanel.filter_menu.General, L["CLASS_DESC"], "priest", 12, 1, 0) ARL_PriestCBText:SetText(BCM["PRIEST"]) - local ARL_RogueCB = CreateFrame("CheckButton", "ARL_RogueCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RogueCB, addon.Fly_General, L["CLASS_DESC"], "rogue", 13, 1, 0) + local ARL_RogueCB = CreateFrame("CheckButton", "ARL_RogueCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RogueCB, MainPanel.filter_menu.General, L["CLASS_DESC"], "rogue", 13, 1, 0) ARL_RogueCBText:SetText(BCM["ROGUE"]) - local ARL_ShamanCB = CreateFrame("CheckButton", "ARL_ShamanCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_ShamanCB, addon.Fly_General, L["CLASS_DESC"], "shaman", 14, 1, 0) + local ARL_ShamanCB = CreateFrame("CheckButton", "ARL_ShamanCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_ShamanCB, MainPanel.filter_menu.General, L["CLASS_DESC"], "shaman", 14, 1, 0) ARL_ShamanCBText:SetText(BCM["SHAMAN"]) - local ARL_WarlockCB = CreateFrame("CheckButton", "ARL_WarlockCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WarlockCB, addon.Fly_General, L["CLASS_DESC"], "warlock", 15, 1, 0) + local ARL_WarlockCB = CreateFrame("CheckButton", "ARL_WarlockCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WarlockCB, MainPanel.filter_menu.General, L["CLASS_DESC"], "warlock", 15, 1, 0) ARL_WarlockCBText:SetText(BCM["WARLOCK"]) - local ARL_WarriorCB = CreateFrame("CheckButton", "ARL_WarriorCB", addon.Fly_General, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WarriorCB, addon.Fly_General, L["CLASS_DESC"], "warrior", 16, 1, 0) + local ARL_WarriorCB = CreateFrame("CheckButton", "ARL_WarriorCB", MainPanel.filter_menu.General, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WarriorCB, MainPanel.filter_menu.General, L["CLASS_DESC"], "warrior", 16, 1, 0) ARL_WarriorCBText:SetText(BCM["WARRIOR"]) - addon.Fly_Obtain = CreateFrame("Frame", "ARL_Fly_Obtain", addon.Flyaway) - addon.Fly_Obtain:SetWidth(FLYAWAY_SMALL) - addon.Fly_Obtain:SetHeight(280) - addon.Fly_Obtain:EnableMouse(true) - addon.Fly_Obtain:EnableKeyboard(true) - addon.Fly_Obtain:SetMovable(false) - addon.Fly_Obtain:SetPoint("TOPLEFT", addon.Flyaway, "TOPLEFT", 17, -16) - addon.Fly_Obtain:Hide() + MainPanel.filter_menu.Obtain = CreateFrame("Frame", "ARL_FilterMenu_Obtain", MainPanel.filter_menu) + MainPanel.filter_menu.Obtain:SetWidth(FILTERMENU_SMALL) + MainPanel.filter_menu.Obtain:SetHeight(280) + MainPanel.filter_menu.Obtain:EnableMouse(true) + MainPanel.filter_menu.Obtain:EnableKeyboard(true) + MainPanel.filter_menu.Obtain:SetMovable(false) + MainPanel.filter_menu.Obtain:SetPoint("TOPLEFT", MainPanel.filter_menu, "TOPLEFT", 17, -16) + MainPanel.filter_menu.Obtain:Hide() ------------------------------------------------------------------------------- -- () Instance () Raid @@ -2949,66 +2942,66 @@ function addon:InitializeFrame() -- () PVP () Discovery -- () World Drop () Mob Drop ------------------------------------------------------------------------------- - local ARL_InstanceCB = CreateFrame("CheckButton", "ARL_InstanceCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_InstanceCB, addon.Fly_Obtain, L["INSTANCE_DESC"], "instance", 1, 1, 0) + local ARL_InstanceCB = CreateFrame("CheckButton", "ARL_InstanceCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_InstanceCB, MainPanel.filter_menu.Obtain, L["INSTANCE_DESC"], "instance", 1, 1, 0) ARL_InstanceCBText:SetText(_G.INSTANCE) - local ARL_RaidCB = CreateFrame("CheckButton", "ARL_RaidCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RaidCB, addon.Fly_Obtain, L["RAID_DESC"], "raid", 2, 1, 0) + local ARL_RaidCB = CreateFrame("CheckButton", "ARL_RaidCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RaidCB, MainPanel.filter_menu.Obtain, L["RAID_DESC"], "raid", 2, 1, 0) ARL_RaidCBText:SetText(_G.RAID) - local ARL_QuestCB = CreateFrame("CheckButton", "ARL_QuestCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_QuestCB, addon.Fly_Obtain, L["QUEST_DESC"], "quest", 3, 1, 0) + local ARL_QuestCB = CreateFrame("CheckButton", "ARL_QuestCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_QuestCB, MainPanel.filter_menu.Obtain, L["QUEST_DESC"], "quest", 3, 1, 0) ARL_QuestCBText:SetText(L["Quest"]) - local ARL_SeasonalCB = CreateFrame("CheckButton", "ARL_SeasonalCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_SeasonalCB, addon.Fly_Obtain, L["SEASONAL_DESC"], "seasonal", 4, 1, 0) + local ARL_SeasonalCB = CreateFrame("CheckButton", "ARL_SeasonalCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_SeasonalCB, MainPanel.filter_menu.Obtain, L["SEASONAL_DESC"], "seasonal", 4, 1, 0) ARL_SeasonalCBText:SetText(SEASONAL_CATEGORY) - local ARL_TrainerCB = CreateFrame("CheckButton", "ARL_TrainerCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_TrainerCB, addon.Fly_Obtain, L["TRAINER_DESC"], "trainer", 5, 1, 0) + local ARL_TrainerCB = CreateFrame("CheckButton", "ARL_TrainerCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_TrainerCB, MainPanel.filter_menu.Obtain, L["TRAINER_DESC"], "trainer", 5, 1, 0) ARL_TrainerCBText:SetText(L["Trainer"]) - local ARL_VendorCB = CreateFrame("CheckButton", "ARL_VendorCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_VendorCB, addon.Fly_Obtain, L["VENDOR_DESC"], "vendor", 6, 1, 0) + local ARL_VendorCB = CreateFrame("CheckButton", "ARL_VendorCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_VendorCB, MainPanel.filter_menu.Obtain, L["VENDOR_DESC"], "vendor", 6, 1, 0) ARL_VendorCBText:SetText(L["Vendor"]) - local ARL_PVPCB = CreateFrame("CheckButton", "ARL_PVPCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_PVPCB, addon.Fly_Obtain, L["PVP_DESC"], "pvp", 7, 1, 0) + local ARL_PVPCB = CreateFrame("CheckButton", "ARL_PVPCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_PVPCB, MainPanel.filter_menu.Obtain, L["PVP_DESC"], "pvp", 7, 1, 0) ARL_PVPCBText:SetText(_G.PVP) - local ARL_DiscoveryCB = CreateFrame("CheckButton", "ARL_DiscoveryCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_DiscoveryCB, addon.Fly_Obtain, L["DISCOVERY_DESC"], "discovery", 8, 1, 0) + local ARL_DiscoveryCB = CreateFrame("CheckButton", "ARL_DiscoveryCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_DiscoveryCB, MainPanel.filter_menu.Obtain, L["DISCOVERY_DESC"], "discovery", 8, 1, 0) ARL_DiscoveryCBText:SetText(L["Discovery"]) - local ARL_WorldDropCB = CreateFrame("CheckButton", "ARL_WorldDropCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WorldDropCB, addon.Fly_Obtain, L["WORLD_DROP_DESC"], "worlddrop", 9, 1, 0) + local ARL_WorldDropCB = CreateFrame("CheckButton", "ARL_WorldDropCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WorldDropCB, MainPanel.filter_menu.Obtain, L["WORLD_DROP_DESC"], "worlddrop", 9, 1, 0) ARL_WorldDropCBText:SetText(L["World Drop"]) - local ARL_MobDropCB = CreateFrame("CheckButton", "ARL_MobDropCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_MobDropCB, addon.Fly_Obtain, L["MOB_DROP_DESC"], "mobdrop", 10, 1, 0) + local ARL_MobDropCB = CreateFrame("CheckButton", "ARL_MobDropCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_MobDropCB, MainPanel.filter_menu.Obtain, L["MOB_DROP_DESC"], "mobdrop", 10, 1, 0) ARL_MobDropCBText:SetText(L["Mob Drop"]) - local ARL_OriginalWoWCB = CreateFrame("CheckButton", "ARL_OriginalWoWCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_OriginalWoWCB, addon.Fly_Obtain, L["ORIGINAL_WOW_DESC"], "originalwow", 12, 1, 0) + local ARL_OriginalWoWCB = CreateFrame("CheckButton", "ARL_OriginalWoWCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_OriginalWoWCB, MainPanel.filter_menu.Obtain, L["ORIGINAL_WOW_DESC"], "originalwow", 12, 1, 0) ARL_OriginalWoWCBText:SetText(_G.EXPANSION_NAME0) - local ARL_BCCB = CreateFrame("CheckButton", "ARL_BCCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_BCCB, addon.Fly_Obtain, L["BC_WOW_DESC"], "bc", 13, 1, 0) + local ARL_BCCB = CreateFrame("CheckButton", "ARL_BCCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_BCCB, MainPanel.filter_menu.Obtain, L["BC_WOW_DESC"], "bc", 13, 1, 0) ARL_BCCBText:SetText(_G.EXPANSION_NAME1) - local ARL_WrathCB = CreateFrame("CheckButton", "ARL_WrathCB", addon.Fly_Obtain, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WrathCB, addon.Fly_Obtain, L["LK_WOW_DESC"], "wrath", 14, 1, 0) + local ARL_WrathCB = CreateFrame("CheckButton", "ARL_WrathCB", MainPanel.filter_menu.Obtain, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WrathCB, MainPanel.filter_menu.Obtain, L["LK_WOW_DESC"], "wrath", 14, 1, 0) ARL_WrathCBText:SetText(_G.EXPANSION_NAME2) - addon.Fly_Binding = CreateFrame("Frame", "ARL_Fly_Binding", addon.Flyaway) - addon.Fly_Binding:SetWidth(FLYAWAY_LARGE) - addon.Fly_Binding:SetHeight(280) - addon.Fly_Binding:EnableMouse(true) - addon.Fly_Binding:EnableKeyboard(true) - addon.Fly_Binding:SetMovable(false) - addon.Fly_Binding:SetPoint("TOPLEFT", addon.Flyaway, "TOPLEFT", 17, -16) - addon.Fly_Binding:Hide() + MainPanel.filter_menu.Binding = CreateFrame("Frame", "ARL_FilterMenu_Binding", MainPanel.filter_menu) + MainPanel.filter_menu.Binding:SetWidth(FILTERMENU_LARGE) + MainPanel.filter_menu.Binding:SetHeight(280) + MainPanel.filter_menu.Binding:EnableMouse(true) + MainPanel.filter_menu.Binding:EnableKeyboard(true) + MainPanel.filter_menu.Binding:SetMovable(false) + MainPanel.filter_menu.Binding:SetPoint("TOPLEFT", MainPanel.filter_menu, "TOPLEFT", 17, -16) + MainPanel.filter_menu.Binding:Hide() ------------------------------------------------------------------------------- -- () Crafted Item is Bind on Equip @@ -3016,30 +3009,30 @@ function addon:InitializeFrame() -- () Recipe is Bind on Equip -- () Recipe is Bind on Pickup ------------------------------------------------------------------------------- - local ARL_iBoECB = CreateFrame("CheckButton", "ARL_iBoECB", addon.Fly_Binding, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_iBoECB, addon.Fly_Binding, L["BOE_DESC"], "itemboe", 1, 1, 0) + local ARL_iBoECB = CreateFrame("CheckButton", "ARL_iBoECB", MainPanel.filter_menu.Binding, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_iBoECB, MainPanel.filter_menu.Binding, L["BOE_DESC"], "itemboe", 1, 1, 0) ARL_iBoECBText:SetText(L["BOEFilter"]) - local ARL_iBoPCB = CreateFrame("CheckButton", "ARL_iBoPCB", addon.Fly_Binding, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_iBoPCB, addon.Fly_Binding, L["BOP_DESC"], "itembop", 2, 1, 0) + local ARL_iBoPCB = CreateFrame("CheckButton", "ARL_iBoPCB", MainPanel.filter_menu.Binding, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_iBoPCB, MainPanel.filter_menu.Binding, L["BOP_DESC"], "itembop", 2, 1, 0) ARL_iBoPCBText:SetText(L["BOPFilter"]) - local ARL_rBoECB = CreateFrame("CheckButton", "ARL_rBoECB", addon.Fly_Binding, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_rBoECB, addon.Fly_Binding, L["RECIPE_BOE_DESC"], "recipeboe", 3, 1, 0) + local ARL_rBoECB = CreateFrame("CheckButton", "ARL_rBoECB", MainPanel.filter_menu.Binding, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_rBoECB, MainPanel.filter_menu.Binding, L["RECIPE_BOE_DESC"], "recipeboe", 3, 1, 0) ARL_rBoECBText:SetText(L["RecipeBOEFilter"]) - local ARL_rBoPCB = CreateFrame("CheckButton", "ARL_rBoPCB", addon.Fly_Binding, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_rBoPCB, addon.Fly_Binding, L["RECIPE_BOP_DESC"], "recipebop", 4, 1, 0) + local ARL_rBoPCB = CreateFrame("CheckButton", "ARL_rBoPCB", MainPanel.filter_menu.Binding, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_rBoPCB, MainPanel.filter_menu.Binding, L["RECIPE_BOP_DESC"], "recipebop", 4, 1, 0) ARL_rBoPCBText:SetText(L["RecipeBOPFilter"]) - addon.Fly_Item = CreateFrame("Frame", "ARL_Fly_Item", addon.Flyaway) - addon.Fly_Item:SetWidth(FLYAWAY_LARGE) - addon.Fly_Item:SetHeight(280) - addon.Fly_Item:EnableMouse(true) - addon.Fly_Item:EnableKeyboard(true) - addon.Fly_Item:SetMovable(false) - addon.Fly_Item:SetPoint("TOPLEFT", addon.Flyaway, "TOPLEFT", 17, -16) - addon.Fly_Item:Hide() + MainPanel.filter_menu.Item = CreateFrame("Frame", "ARL_FilterMenu_Item", MainPanel.filter_menu) + MainPanel.filter_menu.Item:SetWidth(FILTERMENU_LARGE) + MainPanel.filter_menu.Item:SetHeight(280) + MainPanel.filter_menu.Item:EnableMouse(true) + MainPanel.filter_menu.Item:EnableKeyboard(true) + MainPanel.filter_menu.Item:SetMovable(false) + MainPanel.filter_menu.Item:SetPoint("TOPLEFT", MainPanel.filter_menu, "TOPLEFT", 17, -16) + MainPanel.filter_menu.Item:Hide() ------------------------------------------------------------------------------- -- Armor: @@ -3049,8 +3042,8 @@ function addon:InitializeFrame() -- () Rings () Trinkets -- () Shield ------------------------------------------------------------------------------- - local ARL_ArmorButton = GenericCreateButton("ARL_ArmorButton", addon.Fly_Item, - 20, 105, "TOPLEFT", addon.Fly_Item, "TOPLEFT", -2, -4, "GameFontHighlight", + local ARL_ArmorButton = GenericCreateButton("ARL_ArmorButton", MainPanel.filter_menu.Item, + 20, 105, "TOPLEFT", MainPanel.filter_menu.Item, "TOPLEFT", -2, -4, "GameFontHighlight", "GameFontHighlightSmall", _G.ARMOR, "LEFT", L["ARMOR_TEXT_DESC"], 0) ARL_ArmorButton:SetText(_G.ARMOR_COLON) ARL_ArmorButton:SetHighlightTexture("Interface\\Buttons\\UI-PlusButton-Hilight") @@ -3086,40 +3079,40 @@ function addon:InitializeFrame() ReDisplay() end) - local ARL_ArmorClothCB = CreateFrame("CheckButton", "ARL_ArmorClothCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_ArmorClothCB, addon.Fly_Item, L["CLOTH_DESC"], "cloth", 2, 1, 0) + local ARL_ArmorClothCB = CreateFrame("CheckButton", "ARL_ArmorClothCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_ArmorClothCB, MainPanel.filter_menu.Item, L["CLOTH_DESC"], "cloth", 2, 1, 0) ARL_ArmorClothCBText:SetText(L["Cloth"]) - local ARL_ArmorLeatherCB = CreateFrame("CheckButton", "ARL_ArmorLeatherCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_ArmorLeatherCB, addon.Fly_Item, L["LEATHER_DESC"], "leather", 2, 2, 0) + local ARL_ArmorLeatherCB = CreateFrame("CheckButton", "ARL_ArmorLeatherCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_ArmorLeatherCB, MainPanel.filter_menu.Item, L["LEATHER_DESC"], "leather", 2, 2, 0) ARL_ArmorLeatherCBText:SetText(L["Leather"]) - local ARL_ArmorMailCB = CreateFrame("CheckButton", "ARL_ArmorMailCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_ArmorMailCB, addon.Fly_Item, L["MAIL_DESC"], "mail", 3, 1, 0) + local ARL_ArmorMailCB = CreateFrame("CheckButton", "ARL_ArmorMailCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_ArmorMailCB, MainPanel.filter_menu.Item, L["MAIL_DESC"], "mail", 3, 1, 0) ARL_ArmorMailCBText:SetText(L["Mail"]) - local ARL_ArmorPlateCB = CreateFrame("CheckButton", "ARL_ArmorPlateCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_ArmorPlateCB, addon.Fly_Item, L["PLATE_DESC"], "plate", 3, 2, 0) + local ARL_ArmorPlateCB = CreateFrame("CheckButton", "ARL_ArmorPlateCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_ArmorPlateCB, MainPanel.filter_menu.Item, L["PLATE_DESC"], "plate", 3, 2, 0) ARL_ArmorPlateCBText:SetText(L["Plate"]) - local ARL_ArmorCloakCB = CreateFrame("CheckButton", "ARL_ArmorCloakCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_ArmorCloakCB, addon.Fly_Item, L["CLOAK_DESC"], "cloak", 4, 1, 0) + local ARL_ArmorCloakCB = CreateFrame("CheckButton", "ARL_ArmorCloakCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_ArmorCloakCB, MainPanel.filter_menu.Item, L["CLOAK_DESC"], "cloak", 4, 1, 0) ARL_ArmorCloakCBText:SetText(L["Cloak"]) - local ARL_ArmorNecklaceCB = CreateFrame("CheckButton", "ARL_ArmorNecklaceCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_ArmorNecklaceCB, addon.Fly_Item, L["NECKLACE_DESC"], "necklace", 4, 2, 0) + local ARL_ArmorNecklaceCB = CreateFrame("CheckButton", "ARL_ArmorNecklaceCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_ArmorNecklaceCB, MainPanel.filter_menu.Item, L["NECKLACE_DESC"], "necklace", 4, 2, 0) ARL_ArmorNecklaceCBText:SetText(L["Necklace"]) - local ARL_ArmorRingCB = CreateFrame("CheckButton", "ARL_ArmorRingCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_ArmorRingCB, addon.Fly_Item, L["RING_DESC"], "ring", 5, 1, 0) + local ARL_ArmorRingCB = CreateFrame("CheckButton", "ARL_ArmorRingCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_ArmorRingCB, MainPanel.filter_menu.Item, L["RING_DESC"], "ring", 5, 1, 0) ARL_ArmorRingCBText:SetText(L["Ring"]) - local ARL_ArmorTrinketCB = CreateFrame("CheckButton", "ARL_ArmorTrinketCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_ArmorTrinketCB, addon.Fly_Item, L["TRINKET_DESC"], "trinket", 5, 2, 0) + local ARL_ArmorTrinketCB = CreateFrame("CheckButton", "ARL_ArmorTrinketCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_ArmorTrinketCB, MainPanel.filter_menu.Item, L["TRINKET_DESC"], "trinket", 5, 2, 0) ARL_ArmorTrinketCBText:SetText(L["Trinket"]) - local ARL_ArmorShieldCB = CreateFrame("CheckButton", "ARL_ArmorShieldCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_ArmorShieldCB, addon.Fly_Item, L["SHIELD_DESC"], "shield", 6, 1, 0) + local ARL_ArmorShieldCB = CreateFrame("CheckButton", "ARL_ArmorShieldCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_ArmorShieldCB, MainPanel.filter_menu.Item, L["SHIELD_DESC"], "shield", 6, 1, 0) ARL_ArmorShieldCBText:SetText(L["Shield"]) ------------------------------------------------------------------------------- @@ -3131,8 +3124,8 @@ function addon:InitializeFrame() -- () Bow () Crossbow -- () Staff () Fist ------------------------------------------------------------------------------- - local ARL_WeaponButton = GenericCreateButton("ARL_WeaponButton", addon.Fly_Item, - 20, 105, "TOPLEFT", addon.Fly_Item, "TOPLEFT", -2, -122, "GameFontHighlight", + local ARL_WeaponButton = GenericCreateButton("ARL_WeaponButton", MainPanel.filter_menu.Item, + 20, 105, "TOPLEFT", MainPanel.filter_menu.Item, "TOPLEFT", -2, -122, "GameFontHighlight", "GameFontHighlightSmall", L["Weapon"], "LEFT", L["WEAPON_TEXT_DESC"], 0) ARL_WeaponButton:SetText(L["Weapon"] .. ":") ARL_WeaponButton:SetHighlightTexture("Interface\\Buttons\\UI-PlusButton-Hilight") @@ -3171,144 +3164,144 @@ function addon:InitializeFrame() ReDisplay() end) - local ARL_Weapon1HCB = CreateFrame("CheckButton", "ARL_Weapon1HCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_Weapon1HCB, addon.Fly_Item, L["ONEHAND_DESC"], "onehand", 9, 1, 0) + local ARL_Weapon1HCB = CreateFrame("CheckButton", "ARL_Weapon1HCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_Weapon1HCB, MainPanel.filter_menu.Item, L["ONEHAND_DESC"], "onehand", 9, 1, 0) ARL_Weapon1HCBText:SetText(L["One Hand"]) - local ARL_Weapon2HCB = CreateFrame("CheckButton", "ARL_Weapon2HCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_Weapon2HCB, addon.Fly_Item, L["TWOHAND_DESC"], "twohand", 9, 2, 0) + local ARL_Weapon2HCB = CreateFrame("CheckButton", "ARL_Weapon2HCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_Weapon2HCB, MainPanel.filter_menu.Item, L["TWOHAND_DESC"], "twohand", 9, 2, 0) ARL_Weapon2HCBText:SetText(L["Two Hand"]) - local ARL_WeaponDaggerCB = CreateFrame("CheckButton", "ARL_WeaponDaggerCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponDaggerCB, addon.Fly_Item, L["DAGGER_DESC"], "dagger", 10, 1, 0) + local ARL_WeaponDaggerCB = CreateFrame("CheckButton", "ARL_WeaponDaggerCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponDaggerCB, MainPanel.filter_menu.Item, L["DAGGER_DESC"], "dagger", 10, 1, 0) ARL_WeaponDaggerCBText:SetText(L["Dagger"]) - local ARL_WeaponAxeCB = CreateFrame("CheckButton", "ARL_WeaponAxeCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponAxeCB, addon.Fly_Item, L["AXE_DESC"], "axe", 10, 2, 0) + local ARL_WeaponAxeCB = CreateFrame("CheckButton", "ARL_WeaponAxeCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponAxeCB, MainPanel.filter_menu.Item, L["AXE_DESC"], "axe", 10, 2, 0) ARL_WeaponAxeCBText:SetText(L["Axe"]) - local ARL_WeaponMaceCB = CreateFrame("CheckButton", "ARL_WeaponMaceCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponMaceCB, addon.Fly_Item, L["MACE_DESC"], "mace", 11, 1, 0) + local ARL_WeaponMaceCB = CreateFrame("CheckButton", "ARL_WeaponMaceCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponMaceCB, MainPanel.filter_menu.Item, L["MACE_DESC"], "mace", 11, 1, 0) ARL_WeaponMaceCBText:SetText(L["Mace"]) - local ARL_WeaponSwordCB = CreateFrame("CheckButton", "ARL_WeaponSwordCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponSwordCB, addon.Fly_Item, L["SWORD_DESC"], "sword", 11, 2, 0) + local ARL_WeaponSwordCB = CreateFrame("CheckButton", "ARL_WeaponSwordCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponSwordCB, MainPanel.filter_menu.Item, L["SWORD_DESC"], "sword", 11, 2, 0) ARL_WeaponSwordCBText:SetText(L["Sword"]) - local ARL_WeaponPolearmCB = CreateFrame("CheckButton", "ARL_WeaponPolearmCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponPolearmCB, addon.Fly_Item, L["POLEARM_DESC"], "polearm", 12, 1, 0) + local ARL_WeaponPolearmCB = CreateFrame("CheckButton", "ARL_WeaponPolearmCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponPolearmCB, MainPanel.filter_menu.Item, L["POLEARM_DESC"], "polearm", 12, 1, 0) ARL_WeaponPolearmCBText:SetText(L["Polearm"]) - local ARL_WeaponFistCB = CreateFrame("CheckButton", "ARL_WeaponFistCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponFistCB, addon.Fly_Item, L["FIST_DESC"], "fist", 12, 2, 0) + local ARL_WeaponFistCB = CreateFrame("CheckButton", "ARL_WeaponFistCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponFistCB, MainPanel.filter_menu.Item, L["FIST_DESC"], "fist", 12, 2, 0) ARL_WeaponFistCBText:SetText(L["Fist"]) - local ARL_WeaponStaffCB = CreateFrame("CheckButton", "ARL_WeaponStaffCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponStaffCB, addon.Fly_Item, L["STAFF_DESC"], "staff", 13, 1, 0) + local ARL_WeaponStaffCB = CreateFrame("CheckButton", "ARL_WeaponStaffCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponStaffCB, MainPanel.filter_menu.Item, L["STAFF_DESC"], "staff", 13, 1, 0) ARL_WeaponStaffCBText:SetText(L["Staff"]) ARL_WeaponStaffCBText:SetText(addon:Grey(L["Staff"])) ARL_WeaponStaffCB:Disable() - local ARL_WeaponWandCB = CreateFrame("CheckButton", "ARL_WeaponWandCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponWandCB, addon.Fly_Item, L["WAND_DESC"], "wand", 13, 2, 0) + local ARL_WeaponWandCB = CreateFrame("CheckButton", "ARL_WeaponWandCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponWandCB, MainPanel.filter_menu.Item, L["WAND_DESC"], "wand", 13, 2, 0) ARL_WeaponWandCBText:SetText(L["Wand"]) - local ARL_WeaponThrownCB = CreateFrame("CheckButton", "ARL_WeaponThrownCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponThrownCB, addon.Fly_Item, L["THROWN_DESC"], "thrown", 14, 1, 0) + local ARL_WeaponThrownCB = CreateFrame("CheckButton", "ARL_WeaponThrownCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponThrownCB, MainPanel.filter_menu.Item, L["THROWN_DESC"], "thrown", 14, 1, 0) ARL_WeaponThrownCBText:SetText(L["Thrown"]) - local ARL_WeaponBowCB = CreateFrame("CheckButton", "ARL_WeaponBowCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponBowCB, addon.Fly_Item, L["BOW_DESC"], "bow", 14, 2, 0) + local ARL_WeaponBowCB = CreateFrame("CheckButton", "ARL_WeaponBowCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponBowCB, MainPanel.filter_menu.Item, L["BOW_DESC"], "bow", 14, 2, 0) ARL_WeaponBowCBText:SetText(L["Bow"]) ARL_WeaponBowCBText:SetText(addon:Grey(L["Bow"])) ARL_WeaponBowCB:Disable() - local ARL_WeaponCrossbowCB = CreateFrame("CheckButton", "ARL_WeaponCrossbowCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponCrossbowCB, addon.Fly_Item, L["CROSSBOW_DESC"], "crossbow", 15, 1, 0) + local ARL_WeaponCrossbowCB = CreateFrame("CheckButton", "ARL_WeaponCrossbowCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponCrossbowCB, MainPanel.filter_menu.Item, L["CROSSBOW_DESC"], "crossbow", 15, 1, 0) ARL_WeaponCrossbowCBText:SetText(L["Crossbow"]) ARL_WeaponCrossbowCBText:SetText(addon:Grey(L["Crossbow"])) ARL_WeaponCrossbowCB:Disable() - local ARL_WeaponAmmoCB = CreateFrame("CheckButton", "ARL_WeaponAmmoCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponAmmoCB, addon.Fly_Item, L["AMMO_DESC"], "ammo", 15, 2, 0) + local ARL_WeaponAmmoCB = CreateFrame("CheckButton", "ARL_WeaponAmmoCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponAmmoCB, MainPanel.filter_menu.Item, L["AMMO_DESC"], "ammo", 15, 2, 0) ARL_WeaponAmmoCBText:SetText(L["Ammo"]) - local ARL_WeaponGunCB = CreateFrame("CheckButton", "ARL_WeaponGunCB", addon.Fly_Item, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WeaponGunCB, addon.Fly_Item, L["GUN_DESC"], "gun", 16, 1, 0) + local ARL_WeaponGunCB = CreateFrame("CheckButton", "ARL_WeaponGunCB", MainPanel.filter_menu.Item, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WeaponGunCB, MainPanel.filter_menu.Item, L["GUN_DESC"], "gun", 16, 1, 0) ARL_WeaponGunCBText:SetText(L["Gun"]) - addon.Fly_Player = CreateFrame("Frame", "ARL_Fly_Player", addon.Flyaway) - addon.Fly_Player:SetWidth(FLYAWAY_SMALL) - addon.Fly_Player:SetHeight(280) - addon.Fly_Player:EnableMouse(true) - addon.Fly_Player:EnableKeyboard(true) - addon.Fly_Player:SetMovable(false) - addon.Fly_Player:SetPoint("TOPLEFT", addon.Flyaway, "TOPLEFT", 17, -16) - addon.Fly_Player:Hide() - - local ARL_PlayerTankCB = CreateFrame("CheckButton", "ARL_PlayerTankCB", addon.Fly_Player, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_PlayerTankCB, addon.Fly_Player, L["TANKS_DESC"], "tank", 1, 1, 0) + MainPanel.filter_menu.Player = CreateFrame("Frame", "ARL_FilterMenu_Player", MainPanel.filter_menu) + MainPanel.filter_menu.Player:SetWidth(FILTERMENU_SMALL) + MainPanel.filter_menu.Player:SetHeight(280) + MainPanel.filter_menu.Player:EnableMouse(true) + MainPanel.filter_menu.Player:EnableKeyboard(true) + MainPanel.filter_menu.Player:SetMovable(false) + MainPanel.filter_menu.Player:SetPoint("TOPLEFT", MainPanel.filter_menu, "TOPLEFT", 17, -16) + MainPanel.filter_menu.Player:Hide() + + local ARL_PlayerTankCB = CreateFrame("CheckButton", "ARL_PlayerTankCB", MainPanel.filter_menu.Player, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_PlayerTankCB, MainPanel.filter_menu.Player, L["TANKS_DESC"], "tank", 1, 1, 0) ARL_PlayerTankCBText:SetText(_G.TANK) - local ARL_PlayerMeleeCB = CreateFrame("CheckButton", "ARL_PlayerMeleeCB", addon.Fly_Player, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_PlayerMeleeCB, addon.Fly_Player, L["MELEE_DPS_DESC"], "melee", 2, 1, 0) + local ARL_PlayerMeleeCB = CreateFrame("CheckButton", "ARL_PlayerMeleeCB", MainPanel.filter_menu.Player, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_PlayerMeleeCB, MainPanel.filter_menu.Player, L["MELEE_DPS_DESC"], "melee", 2, 1, 0) ARL_PlayerMeleeCBText:SetText(_G.MELEE) - local ARL_PlayerHealerCB = CreateFrame("CheckButton", "ARL_PlayerHealerCB", addon.Fly_Player, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_PlayerHealerCB, addon.Fly_Player, L["HEALERS_DESC"], "healer", 3, 1, 0) + local ARL_PlayerHealerCB = CreateFrame("CheckButton", "ARL_PlayerHealerCB", MainPanel.filter_menu.Player, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_PlayerHealerCB, MainPanel.filter_menu.Player, L["HEALERS_DESC"], "healer", 3, 1, 0) ARL_PlayerHealerCBText:SetText(_G.HEALER) - local ARL_PlayerCasterCB = CreateFrame("CheckButton", "ARL_PlayerCasterCB", addon.Fly_Player, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_PlayerCasterCB, addon.Fly_Player, L["CASTER_DPS_DESC"], "caster", 4, 1, 0) + local ARL_PlayerCasterCB = CreateFrame("CheckButton", "ARL_PlayerCasterCB", MainPanel.filter_menu.Player, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_PlayerCasterCB, MainPanel.filter_menu.Player, L["CASTER_DPS_DESC"], "caster", 4, 1, 0) ARL_PlayerCasterCBText:SetText(_G.DAMAGER) - addon.Fly_Rep = CreateFrame("Frame", "ARL_Fly_Rep", addon.Flyaway) - addon.Fly_Rep:SetWidth(FLYAWAY_SMALL) - addon.Fly_Rep:SetHeight(280) - addon.Fly_Rep:EnableMouse(true) - addon.Fly_Rep:EnableKeyboard(true) - addon.Fly_Rep:SetMovable(false) - addon.Fly_Rep:SetPoint("TOPLEFT", addon.Flyaway, "TOPLEFT", 17, -16) - addon.Fly_Rep:Hide() + MainPanel.filter_menu.Rep = CreateFrame("Frame", "ARL_FilterMenu_Rep", MainPanel.filter_menu) + MainPanel.filter_menu.Rep:SetWidth(FILTERMENU_SMALL) + MainPanel.filter_menu.Rep:SetHeight(280) + MainPanel.filter_menu.Rep:EnableMouse(true) + MainPanel.filter_menu.Rep:EnableKeyboard(true) + MainPanel.filter_menu.Rep:SetMovable(false) + MainPanel.filter_menu.Rep:SetPoint("TOPLEFT", MainPanel.filter_menu, "TOPLEFT", 17, -16) + MainPanel.filter_menu.Rep:Hide() do -- Rep Filtering panel switcher local function RepFilterSwitch(whichrep) - -- 1 ARL_RepOldWorldCB Old World Rep - -- 2 ARL_RepBCCB Burning Crusade - -- 3 ARL_RepLKCB Wrath of the Lich King + -- 1 ARL_Rep_ClassicCB Old World Rep + -- 2 ARL_Rep_BCCB Burning Crusade + -- 3 ARL_Rep_LKCB Wrath of the Lich King local ShowPanel = false if whichrep == 1 then - if ARL_RepOldWorldCB:GetChecked() then + if ARL_Rep_ClassicCB:GetChecked() then ShowPanel = true - addon.Fly_Rep_OW:Show() - addon.Fly_Rep_BC:Hide() - addon.Fly_Rep_LK:Hide() - ARL_RepBCCB:SetChecked(false) - ARL_RepLKCB:SetChecked(false) + MainPanel.filter_menu.Rep.Classic:Show() + MainPanel.filter_menu.Rep.BC:Hide() + MainPanel.filter_menu.Rep.LK:Hide() + ARL_Rep_BCCB:SetChecked(false) + ARL_Rep_LKCB:SetChecked(false) else ShowPanel = false end elseif whichrep == 2 then - if ARL_RepBCCB:GetChecked() then + if ARL_Rep_BCCB:GetChecked() then ShowPanel = true - addon.Fly_Rep_OW:Hide() - addon.Fly_Rep_BC:Show() - addon.Fly_Rep_LK:Hide() - ARL_RepOldWorldCB:SetChecked(false) - ARL_RepLKCB:SetChecked(false) + MainPanel.filter_menu.Rep.Classic:Hide() + MainPanel.filter_menu.Rep.BC:Show() + MainPanel.filter_menu.Rep.LK:Hide() + ARL_Rep_ClassicCB:SetChecked(false) + ARL_Rep_LKCB:SetChecked(false) else ShowPanel = false end else -- whichrep == 3 (WotLK) - if ARL_RepLKCB:GetChecked() then + if ARL_Rep_LKCB:GetChecked() then ShowPanel = true - addon.Fly_Rep_OW:Hide() - addon.Fly_Rep_BC:Hide() - addon.Fly_Rep_LK:Show() - ARL_RepOldWorldCB:SetChecked(false) - ARL_RepBCCB:SetChecked(false) + MainPanel.filter_menu.Rep.Classic:Hide() + MainPanel.filter_menu.Rep.BC:Hide() + MainPanel.filter_menu.Rep.LK:Show() + ARL_Rep_ClassicCB:SetChecked(false) + ARL_Rep_BCCB:SetChecked(false) else ShowPanel = false end @@ -3316,60 +3309,69 @@ function addon:InitializeFrame() if ShowPanel then addon.flyTexture:ClearAllPoints() - addon.Flyaway:SetWidth(FLYAWAY_DOUBLE_WIDTH) + MainPanel.filter_menu:SetWidth(FILTERMENU_DOUBLE_WIDTH) addon.flyTexture:SetTexture([[Interface\Addons\AckisRecipeList\img\fly_repcol]]) - addon.flyTexture:SetAllPoints(addon.Flyaway) - addon.flyTexture:SetTexCoord(0, (FLYAWAY_DOUBLE_WIDTH/512), 0, (FLYAWAY_HEIGHT/512)) + addon.flyTexture:SetAllPoints(MainPanel.filter_menu) + addon.flyTexture:SetTexCoord(0, (FILTERMENU_DOUBLE_WIDTH/512), 0, (FILTERMENU_HEIGHT/512)) - addon.Fly_Rep_OW:SetPoint("TOPRIGHT", addon.Flyaway, "TOPRIGHT", -7, -14) - addon.Fly_Rep_BC:SetPoint("TOPRIGHT", addon.Flyaway, "TOPRIGHT", -7, -14) - addon.Fly_Rep_LK:SetPoint("TOPRIGHT", addon.Flyaway, "TOPRIGHT", -7, -14) + MainPanel.filter_menu.Rep.Classic:SetPoint("TOPRIGHT", MainPanel.filter_menu, "TOPRIGHT", -7, -14) + MainPanel.filter_menu.Rep.BC:SetPoint("TOPRIGHT", MainPanel.filter_menu, "TOPRIGHT", -7, -14) + MainPanel.filter_menu.Rep.LK:SetPoint("TOPRIGHT", MainPanel.filter_menu, "TOPRIGHT", -7, -14) else addon.flyTexture:ClearAllPoints() - addon.Flyaway:SetWidth(FLYAWAY_SINGLE_WIDTH) + MainPanel.filter_menu:SetWidth(FILTERMENU_SINGLE_WIDTH) addon.flyTexture:SetTexture([[Interface\Addons\AckisRecipeList\img\fly_1col]]) - addon.flyTexture:SetAllPoints(addon.Flyaway) - addon.flyTexture:SetTexCoord(0, (FLYAWAY_SINGLE_WIDTH/256), 0, (FLYAWAY_HEIGHT/512)) - addon.Fly_Rep_OW:Hide() - addon.Fly_Rep_BC:Hide() - addon.Fly_Rep_LK:Hide() - ARL_RepOldWorldCB:SetChecked(false) - ARL_RepBCCB:SetChecked(false) - ARL_RepLKCB:SetChecked(false) + addon.flyTexture:SetAllPoints(MainPanel.filter_menu) + addon.flyTexture:SetTexCoord(0, (FILTERMENU_SINGLE_WIDTH/256), 0, (FILTERMENU_HEIGHT/512)) + MainPanel.filter_menu.Rep.Classic:Hide() + MainPanel.filter_menu.Rep.BC:Hide() + MainPanel.filter_menu.Rep.LK:Hide() + ARL_Rep_ClassicCB:SetChecked(false) + ARL_Rep_BCCB:SetChecked(false) + ARL_Rep_LKCB:SetChecked(false) end end - ARL_RepOldWorldCB = CreateExpandedPanelCheckButton("ARL_RepOldWorldCB", "Glues-WoW-Logo", 1) - ARL_RepOldWorldCB:SetPoint("TOPLEFT", addon.Fly_Rep, "TOPLEFT", 0, -10) - ARL_RepOldWorldCB:SetScript("OnClick", function() RepFilterSwitch(1) end) - - ARL_RepBCCB = CreateExpandedPanelCheckButton("ARL_RepBCCB", "GLUES-WOW-BCLOGO", 1) - ARL_RepBCCB:SetPoint("TOPLEFT", addon.Fly_Rep, "TOPLEFT", 0, -60) - ARL_RepBCCB:SetScript("OnClick", function() RepFilterSwitch(2) end) - - ARL_RepLKCB = CreateExpandedPanelCheckButton("ARL_RepLKCB", "wotlk_logo", 1) - ARL_RepLKCB:SetPoint("TOPLEFT", addon.Fly_Rep, "TOPLEFT", 0, -110) - ARL_RepLKCB:SetScript("OnClick", function() RepFilterSwitch(3) end) + ARL_Rep_ClassicCB = CreateExpandedPanelCheckButton("ARL_Rep_ClassicCB", "Glues-WoW-Logo", 1) + ARL_Rep_ClassicCB:SetPoint("TOPLEFT", MainPanel.filter_menu.Rep, "TOPLEFT", 0, -10) + ARL_Rep_ClassicCB:SetScript("OnClick", + function() + RepFilterSwitch(1) + end) + + ARL_Rep_BCCB = CreateExpandedPanelCheckButton("ARL_Rep_BCCB", "GLUES-WOW-BCLOGO", 1) + ARL_Rep_BCCB:SetPoint("TOPLEFT", MainPanel.filter_menu.Rep, "TOPLEFT", 0, -60) + ARL_Rep_BCCB:SetScript("OnClick", + function() + RepFilterSwitch(2) + end) + + ARL_Rep_LKCB = CreateExpandedPanelCheckButton("ARL_Rep_LKCB", "wotlk_logo", 1) + ARL_Rep_LKCB:SetPoint("TOPLEFT", MainPanel.filter_menu.Rep, "TOPLEFT", 0, -110) + ARL_Rep_LKCB:SetScript("OnClick", + function() + RepFilterSwitch(3) + end) end ------------------------------------------------------------------------------- -- Original Reputations ------------------------------------------------------------------------------- - addon.Fly_Rep_OW = CreateFrame("Frame", "ARL_Fly_Rep_OW", addon.Fly_Rep) - addon.Fly_Rep_OW:SetWidth(150) - addon.Fly_Rep_OW:SetHeight(280) - addon.Fly_Rep_OW:EnableMouse(true) - addon.Fly_Rep_OW:EnableKeyboard(true) - addon.Fly_Rep_OW:SetMovable(false) - addon.Fly_Rep_OW:SetPoint("TOPRIGHT", addon.Flyaway, "TOPRIGHT", -7, -16) - addon.Fly_Rep_OW:Hide() - - local ARL_Rep_OWButton = GenericCreateButton("ARL_Rep_OWButton", addon.Fly_Rep_OW, - 20, 140, "TOPLEFT", addon.Fly_Rep_OW, "TOPLEFT", -2, -4, "GameFontHighlight", + MainPanel.filter_menu.Rep.Classic = CreateFrame("Frame", "ARL_FilterMenu_Rep_Classic", MainPanel.filter_menu.Rep) + MainPanel.filter_menu.Rep.Classic:SetWidth(150) + MainPanel.filter_menu.Rep.Classic:SetHeight(280) + MainPanel.filter_menu.Rep.Classic:EnableMouse(true) + MainPanel.filter_menu.Rep.Classic:EnableKeyboard(true) + MainPanel.filter_menu.Rep.Classic:SetMovable(false) + MainPanel.filter_menu.Rep.Classic:SetPoint("TOPRIGHT", MainPanel.filter_menu, "TOPRIGHT", -7, -16) + MainPanel.filter_menu.Rep.Classic:Hide() + + local ARL_Rep_ClassicButton = GenericCreateButton("ARL_Rep_ClassicButton", MainPanel.filter_menu.Rep.Classic, + 20, 140, "TOPLEFT", MainPanel.filter_menu.Rep.Classic, "TOPLEFT", -2, -4, "GameFontHighlight", "GameFontHighlightSmall", _G.REPUTATION, "LEFT", L["REP_TEXT_DESC"], 0) - ARL_Rep_OWButton:SetText(_G.REPUTATION .. ":") - ARL_Rep_OWButton:SetHighlightTexture("Interface\\Buttons\\UI-PlusButton-Hilight") - ARL_Rep_OWButton:RegisterForClicks("LeftButtonUp", "RightButtonUp") - ARL_Rep_OWButton:SetScript("OnClick", + ARL_Rep_ClassicButton:SetText(_G.REPUTATION .. ":") + ARL_Rep_ClassicButton:SetHighlightTexture("Interface\\Buttons\\UI-PlusButton-Hilight") + ARL_Rep_ClassicButton:RegisterForClicks("LeftButtonUp", "RightButtonUp") + ARL_Rep_ClassicButton:SetScript("OnClick", function(self,button) local filterdb = addon.db.profile.filters.rep if button == "LeftButton" then @@ -3399,45 +3401,45 @@ function addon:InitializeFrame() ReDisplay() end) - local ARL_RepArgentDawnCB = CreateFrame("CheckButton", "ARL_RepArgentDawnCB", addon.Fly_Rep_OW, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepArgentDawnCB, addon.Fly_Rep_OW,sformat(L["SPECIFIC_REP_DESC"], BFAC["Argent Dawn"]), "argentdawn", 2, 1, 0) + local ARL_RepArgentDawnCB = CreateFrame("CheckButton", "ARL_RepArgentDawnCB", MainPanel.filter_menu.Rep.Classic, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepArgentDawnCB, MainPanel.filter_menu.Rep.Classic,sformat(L["SPECIFIC_REP_DESC"], BFAC["Argent Dawn"]), "argentdawn", 2, 1, 0) ARL_RepArgentDawnCBText:SetText(BFAC["Argent Dawn"]) ARL_RepArgentDawnCBText:SetFont(narrowFont, 11) - local ARL_RepCenarionCircleCB = CreateFrame("CheckButton", "ARL_RepCenarionCircleCB", addon.Fly_Rep_OW, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepCenarionCircleCB, addon.Fly_Rep_OW,sformat(L["SPECIFIC_REP_DESC"], BFAC["Cenarion Circle"]), "cenarioncircle", 3, 1, 0) + local ARL_RepCenarionCircleCB = CreateFrame("CheckButton", "ARL_RepCenarionCircleCB", MainPanel.filter_menu.Rep.Classic, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepCenarionCircleCB, MainPanel.filter_menu.Rep.Classic,sformat(L["SPECIFIC_REP_DESC"], BFAC["Cenarion Circle"]), "cenarioncircle", 3, 1, 0) ARL_RepCenarionCircleCBText:SetText(BFAC["Cenarion Circle"]) ARL_RepCenarionCircleCBText:SetFont(narrowFont, 11) - local ARL_RepThoriumCB = CreateFrame("CheckButton", "ARL_RepThoriumCB", addon.Fly_Rep_OW, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepThoriumCB, addon.Fly_Rep_OW,sformat(L["SPECIFIC_REP_DESC"], BFAC["Thorium Brotherhood"]), "thoriumbrotherhood", 4, 1, 0) + local ARL_RepThoriumCB = CreateFrame("CheckButton", "ARL_RepThoriumCB", MainPanel.filter_menu.Rep.Classic, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepThoriumCB, MainPanel.filter_menu.Rep.Classic,sformat(L["SPECIFIC_REP_DESC"], BFAC["Thorium Brotherhood"]), "thoriumbrotherhood", 4, 1, 0) ARL_RepThoriumCBText:SetText(BFAC["Thorium Brotherhood"]) ARL_RepThoriumCBText:SetFont(narrowFont, 11) - local ARL_RepTimbermawCB = CreateFrame("CheckButton", "ARL_RepTimbermawCB", addon.Fly_Rep_OW, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepTimbermawCB, addon.Fly_Rep_OW,sformat(L["SPECIFIC_REP_DESC"], BFAC["Timbermaw Hold"]), "timbermaw", 5, 1, 0) + local ARL_RepTimbermawCB = CreateFrame("CheckButton", "ARL_RepTimbermawCB", MainPanel.filter_menu.Rep.Classic, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepTimbermawCB, MainPanel.filter_menu.Rep.Classic,sformat(L["SPECIFIC_REP_DESC"], BFAC["Timbermaw Hold"]), "timbermaw", 5, 1, 0) ARL_RepTimbermawCBText:SetText(BFAC["Timbermaw Hold"]) ARL_RepTimbermawCBText:SetFont(narrowFont, 11) - local ARL_RepZandalarCB = CreateFrame("CheckButton", "ARL_RepZandalarCB", addon.Fly_Rep_OW, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepZandalarCB, addon.Fly_Rep_OW,sformat(L["SPECIFIC_REP_DESC"], BFAC["Zandalar Tribe"]), "zandalar", 6, 1, 0) + local ARL_RepZandalarCB = CreateFrame("CheckButton", "ARL_RepZandalarCB", MainPanel.filter_menu.Rep.Classic, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepZandalarCB, MainPanel.filter_menu.Rep.Classic,sformat(L["SPECIFIC_REP_DESC"], BFAC["Zandalar Tribe"]), "zandalar", 6, 1, 0) ARL_RepZandalarCBText:SetText(BFAC["Zandalar Tribe"]) ARL_RepZandalarCBText:SetFont(narrowFont, 11) ------------------------------------------------------------------------------- -- The Burning Crusade Reputations ------------------------------------------------------------------------------- - addon.Fly_Rep_BC = CreateFrame("Frame", "ARL_Fly_Rep_BC", addon.Fly_Rep) - addon.Fly_Rep_BC:SetWidth(150) - addon.Fly_Rep_BC:SetHeight(280) - addon.Fly_Rep_BC:EnableMouse(true) - addon.Fly_Rep_BC:EnableKeyboard(true) - addon.Fly_Rep_BC:SetMovable(false) - addon.Fly_Rep_BC:SetPoint("TOPRIGHT", addon.Flyaway, "TOPRIGHT", -7, -16) - addon.Fly_Rep_BC:Hide() - - local ARL_Rep_BCButton = GenericCreateButton("ARL_Rep_OWButton", addon.Fly_Rep_BC, - 20, 140, "TOPLEFT", addon.Fly_Rep_BC, "TOPLEFT", -2, -4, "GameFontHighlight", + MainPanel.filter_menu.Rep.BC = CreateFrame("Frame", "ARL_FilterMenu_Rep_BC", MainPanel.filter_menu.Rep) + MainPanel.filter_menu.Rep.BC:SetWidth(150) + MainPanel.filter_menu.Rep.BC:SetHeight(280) + MainPanel.filter_menu.Rep.BC:EnableMouse(true) + MainPanel.filter_menu.Rep.BC:EnableKeyboard(true) + MainPanel.filter_menu.Rep.BC:SetMovable(false) + MainPanel.filter_menu.Rep.BC:SetPoint("TOPRIGHT", MainPanel.filter_menu, "TOPRIGHT", -7, -16) + MainPanel.filter_menu.Rep.BC:Hide() + + local ARL_Rep_BCButton = GenericCreateButton("ARL_Rep_ClassicButton", MainPanel.filter_menu.Rep.BC, + 20, 140, "TOPLEFT", MainPanel.filter_menu.Rep.BC, "TOPLEFT", -2, -4, "GameFontHighlight", "GameFontHighlightSmall", _G.REPUTATION, "LEFT", L["REP_TEXT_DESC"], 0) ARL_Rep_BCButton:SetText(_G.REPUTATION .. ":") ARL_Rep_BCButton:SetHighlightTexture("Interface\\Buttons\\UI-PlusButton-Hilight") @@ -3499,90 +3501,90 @@ function addon:InitializeFrame() ReDisplay() end) - local ARL_RepAldorCB = CreateFrame("CheckButton", "ARL_RepAldorCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepAldorCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Aldor"]), "aldor", 2, 1, 0) + local ARL_RepAldorCB = CreateFrame("CheckButton", "ARL_RepAldorCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepAldorCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Aldor"]), "aldor", 2, 1, 0) ARL_RepAldorCBText:SetText(BFAC["The Aldor"]) ARL_RepAldorCBText:SetFont(narrowFont, 11) - local ARL_RepAshtongueCB = CreateFrame("CheckButton", "ARL_RepAshtongueCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepAshtongueCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["Ashtongue Deathsworn"]), "ashtonguedeathsworn", 3, 1, 0) + local ARL_RepAshtongueCB = CreateFrame("CheckButton", "ARL_RepAshtongueCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepAshtongueCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["Ashtongue Deathsworn"]), "ashtonguedeathsworn", 3, 1, 0) ARL_RepAshtongueCBText:SetText(BFAC["Ashtongue Deathsworn"]) ARL_RepAshtongueCBText:SetFont(narrowFont, 11) - local ARL_RepCenarionExpeditionCB = CreateFrame("CheckButton", "ARL_RepCenarionExpeditionCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepCenarionExpeditionCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["Cenarion Expedition"]), "cenarionexpedition", 4, 1, 0) + local ARL_RepCenarionExpeditionCB = CreateFrame("CheckButton", "ARL_RepCenarionExpeditionCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepCenarionExpeditionCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["Cenarion Expedition"]), "cenarionexpedition", 4, 1, 0) ARL_RepCenarionExpeditionCBText:SetText(BFAC["Cenarion Expedition"]) ARL_RepCenarionExpeditionCBText:SetFont(narrowFont, 11) - local ARL_RepConsortiumCB = CreateFrame("CheckButton", "ARL_RepConsortiumCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepConsortiumCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Consortium"]), "consortium", 5, 1, 0) + local ARL_RepConsortiumCB = CreateFrame("CheckButton", "ARL_RepConsortiumCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepConsortiumCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Consortium"]), "consortium", 5, 1, 0) ARL_RepConsortiumCBText:SetText(BFAC["The Consortium"]) ARL_RepConsortiumCBText:SetFont(narrowFont, 11) - local ARL_RepHonorHoldCB = CreateFrame("CheckButton", "ARL_RepHonorHoldCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepHonorHoldCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], HonorHold_Thrallmar_FactionText), "hellfire", 6, 1, 0) + local ARL_RepHonorHoldCB = CreateFrame("CheckButton", "ARL_RepHonorHoldCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepHonorHoldCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], HonorHold_Thrallmar_FactionText), "hellfire", 6, 1, 0) ARL_RepHonorHoldCBText:SetText(HonorHold_Thrallmar_FactionText) ARL_RepHonorHoldCBText:SetFont(narrowFont, 11) - local ARL_RepKeepersOfTimeCB = CreateFrame("CheckButton", "ARL_RepKeepersOfTimeCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepKeepersOfTimeCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["Keepers of Time"]), "keepersoftime", 7, 1, 0) + local ARL_RepKeepersOfTimeCB = CreateFrame("CheckButton", "ARL_RepKeepersOfTimeCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepKeepersOfTimeCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["Keepers of Time"]), "keepersoftime", 7, 1, 0) ARL_RepKeepersOfTimeCBText:SetText(BFAC["Keepers of Time"]) ARL_RepKeepersOfTimeCBText:SetFont(narrowFont, 11) - local ARL_RepKurenaiCB = CreateFrame("CheckButton", "ARL_RepKurenaiCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepKurenaiCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], Kurenai_Maghar_FactionText), "nagrand", 8, 1, 0) + local ARL_RepKurenaiCB = CreateFrame("CheckButton", "ARL_RepKurenaiCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepKurenaiCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], Kurenai_Maghar_FactionText), "nagrand", 8, 1, 0) ARL_RepKurenaiCBText:SetText(Kurenai_Maghar_FactionText) ARL_RepKurenaiCBText:SetFont(narrowFont, 11) - local ARL_RepLowerCityCB = CreateFrame("CheckButton", "ARL_RepLowerCityCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepLowerCityCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["Lower City"]), "lowercity", 9, 1, 0) + local ARL_RepLowerCityCB = CreateFrame("CheckButton", "ARL_RepLowerCityCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepLowerCityCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["Lower City"]), "lowercity", 9, 1, 0) ARL_RepLowerCityCBText:SetText(BFAC["Lower City"]) ARL_RepLowerCityCBText:SetFont(narrowFont, 11) - local ARL_RepScaleSandsCB = CreateFrame("CheckButton", "ARL_RepScaleSandsCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepScaleSandsCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Scale of the Sands"]), "scaleofthesands", 10, 1, 0) + local ARL_RepScaleSandsCB = CreateFrame("CheckButton", "ARL_RepScaleSandsCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepScaleSandsCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Scale of the Sands"]), "scaleofthesands", 10, 1, 0) ARL_RepScaleSandsCBText:SetText(BFAC["The Scale of the Sands"]) ARL_RepScaleSandsCBText:SetFont(narrowFont, 11) - local ARL_RepScryersCB = CreateFrame("CheckButton", "ARL_RepScryersCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepScryersCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Scryers"]), "scryer", 11, 1, 0) + local ARL_RepScryersCB = CreateFrame("CheckButton", "ARL_RepScryersCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepScryersCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Scryers"]), "scryer", 11, 1, 0) ARL_RepScryersCBText:SetText(BFAC["The Scryers"]) ARL_RepScryersCBText:SetFont(narrowFont, 11) - local ARL_RepShatarCB = CreateFrame("CheckButton", "ARL_RepShatarCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepShatarCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Sha'tar"]), "shatar", 12, 1, 0) + local ARL_RepShatarCB = CreateFrame("CheckButton", "ARL_RepShatarCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepShatarCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Sha'tar"]), "shatar", 12, 1, 0) ARL_RepShatarCBText:SetText(BFAC["The Sha'tar"]) ARL_RepShatarCBText:SetFont(narrowFont, 11) - local ARL_RepShatteredSunCB = CreateFrame("CheckButton", "ARL_RepShatteredSunCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepShatteredSunCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["Shattered Sun Offensive"]), "shatteredsun", 13, 1, 0) + local ARL_RepShatteredSunCB = CreateFrame("CheckButton", "ARL_RepShatteredSunCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepShatteredSunCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["Shattered Sun Offensive"]), "shatteredsun", 13, 1, 0) ARL_RepShatteredSunCBText:SetText(BFAC["Shattered Sun Offensive"]) ARL_RepShatteredSunCBText:SetFont(narrowFont, 11) - local ARL_RepSporeggarCB = CreateFrame("CheckButton", "ARL_RepSporeggarCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepSporeggarCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["Sporeggar"]), "sporeggar", 14, 1, 0) + local ARL_RepSporeggarCB = CreateFrame("CheckButton", "ARL_RepSporeggarCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepSporeggarCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["Sporeggar"]), "sporeggar", 14, 1, 0) ARL_RepSporeggarCBText:SetText(BFAC["Sporeggar"]) ARL_RepSporeggarCBText:SetFont(narrowFont, 11) - local ARL_RepVioletEyeCB = CreateFrame("CheckButton", "ARL_RepVioletEyeCB", addon.Fly_Rep_BC, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepVioletEyeCB, addon.Fly_Rep_BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Violet Eye"]), "violeteye", 15, 1, 0) + local ARL_RepVioletEyeCB = CreateFrame("CheckButton", "ARL_RepVioletEyeCB", MainPanel.filter_menu.Rep.BC, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepVioletEyeCB, MainPanel.filter_menu.Rep.BC,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Violet Eye"]), "violeteye", 15, 1, 0) ARL_RepVioletEyeCBText:SetText(BFAC["The Violet Eye"]) ARL_RepVioletEyeCBText:SetFont(narrowFont, 11) ------------------------------------------------------------------------------- -- Wrath of the Lich King Reputations ------------------------------------------------------------------------------- - addon.Fly_Rep_LK= CreateFrame("Frame", "ARL_Fly_Rep_LK", addon.Fly_Rep) - addon.Fly_Rep_LK:SetWidth(150) - addon.Fly_Rep_LK:SetHeight(280) - addon.Fly_Rep_LK:EnableMouse(true) - addon.Fly_Rep_LK:EnableKeyboard(true) - addon.Fly_Rep_LK:SetMovable(false) - addon.Fly_Rep_LK:SetPoint("TOPRIGHT", addon.Flyaway, "TOPRIGHT", -7, -16) - addon.Fly_Rep_LK:Hide() - - local ARL_Rep_LKButton = GenericCreateButton("ARL_Rep_OWButton", addon.Fly_Rep_LK, - 20, 140, "TOPLEFT", addon.Fly_Rep_LK, "TOPLEFT", -2, -4, "GameFontHighlight", + MainPanel.filter_menu.Rep.LK = CreateFrame("Frame", "ARL_FilterMenu_Rep_LK", MainPanel.filter_menu.Rep) + MainPanel.filter_menu.Rep.LK:SetWidth(150) + MainPanel.filter_menu.Rep.LK:SetHeight(280) + MainPanel.filter_menu.Rep.LK:EnableMouse(true) + MainPanel.filter_menu.Rep.LK:EnableKeyboard(true) + MainPanel.filter_menu.Rep.LK:SetMovable(false) + MainPanel.filter_menu.Rep.LK:SetPoint("TOPRIGHT", MainPanel.filter_menu, "TOPRIGHT", -7, -16) + MainPanel.filter_menu.Rep.LK:Hide() + + local ARL_Rep_LKButton = GenericCreateButton("ARL_Rep_ClassicButton", MainPanel.filter_menu.Rep.LK, + 20, 140, "TOPLEFT", MainPanel.filter_menu.Rep.LK, "TOPLEFT", -2, -4, "GameFontHighlight", "GameFontHighlightSmall", _G.REPUTATION, "LEFT", L["REP_TEXT_DESC"], 0) ARL_Rep_LKButton:SetText(_G.REPUTATION .. ":") ARL_Rep_LKButton:SetHighlightTexture("Interface\\Buttons\\UI-PlusButton-Hilight") @@ -3632,115 +3634,115 @@ function addon:InitializeFrame() ReDisplay() end) - local ARL_WrathCommon1CB = CreateFrame("CheckButton", "ARL_WrathCommon1CB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WrathCommon1CB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], Vanguard_Expedition_FactionText), "wrathcommon1", 2, 1, 0) + local ARL_WrathCommon1CB = CreateFrame("CheckButton", "ARL_WrathCommon1CB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WrathCommon1CB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], Vanguard_Expedition_FactionText), "wrathcommon1", 2, 1, 0) ARL_WrathCommon1CBText:SetText(Vanguard_Expedition_FactionText) ARL_WrathCommon1CBText:SetFont(narrowFont, 11) - local ARL_RepArgentCrusadeCB = CreateFrame("CheckButton", "ARL_RepArgentCrusadeCB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepArgentCrusadeCB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["Argent Crusade"]), "argentcrusade", 3, 1, 0) + local ARL_RepArgentCrusadeCB = CreateFrame("CheckButton", "ARL_RepArgentCrusadeCB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepArgentCrusadeCB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["Argent Crusade"]), "argentcrusade", 3, 1, 0) ARL_RepArgentCrusadeCBText:SetText(BFAC["Argent Crusade"]) ARL_RepArgentCrusadeCBText:SetFont(narrowFont, 11) - local ARL_WrathCommon5CB = CreateFrame("CheckButton", "ARL_WrathCommon5CB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WrathCommon5CB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], Explorer_Hand_FactionText), "wrathcommon5", 4, 1, 0) + local ARL_WrathCommon5CB = CreateFrame("CheckButton", "ARL_WrathCommon5CB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WrathCommon5CB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], Explorer_Hand_FactionText), "wrathcommon5", 4, 1, 0) ARL_WrathCommon5CBText:SetText(Explorer_Hand_FactionText) ARL_WrathCommon5CBText:SetFont(narrowFont, 11) ARL_WrathCommon5CBText:SetText(addon:Grey(Explorer_Hand_FactionText)) ARL_WrathCommon5CB:Disable() - local ARL_RepFrenzyheartCB = CreateFrame("CheckButton", "ARL_RepFrenzyheartCB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepFrenzyheartCB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["Frenzyheart Tribe"]), "frenzyheart", 5, 1, 0) + local ARL_RepFrenzyheartCB = CreateFrame("CheckButton", "ARL_RepFrenzyheartCB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepFrenzyheartCB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["Frenzyheart Tribe"]), "frenzyheart", 5, 1, 0) ARL_RepFrenzyheartCBText:SetText(BFAC["Frenzyheart Tribe"]) ARL_RepFrenzyheartCBText:SetFont(narrowFont, 11) - local ARL_RepKaluakCB = CreateFrame("CheckButton", "ARL_RepKaluakCB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepKaluakCB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Kalu'ak"]), "kaluak", 6, 1, 0) + local ARL_RepKaluakCB = CreateFrame("CheckButton", "ARL_RepKaluakCB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepKaluakCB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Kalu'ak"]), "kaluak", 6, 1, 0) ARL_RepKaluakCBText:SetText(BFAC["The Kalu'ak"]) ARL_RepKaluakCBText:SetFont(narrowFont, 11) - local ARL_RepKirinTorCB = CreateFrame("CheckButton", "ARL_RepKirinTorCB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepKirinTorCB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["Kirin Tor"]), "kirintor", 7, 1, 0) + local ARL_RepKirinTorCB = CreateFrame("CheckButton", "ARL_RepKirinTorCB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepKirinTorCB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["Kirin Tor"]), "kirintor", 7, 1, 0) ARL_RepKirinTorCBText:SetText(BFAC["Kirin Tor"]) ARL_RepKirinTorCBText:SetFont(narrowFont, 11) - local ARL_RepEbonBladeCB = CreateFrame("CheckButton", "ARL_RepEbonBladeCB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepEbonBladeCB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["Knights of the Ebon Blade"]), "ebonblade", 8, 1, 0) + local ARL_RepEbonBladeCB = CreateFrame("CheckButton", "ARL_RepEbonBladeCB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepEbonBladeCB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["Knights of the Ebon Blade"]), "ebonblade", 8, 1, 0) ARL_RepEbonBladeCBText:SetText(BFAC["Knights of the Ebon Blade"]) ARL_RepEbonBladeCBText:SetFont(narrowFont, 11) - local ARL_RepOraclesCB = CreateFrame("CheckButton", "ARL_RepOraclesCB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepOraclesCB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Oracles"]), "oracles", 9, 1, 0) + local ARL_RepOraclesCB = CreateFrame("CheckButton", "ARL_RepOraclesCB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepOraclesCB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Oracles"]), "oracles", 9, 1, 0) ARL_RepOraclesCBText:SetText(BFAC["The Oracles"]) ARL_RepOraclesCBText:SetFont(narrowFont, 11) - local ARL_WrathCommon2CB = CreateFrame("CheckButton", "ARL_WrathCommon2CB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WrathCommon2CB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], SilverConv_Sunreaver_FactionText), "wrathcommon2", 10, 1, 0) + local ARL_WrathCommon2CB = CreateFrame("CheckButton", "ARL_WrathCommon2CB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WrathCommon2CB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], SilverConv_Sunreaver_FactionText), "wrathcommon2", 10, 1, 0) ARL_WrathCommon2CBText:SetText(SilverConv_Sunreaver_FactionText) ARL_WrathCommon2CBText:SetFont(narrowFont, 11) ARL_WrathCommon2CBText:SetText(addon:Grey(SilverConv_Sunreaver_FactionText)) ARL_WrathCommon2CB:Disable() - local ARL_RepSonsOfHodirCB = CreateFrame("CheckButton", "ARL_RepSonsOfHodirCB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepSonsOfHodirCB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Sons of Hodir"]), "sonsofhodir", 11, 1, 0) + local ARL_RepSonsOfHodirCB = CreateFrame("CheckButton", "ARL_RepSonsOfHodirCB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepSonsOfHodirCB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Sons of Hodir"]), "sonsofhodir", 11, 1, 0) ARL_RepSonsOfHodirCBText:SetText(BFAC["The Sons of Hodir"]) ARL_RepSonsOfHodirCBText:SetFont(narrowFont, 11) - local ARL_WrathCommon4CB = CreateFrame("CheckButton", "ARL_WrathCommon4CB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WrathCommon4CB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], Frostborn_Taunka_FactionText), "wrathcommon4", 12, 1, 0) + local ARL_WrathCommon4CB = CreateFrame("CheckButton", "ARL_WrathCommon4CB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WrathCommon4CB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], Frostborn_Taunka_FactionText), "wrathcommon4", 12, 1, 0) ARL_WrathCommon4CBText:SetText(Frostborn_Taunka_FactionText) ARL_WrathCommon4CBText:SetFont(narrowFont, 11) ARL_WrathCommon4CBText:SetText(addon:Grey(Frostborn_Taunka_FactionText)) ARL_WrathCommon4CB:Disable() - local ARL_WrathCommon3CB = CreateFrame("CheckButton", "ARL_WrathCommon3CB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_WrathCommon3CB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], Valiance_Warsong_FactionText), "wrathcommon3", 13, 1, 0) + local ARL_WrathCommon3CB = CreateFrame("CheckButton", "ARL_WrathCommon3CB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_WrathCommon3CB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], Valiance_Warsong_FactionText), "wrathcommon3", 13, 1, 0) ARL_WrathCommon3CBText:SetText(Valiance_Warsong_FactionText) ARL_WrathCommon3CBText:SetFont(narrowFont, 11) ARL_WrathCommon3CBText:SetText(addon:Grey(Valiance_Warsong_FactionText)) ARL_WrathCommon3CB:Disable() - local ARL_RepWyrmrestCB = CreateFrame("CheckButton", "ARL_RepWyrmrestCB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepWyrmrestCB, addon.Fly_Rep_LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Wyrmrest Accord"]), "wyrmrest", 14, 1, 0) + local ARL_RepWyrmrestCB = CreateFrame("CheckButton", "ARL_RepWyrmrestCB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepWyrmrestCB, MainPanel.filter_menu.Rep.LK,sformat(L["SPECIFIC_REP_DESC"], BFAC["The Wyrmrest Accord"]), "wyrmrest", 14, 1, 0) ARL_RepWyrmrestCBText:SetText(BFAC["The Wyrmrest Accord"]) ARL_RepWyrmrestCBText:SetFont(narrowFont, 11) - local ARL_AshenVerdictCB = CreateFrame("CheckButton", "ARL_RepAshenVerdictCB", addon.Fly_Rep_LK, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_RepAshenVerdictCB, addon.Fly_Rep_LK, sformat(L["SPECIFIC_REP_DESC"], BFAC["The Ashen Verdict"]), "ashenverdict", 15, 1, 0) + local ARL_AshenVerdictCB = CreateFrame("CheckButton", "ARL_RepAshenVerdictCB", MainPanel.filter_menu.Rep.LK, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_RepAshenVerdictCB, MainPanel.filter_menu.Rep.LK, sformat(L["SPECIFIC_REP_DESC"], BFAC["The Ashen Verdict"]), "ashenverdict", 15, 1, 0) ARL_RepAshenVerdictCBText:SetText(BFAC["The Ashen Verdict"]) ARL_RepAshenVerdictCBText:SetFont(narrowFont, 11) ------------------------------------------------------------------------------- - -- Miscellaneous Flyaway Frame + -- Miscellaneous Filter Menu ------------------------------------------------------------------------------- - addon.Fly_Misc = CreateFrame("Frame", "ARL_Fly_Misc", addon.Flyaway) - addon.Fly_Misc:SetWidth(FLYAWAY_LARGE) - addon.Fly_Misc:SetHeight(280) - addon.Fly_Misc:EnableMouse(true) - addon.Fly_Misc:EnableKeyboard(true) - addon.Fly_Misc:SetMovable(false) - addon.Fly_Misc:SetPoint("TOPLEFT", addon.Flyaway, "TOPLEFT", 17, -16) - addon.Fly_Misc:Hide() - - local ARL_MiscText = addon.Fly_Misc:CreateFontString("ARL_MiscText", "OVERLAY", "GameFontHighlight") + MainPanel.filter_menu.Misc = CreateFrame("Frame", "ARL_FilterMenu_Misc", MainPanel.filter_menu) + MainPanel.filter_menu.Misc:SetWidth(FILTERMENU_LARGE) + MainPanel.filter_menu.Misc:SetHeight(280) + MainPanel.filter_menu.Misc:EnableMouse(true) + MainPanel.filter_menu.Misc:EnableKeyboard(true) + MainPanel.filter_menu.Misc:SetMovable(false) + MainPanel.filter_menu.Misc:SetPoint("TOPLEFT", MainPanel.filter_menu, "TOPLEFT", 17, -16) + MainPanel.filter_menu.Misc:Hide() + + local ARL_MiscText = MainPanel.filter_menu.Misc:CreateFontString("ARL_MiscText", "OVERLAY", "GameFontHighlight") ARL_MiscText:SetText(_G.MISCELLANEOUS .. ":") - ARL_MiscText:SetPoint("TOPLEFT", addon.Fly_Misc, "TOPLEFT", 5, -8) + ARL_MiscText:SetPoint("TOPLEFT", MainPanel.filter_menu.Misc, "TOPLEFT", 5, -8) ARL_MiscText:SetHeight(14) ARL_MiscText:SetWidth(150) ARL_MiscText:SetJustifyH("LEFT") - local ARL_IgnoreCB = CreateFrame("CheckButton", "ARL_IgnoreCB", addon.Fly_Misc, "UICheckButtonTemplate") - Generic_MakeCheckButton(ARL_IgnoreCB, addon.Fly_Misc, L["DISPLAY_EXCLUSION_DESC"], 0, 2, 1, 1) + local ARL_IgnoreCB = CreateFrame("CheckButton", "ARL_IgnoreCB", MainPanel.filter_menu.Misc, "UICheckButtonTemplate") + Generic_MakeCheckButton(ARL_IgnoreCB, MainPanel.filter_menu.Misc, L["DISPLAY_EXCLUSION_DESC"], 0, 2, 1, 1) ARL_IgnoreCBText:SetText(L["Display Exclusions"]) - local ARL_MiscAltText = addon.Fly_Misc:CreateFontString("ARL_MiscAltBtn", "OVERLAY", "GameFontNormal") + local ARL_MiscAltText = MainPanel.filter_menu.Misc:CreateFontString("ARL_MiscAltBtn", "OVERLAY", "GameFontNormal") ARL_MiscAltText:SetText(L["Alt-Tradeskills"] .. ":") ARL_MiscAltText:SetPoint("TOPLEFT", ARL_IgnoreCB, "BOTTOMLEFT", 4, 0) ARL_MiscAltText:SetHeight(14) ARL_MiscAltText:SetWidth(95) ARL_MiscAltText:SetJustifyH("LEFT") - local ARL_MiscAltBtn = CreateFrame("Button", "ARL_IgnoreCB", addon.Fly_Misc) + local ARL_MiscAltBtn = CreateFrame("Button", "ARL_IgnoreCB", MainPanel.filter_menu.Misc) ARL_MiscAltBtn:SetPoint("LEFT", ARL_MiscAltText, "RIGHT") ARL_MiscAltBtn:SetHeight(22) ARL_MiscAltBtn:SetWidth(22) @@ -3921,7 +3923,7 @@ function addon:DisplayFrame() SortRecipeList() - MainPanel.scroll_frame:Update(false) + MainPanel.scroll_frame:Update(false, false) MainPanel:Show() -- Set the search text to the last searched text or the global default string for the search box @@ -3934,7 +3936,19 @@ end ------------------------------------------------------------------------------- do MainPanel.scroll_frame = CreateFrame("ScrollFrame", "ARL_MainPanelScrollFrame", MainPanel, "FauxScrollFrameTemplate") + MainPanel.scroll_frame:SetHeight(322) + MainPanel.scroll_frame:SetWidth(243) + MainPanel.scroll_frame:SetPoint("TOPLEFT", MainPanel, "TOPLEFT", 20, -97) + MainPanel.scroll_frame:SetScript("OnVerticalScroll", + function(self, arg1) + self.scrolling = true + FauxScrollFrame_OnVerticalScroll(self, arg1, 16, self.Update) + self.scrolling = nil + end) + MainPanel.scroll_frame.entries = {} + MainPanel.scroll_frame.state_buttons = {} + MainPanel.scroll_frame.recipe_buttons = {} local ScrollFrame = MainPanel.scroll_frame @@ -4428,7 +4442,10 @@ do edit_box:SetFontObject(ChatFontNormal) edit_box:SetWidth(650) edit_box:SetHeight(270) - edit_box:SetScript("OnEscapePressed", function() copy_frame:Hide() end) + edit_box:SetScript("OnEscapePressed", + function() + copy_frame:Hide() + end) edit_box:HighlightText(0) scrollArea:SetScrollChild(edit_box) -- 1.7.9.5