From 7ac463d905675d83451a9d195732cbe665bebb86 Mon Sep 17 00:00:00 2001 From: urnati Date: Sun, 30 Dec 2018 10:39:04 -0500 Subject: [PATCH] TitanUtils : Do not allow the tooltip to show if right click menu is shown --- Titan/TitanUtils.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Titan/TitanUtils.lua b/Titan/TitanUtils.lua index 0728e97..3a96dc5 100644 --- a/Titan/TitanUtils.lua +++ b/Titan/TitanUtils.lua @@ -16,6 +16,8 @@ local _G = getfenv(0); local L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true) local media = LibStub("LibSharedMedia-3.0") +-- The LibUIDropDownMenu lib is used over the Blizzard frame +local drop_down_1 = "L_DropDownList1" -- -- The routines labeled API are useable by addon developers -- @@ -1459,8 +1461,8 @@ VAR: None OUT: None --]] function TitanUtils_CloseRightClickMenu() - if (DropDownList1:IsVisible()) then - DropDownList1:Hide(); + if (_G["DropDownList1"]:IsVisible()) then + _G["DropDownList1"]:Hide(); end end @@ -1476,7 +1478,7 @@ OUT: --]] local function TitanRightClick_UIScale() -- take UI Scale into consideration - local listFrame = _G["DropDownList1"]; + local listFrame = _G[drop_down_1]; local listframeScale = listFrame:GetScale(); local uiScale; @@ -1666,7 +1668,7 @@ OUT: - true (IsVisible) or false --]] function TitanPanelRightClickMenu_IsVisible() - return _G["DropDownList1"]:IsVisible(); + return _G[drop_down_1]:IsVisible(); end --[[ Titan @@ -1676,8 +1678,8 @@ VAR: None OUT: None --]] function TitanPanelRightClickMenu_Close() - if _G["DropDownList1"]:IsVisible() then - _G["DropDownList1"]:Hide() + if _G[drop_down_1]:IsVisible() then + _G[drop_down_1]:Hide() end end -- 1.7.9.5