From 2e2feb40819511ffc733ee27ddf173cf97c72206 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Thu, 21 Oct 2010 16:40:55 +0100 Subject: [PATCH] Add a selection dropdown to the "options" button --- BindConfig.lua | 39 ++++++++++++++++++++++++++++++++++++--- BlizzardFrames.lua | 3 +++ FrameOptionsPanel.lua | 3 +++ OptionsPanel.lua | 5 ++++- 4 files changed, 46 insertions(+), 4 deletions(-) diff --git a/BindConfig.lua b/BindConfig.lua index 4c4cb68..227a3fb 100755 --- a/BindConfig.lua +++ b/BindConfig.lua @@ -239,9 +239,42 @@ function CliqueConfig:Button_OnClick(button) -- Click handler for "Edit" button elseif button == self.page1.button_options then - HideUIPanel(SpellBookFrame) - HideUIPanel(CliqueConfig) - InterfaceOptionsFrame_OpenToCategory("Clique") + local menu = { + { + text = L["Select an options category"], + isTitle = true, + notCheckable = true, + }, + { + text = L["Clique general options"], + func = function() + HideUIPanel(SpellBookFrame) + HideUIPanel(CliqueConfig) + InterfaceOptionsFrame_OpenToCategory(addon.optpanels["GENERAL"]) + end, + notCheckable = true, + }, + { + text = L["Frame blacklist"], + func = function() + HideUIPanel(SpellBookFrame) + HideUIPanel(CliqueConfig) + InterfaceOptionsFrame_OpenToCategory(addon.optpanels["BLACKLIST"]) + end, + notCheckable = true, + }, + { + text = L["Blizzard frame integration options"], + func = function() + HideUIPanel(SpellBookFrame) + HideUIPanel(CliqueConfig) + InterfaceOptionsFrame_OpenToCategory(addon.optpanels["BLIZZFRAMES"]) + end, + notCheckable = true, + }, + } + UIDropDownMenu_SetAnchor(self.dropdown, 0, 0, "BOTTOMLEFT", self.page1.button_options, "TOP") + EasyMenu(menu, self.dropdown, nil, 0, 0, nil, nil) elseif button == self.page2.button_save then -- Check the input local key = self.page2.key diff --git a/BlizzardFrames.lua b/BlizzardFrames.lua index 118ba33..8a931c2 100644 --- a/BlizzardFrames.lua +++ b/BlizzardFrames.lua @@ -20,6 +20,9 @@ local panel = CreateFrame("Frame") panel.name = "Blizzard Frame Options" panel.parent = addonName +addon.optpanels = addon.optpanels or {} +addon.optpanels["BLIZZFRAMES"] = panel + panel:SetScript("OnShow", function(self) if not panel.initialized then panel:CreateOptions() diff --git a/FrameOptionsPanel.lua b/FrameOptionsPanel.lua index b43e299..52b3bec 100644 --- a/FrameOptionsPanel.lua +++ b/FrameOptionsPanel.lua @@ -14,6 +14,9 @@ local panel = CreateFrame("Frame") panel.name = "Frame Blacklist" panel.parent = addonName +addon.optpanels = addon.optpanels or {} +addon.optpanels["BLACKLIST"] = panel + panel:SetScript("OnShow", function(self) if not panel.initialized then panel:CreateOptions() diff --git a/OptionsPanel.lua b/OptionsPanel.lua index afc7648..fc0e78e 100644 --- a/OptionsPanel.lua +++ b/OptionsPanel.lua @@ -14,6 +14,9 @@ local L = addon.L local panel = CreateFrame("Frame") panel.name = addonName +addon.optpanels = addon.optpanels or {} +addon.optpanels["GENERAL"] = panel + panel:SetScript("OnShow", function(self) if not panel.initialized then panel:CreateOptions() @@ -51,7 +54,7 @@ function panel:CreateOptions() local bits = {} self.updown = make_checkbox("CliqueOptionsUpDownClick", self) - self.updown.text:SetText(L["Trigger bindings on the 'down' portion of the click (only works on some frames)"]) + self.updown.text:SetText(L["Trigger bindings on the 'down' portion of the click (experimental)"]) self.fastooc = make_checkbox("CliqueOptionsFastOoc", self) self.fastooc.text:SetText(L["Disable out of combat clicks when party members enter combat"]) -- 1.7.9.5