Quantcast

- Titan: fix to show locale for plugin categories

urnati [02-07-26 - 17:10]
- Titan: fix to show locale for plugin categories
- Titan: Change to hopefully hide more tooltips, if plugin uses GaeTooltip
Filename
Titan/Titan.lua
Titan/TitanTemplate.lua
diff --git a/Titan/Titan.lua b/Titan/Titan.lua
index c28395f..0581759 100644
--- a/Titan/Titan.lua
+++ b/Titan/Titan.lua
@@ -1986,9 +1986,9 @@ local function AddPlugin(owner, bar, category)

 	for index, id in pairs(TitanPluginsIndex) do
 		plugin = TitanUtils_GetPlugin(id)
-		if plugin then -- add the plugin to the menu
+		if plugin then
 			plugin.category = plugin and plugin.category or "General";
-			if (plugin.category == category) then
+			if (plugin.category == category) then  -- add the plugin to the menu
 				local internal_bar, which_bar, which_frame_str = TitanUtils_GetWhichBar(id)
 				if not TitanGetVar(id, "ForceBar")
 					or (TitanGetVar(id, "ForceBar") == TitanBarData[bar:GetName()].name) then
@@ -2048,8 +2048,9 @@ local function GeneratorFunction(owner, rootDescription)
 	do
 		---@diagnostic disable-next-line: assign-type-mismatch, param-type-mismatch
 		for index, id in pairs(L["TITAN_PANEL_MENU_CATEGORIES"]) do
-			local cat = TITAN_PANEL_BUTTONS_PLUGIN_CATEGORY[index] -- L["TITAN_PANEL_MENU_CATEGORIES"][index]
-			local opts_plugins = Titan_Menu.AddButton(root, cat)
+			local cat = TITAN_PANEL_BUTTONS_PLUGIN_CATEGORY[index]
+			local cat_locale = L["TITAN_PANEL_MENU_CATEGORIES"][index]
+			local opts_plugins = Titan_Menu.AddButton(root, cat_locale)
 			AddPlugin(opts_plugins, bar, cat) -- if same category
 		end
 	end
diff --git a/Titan/TitanTemplate.lua b/Titan/TitanTemplate.lua
index c779e01..4ed1c13 100644
--- a/Titan/TitanTemplate.lua
+++ b/Titan/TitanTemplate.lua
@@ -223,6 +223,8 @@ local function AllowTooltip(self)
 		local controlFrame = TitanUtils_GetControlFrame(id);
 		local plugin = _G[self.plugin_frame_str]

+		-- Jan 2026 : Place all checks to NOT show tooltip here...
+		-- Checks in other places tooltips could show were causing visual oddities.
 		dbg_msg = dbg_msg .. "'" .. self:GetName() .. "'"
 		-- sanity checks
 		if (TitanPanelGetVar("HideTipsInCombat") and InCombatLockdown()) then
@@ -276,8 +278,6 @@ local function TitanPanelButton_SetTooltip(self)
 	local ok = false
 	local frame = TitanPanelTooltip --GameTooltip
 	local id = self.registry.id
-	-- Jan 2026 : Place all checks to NOT show tooltip here...
-	-- Checks in other places tooltips could show were causing visual oddities.

 	frame.registry_id = id -- for use in other routines
 	frame.plugin_frame_str = self:GetName()
@@ -346,6 +346,7 @@ local function TitanPanelButton_SetTooltip(self)
 				if (tooltipTextFunc) then
 					-- Hide the Tooltip while being updated, to avoid race conditions.
 					frame:Hide()
+					GameTooltip:Hide() -- Also hide in case. Cannot hide completly custom tool tips
 					-- Prep the tooltip frame
 					TitanTooltip_SetPanelTooltip(self, id, frame);
 					if plugin.tooltipTitle then