From 35b9ffd3d1a43212337ccd6328afa499301958e3 Mon Sep 17 00:00:00 2001 From: urnati Date: Sun, 3 Oct 2021 13:33:50 -0400 Subject: [PATCH] Added suggestion that Configuration > Plugins list shows which are shown or not so user does not have to click through the list --- Titan/TitanConfig.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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, }, } -- 1.7.9.5