Quantcast

Added suggestion that Configuration > Plugins list shows which are shown or not so user does not have to click through the list

urnati [10-03-21 - 17:33]
Added suggestion that Configuration > Plugins list shows which are shown or not so user does not have to click through the list
Filename
Titan/TitanConfig.lua
diff --git a/Titan/TitanConfig.lua b/Titan/TitanConfig.lua
index d55b4aa..33efa45 100644
--- a/Titan/TitanConfig.lua
+++ b/Titan/TitanConfig.lua
@@ -1482,6 +1482,16 @@ local optionsAddons = {
 	type = "group",
 	args = {}
 }
+local function ColorVisible(name)
+	local res = "?"
+	if TitanPanel_IsPluginShown(name) then
+		res = (name or "")
+	else
+		res = "|cff808080"..name.._G["FONT_COLOR_CODE_CLOSE"]
+	end
+
+	return res
+end
 --[[ local
 NAME: TitanUpdateConfigAddons
 DESC: Allow the user to control each plugin registered to Titan.
@@ -1515,13 +1525,13 @@ local function TitanUpdateConfigAddons()
 		plug_in = TitanUtils_GetPlugin(TitanPluginsIndex[idx])
 		if plug_in then
 			if plug_in.version then
-				plug_version = TitanUtils_GetGreenText(" (v"..plug_in.version..")")
+				plug_version = TitanUtils_GetGreenText(" ("..plug_in.version..")")
 			else
 				plug_version = ""
 			end
 			args[plug_in.id] = {
 				type = "group",
-				name = (plug_in.menuText or ""),
+				name = ColorVisible(plug_in.menuText or ""),
 				order = idx,
 				args = {
 					name = {
@@ -1542,6 +1552,7 @@ local function TitanUpdateConfigAddons()
 							else -- Hide / remove
 								TitanPanel_RemoveButton(name)
 							end
+							TitanUpdateConfigAddons()
 							end,
 					},
 				}