From 12c485c46dc26993d802b0615e0e68753f6260d1 Mon Sep 17 00:00:00 2001 From: urnati Date: Sat, 29 Dec 2018 10:30:34 -0500 Subject: [PATCH] Switched to the Blizzard UIDropDownMenu over the Ace one. The lib was not removed. --- Titan/TitanPanel.lua | 78 ++++++++++++++++----------------- Titan/TitanPanel.xml | 2 +- Titan/TitanPanelTemplate.xml | 4 +- Titan/TitanUtils.lua | 22 +++++----- Titan/embeds.xml | 1 - TitanBag/TitanBag.lua | 16 +++---- TitanClock/TitanClock.lua | 12 ++--- TitanGold/TitanGold.lua | 48 ++++++++++---------- TitanLocation/TitanLocation.lua | 28 ++++++------ TitanLootType/TitanLootType.lua | 42 +++++++++--------- TitanPerformance/TitanPerformance.lua | 52 +++++++++++----------- TitanRepair/TitanRepair.lua | 72 +++++++++++++++--------------- TitanVolume/TitanVolume.lua | 4 +- TitanXP/TitanXP.lua | 22 +++++----- 14 files changed, 201 insertions(+), 202 deletions(-) diff --git a/Titan/TitanPanel.lua b/Titan/TitanPanel.lua index 2cf7c96..bdc1d20 100644 --- a/Titan/TitanPanel.lua +++ b/Titan/TitanPanel.lua @@ -1691,7 +1691,7 @@ local function TitanPanel_MainMenu() ----------------- -- Menu title TitanPanelRightClickMenu_AddTitle(L["TITAN_PANEL_MENU_TITLE"]); - TitanPanelRightClickMenu_AddSpacer(L_UIDROPDOWNMENU_MENU_LEVEL); + TitanPanelRightClickMenu_AddSpacer(UIDROPDOWNMENU_MENU_LEVEL); TitanPanelRightClickMenu_AddTitle(L["TITAN_PANEL_MENU_PLUGINS"]); @@ -1703,7 +1703,7 @@ local function TitanPanel_MainMenu() info.text = L["TITAN_PANEL_MENU_CATEGORIES"][index]; info.value = "Addons_" .. TITAN_PANEL_BUTTONS_PLUGIN_CATEGORY[index]; info.hasArrow = 1; - L_UIDropDownMenu_AddButton(info); + UIDropDownMenu_AddButton(info); end TitanPanelRightClickMenu_AddSpacer(); @@ -1718,7 +1718,7 @@ local function TitanPanel_MainMenu() InterfaceOptionsFrame_OpenToCategory(L["TITAN_PANEL_MENU_TOP_BARS"]); InterfaceOptionsFrame_OpenToCategory(L["TITAN_PANEL_MENU_TOP_BARS"]); -- hack for a Blizz bug... end - L_UIDropDownMenu_AddButton(info); + UIDropDownMenu_AddButton(info); TitanPanelRightClickMenu_AddSpacer(); @@ -1741,7 +1741,7 @@ local function TitanPanel_MainMenu() .._G["GREEN_FONT_COLOR_CODE"] ..L["TITAN_PANEL_MENU_IN_COMBAT_LOCKDOWN"]; end - L_UIDropDownMenu_AddButton(info); + UIDropDownMenu_AddButton(info); ----------------- -- Save @@ -1757,7 +1757,7 @@ local function TitanPanel_MainMenu() .._G["GREEN_FONT_COLOR_CODE"] ..L["TITAN_PANEL_MENU_IN_COMBAT_LOCKDOWN"]; end - L_UIDropDownMenu_AddButton(info); + UIDropDownMenu_AddButton(info); local glob, name, player, server = TitanUtils_GetGlobalProfile() info = {}; @@ -1769,20 +1769,20 @@ local function TitanPanel_MainMenu() end; info.checked = glob --TitanAllGetVar("GlobalProfileUse") info.keepShownOnClick = nil - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); --local player, server = TitanUtils_ParseName(TitanAllGetVar("GlobalProfileName")) info = {}; info.notCheckable = true info.text = " "..TitanUtils_GetGreenText(server) info.value = "server"; - L_UIDropDownMenu_AddButton(info); + UIDropDownMenu_AddButton(info); info = {}; info.notCheckable = true info.text = " "..TitanUtils_GetGreenText(player) info.value = "player"; - L_UIDropDownMenu_AddButton(info); + UIDropDownMenu_AddButton(info); end @@ -1800,9 +1800,9 @@ local function TitanPanel_ServerSettingsMenu() local s, e, ident; local setonce = 0; - if ( L_UIDROPDOWNMENU_MENU_VALUE == "Settings" ) then + if ( UIDROPDOWNMENU_MENU_VALUE == "Settings" ) then TitanPanelRightClickMenu_AddTitle(L["TITAN_PANEL_MENU_PROFILE_SERVERS"], - L_UIDROPDOWNMENU_MENU_LEVEL); + UIDROPDOWNMENU_MENU_LEVEL); -- Normal profile per toon for index, id in pairs(TitanSettings.Players) do player, server = TitanUtils_ParseName(index) @@ -1815,7 +1815,7 @@ local function TitanPanel_ServerSettingsMenu() info.text = server; info.value = server; info.hasArrow = 1; - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); end end end @@ -1826,8 +1826,8 @@ local function TitanPanel_ServerSettingsMenu() if TitanUtils_GetCurrentIndex(servers, server) == nil then if server == TITAN_CUSTOM_PROFILE_POSTFIX then if setonce and setonce == 0 then - TitanPanelRightClickMenu_AddTitle("", L_UIDROPDOWNMENU_MENU_LEVEL); - TitanPanelRightClickMenu_AddTitle(L["TITAN_PANEL_MENU_PROFILE_CUSTOM"], L_UIDROPDOWNMENU_MENU_LEVEL); + TitanPanelRightClickMenu_AddTitle("", UIDROPDOWNMENU_MENU_LEVEL); + TitanPanelRightClickMenu_AddTitle(L["TITAN_PANEL_MENU_PROFILE_CUSTOM"], UIDROPDOWNMENU_MENU_LEVEL); setonce = 1; end info = {}; @@ -1835,7 +1835,7 @@ local function TitanPanel_ServerSettingsMenu() info.text = player; info.value = player; info.hasArrow = 1; - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); end end end @@ -1873,7 +1873,7 @@ local function TitanPanel_PlayerSettingsMenu() -- handle custom profiles here if server == TITAN_CUSTOM_PROFILE_POSTFIX - and player == L_UIDROPDOWNMENU_MENU_VALUE then + and player == UIDROPDOWNMENU_MENU_VALUE then info = {}; info.notCheckable = true info.disabled = TitanAllGetVar("GlobalProfileUse") @@ -1882,7 +1882,7 @@ local function TitanPanel_PlayerSettingsMenu() info.func = function() TitanVariables_UseSettings(index, TITAN_PROFILE_USE) end - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); info = {}; info.notCheckable = true @@ -1901,14 +1901,14 @@ local function TitanPanel_PlayerSettingsMenu() TitanPanelRightClickMenu_Close(); end end - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); end -- if server and player -- handle regular profiles here - if server == L_UIDROPDOWNMENU_MENU_VALUE then + if server == UIDROPDOWNMENU_MENU_VALUE then -- Set the label once if setonce and setonce == 0 then - TitanPanelRightClickMenu_AddTitle(L["TITAN_PANEL_MENU_PROFILE_CHARS"], L_UIDROPDOWNMENU_MENU_LEVEL); + TitanPanelRightClickMenu_AddTitle(L["TITAN_PANEL_MENU_PROFILE_CHARS"], UIDROPDOWNMENU_MENU_LEVEL); setonce = 1; end info = {}; @@ -1916,7 +1916,7 @@ local function TitanPanel_PlayerSettingsMenu() info.text = player; info.value = index; info.hasArrow = 1; - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); end end -- for players @@ -1924,14 +1924,14 @@ local function TitanPanel_PlayerSettingsMenu() for index, id in pairs(TitanPluginsIndex) do plugin = TitanUtils_GetPlugin(id); - if plugin.id and plugin.id == L_UIDROPDOWNMENU_MENU_VALUE then + if plugin.id and plugin.id == UIDROPDOWNMENU_MENU_VALUE then --title info = {}; info.text = TitanPlugins[plugin.id].menuText; info.notCheckable = true info.notClickable = 1; info.isTitle = 1; - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); --ShowIcon if plugin.controlVariables.ShowIcon then @@ -1944,7 +1944,7 @@ local function TitanPanel_PlayerSettingsMenu() info.keepShownOnClick = 1; info.checked = TitanGetVar(id, "ShowIcon"); info.disabled = nil; - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); end --ShowLabel @@ -1958,7 +1958,7 @@ local function TitanPanel_PlayerSettingsMenu() info.keepShownOnClick = 1; info.checked = TitanGetVar(id, "ShowLabelText"); info.disabled = nil; - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); end --ShowRegularText (LDB data sources only atm) @@ -1972,7 +1972,7 @@ local function TitanPanel_PlayerSettingsMenu() info.keepShownOnClick = 1; info.checked = TitanGetVar(id, "ShowRegularText"); info.disabled = nil; - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); end --ShowColoredText @@ -1986,7 +1986,7 @@ local function TitanPanel_PlayerSettingsMenu() info.keepShownOnClick = 1; info.checked = TitanGetVar(id, "ShowColoredText"); info.disabled = nil; - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); end -- Right-side plugin @@ -2001,7 +2001,7 @@ local function TitanPanel_PlayerSettingsMenu() end info.checked = TitanGetVar(id, "DisplayOnRightSide"); info.disabled = nil; - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); end end end @@ -2020,19 +2020,19 @@ local function TitanPanel_SettingsSelectionMenu() info.notCheckable = true info.disabled = TitanAllGetVar("GlobalProfileUse") info.text = L["TITAN_PANEL_MENU_LOAD_SETTINGS"]; - info.value = L_UIDROPDOWNMENU_MENU_VALUE; + info.value = UIDROPDOWNMENU_MENU_VALUE; info.func = function() - TitanVariables_UseSettings(L_UIDROPDOWNMENU_MENU_VALUE, TITAN_PROFILE_USE) + TitanVariables_UseSettings(UIDROPDOWNMENU_MENU_VALUE, TITAN_PROFILE_USE) end - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); info = {}; info.notCheckable = true - info.disabled = (L_UIDROPDOWNMENU_MENU_VALUE == TitanSettings.Player) - or ((L_UIDROPDOWNMENU_MENU_VALUE == TitanAllGetVar("GlobalProfileName")) + info.disabled = (UIDROPDOWNMENU_MENU_VALUE == TitanSettings.Player) + or ((UIDROPDOWNMENU_MENU_VALUE == TitanAllGetVar("GlobalProfileName")) and (TitanAllGetVar("GlobalProfileUse"))) info.text = L["TITAN_PANEL_MENU_DELETE_SETTINGS"]; - info.value = L_UIDROPDOWNMENU_MENU_VALUE; + info.value = UIDROPDOWNMENU_MENU_VALUE; info.func = function() -- do not delete if current profile - .disabled --[[ @@ -2053,7 +2053,7 @@ local function TitanPanel_SettingsSelectionMenu() TitanPanelRightClickMenu_Close(); end end - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); end --[[ Titan @@ -2071,7 +2071,7 @@ local function TitanPanel_BuildOtherPluginsMenu(frame) if not plugin.category then plugin.category = "General"; end - if ( L_UIDROPDOWNMENU_MENU_VALUE == "Addons_" .. plugin.category ) then + if ( UIDROPDOWNMENU_MENU_VALUE == "Addons_" .. plugin.category ) then if not TitanGetVar(id, "ForceBar") or (TitanGetVar(id, "ForceBar") == TitanBarData[frame].name) then info = {}; @@ -2091,7 +2091,7 @@ local function TitanPanel_BuildOtherPluginsMenu(frame) end; info.checked = TitanPanel_IsPluginShown(id) or nil info.keepShownOnClick = 1; - L_UIDropDownMenu_AddButton(info, L_UIDROPDOWNMENU_MENU_LEVEL); + UIDropDownMenu_AddButton(info, UIDROPDOWNMENU_MENU_LEVEL); end end end @@ -2110,20 +2110,20 @@ function TitanPanelRightClickMenu_PrepareBarMenu(self) local s, e, frame = string.find(self:GetName(), "(.*)RightClickMenu"); -- Level 2 - if ( L_UIDROPDOWNMENU_MENU_LEVEL == 2 ) then + if ( UIDROPDOWNMENU_MENU_LEVEL == 2 ) then TitanPanel_BuildOtherPluginsMenu(frame); TitanPanel_ServerSettingsMenu(); return; end -- Level 3 - if ( L_UIDROPDOWNMENU_MENU_LEVEL == 3 ) then + if ( UIDROPDOWNMENU_MENU_LEVEL == 3 ) then TitanPanel_PlayerSettingsMenu(); return; end -- Level 4 - if ( L_UIDROPDOWNMENU_MENU_LEVEL == 4 ) then + if ( UIDROPDOWNMENU_MENU_LEVEL == 4 ) then TitanPanel_SettingsSelectionMenu(); return; end diff --git a/Titan/TitanPanel.xml b/Titan/TitanPanel.xml index f72b77e..227a5a3 100644 --- a/Titan/TitanPanel.xml +++ b/Titan/TitanPanel.xml @@ -36,7 +36,7 @@ --> - + diff --git a/Titan/TitanPanelTemplate.xml b/Titan/TitanPanelTemplate.xml index 1f857c7..e0d7ff2 100644 --- a/Titan/TitanPanelTemplate.xml +++ b/Titan/TitanPanelTemplate.xml @@ -3,7 +3,7 @@