diff --git a/Titan/Titan.toc b/Titan/Titan.toc index adc7538..ba8696b 100644 --- a/Titan/Titan.toc +++ b/Titan/Titan.toc @@ -1,7 +1,7 @@ ## Interface: 100002 -## Title: Titan Panel [|cffeda55f_Core_|r] |cff00aa006.00.10.100002|r +## Title: Titan Panel [|cffeda55f_Core_|r] |cff00aa006.00.11.100002|r ## Author: Titan Panel Development Team -## Version: 6.00.10.100002 +## Version: 6.00.11.100002 ## SavedVariables: TitanAll, TitanSettings, TitanSkins, ServerTimeOffsets, ServerHourFormat ## OptionalDeps: Ace3, AceGUI-3.0-SharedMediaWidgets, LibSharedMedia-3.0, LibQTip-1.0, !LibUIDropDownMenu ## Notes: Adds a display bar on the top and/or bottom of the screen. Allows users to show and control information/launcher plugins. diff --git a/Titan/TitanConfig.lua b/Titan/TitanConfig.lua index ead4edb..d70f4f5 100644 --- a/Titan/TitanConfig.lua +++ b/Titan/TitanConfig.lua @@ -29,24 +29,51 @@ Highlight - notes. tips. and details local notes = "" ..TitanUtils_GetRedText("NOTE : ") ..TitanUtils_GetNormalText("" - .." There have been many comments about errors including tool tips. The short answer is Blizzard tainted the path used by TitanRepair and bags. They both use tool tips - don't ask, I have no answer!\n" - .."My thought is TitanRepair and Blizzard using similar routines doing their normal processing can cause the errors being seen.\n" - .."I have seen odd tool tip behavior with a pet in a cage - and Titan NOT enabled. The pet tool tip forces itself onto the screen at odd times... Even when one has not moused over the cage.\n" - .."If someone more knowledgeable has tips to work around this - feel free to contact us!\n" - ) - .."\n" - ..TitanUtils_GetRedText("NOTE : ") - ..TitanUtils_GetNormalText("" - .."Due to the UI changes in DragonFlight (API 10.00.00), Titan Panel no longer auto adjusts the UI elements / frames. Please use the WoW UI edit mode to adjust frames away from Titan Panel bar(s).\n" - .."Currently the menu & bag frame and the status / xp frame are NOT adjustable via edit mode. In the Titan Configuration for Bottom Bars you may adjust the menu & bag frame and the status / xp frame *vertically only*.\n" + .."Currently the menu & bag frame and the status / xp frame are NOT adjustable via WoW Edit Mode. In the Titan Configuration - Bottom Bars - you may adjust the menu & bag frame and the status / xp frame *vertically only*.\n" ) local changes = "" + ..TitanUtils_GetGoldText("6.00.11.100002 : 2020/12/20\n") + ..TitanUtils_GetGreenText("Plugins over another : \n") + ..TitanUtils_GetHighlightText("" + .."- Fix for plugins that could show over another.\n" + ) + ..TitanUtils_GetGreenText("Scaling : \n") + ..TitanUtils_GetHighlightText("" + .."- Fix for error when changing scaling.\n" + ) + ..TitanUtils_GetGreenText("Config : \n") + ..TitanUtils_GetHighlightText("" + .."- About : Add slash command description to About.\n" + .."- Changes : Added to show change history.\n" + .."- Extras : Begin gathering more plugin details so users have more info to determine whether to remove plugin settings.\n" + ) + ..TitanUtils_GetGoldText("6.00.10.100002 : 2020/12/13\n") + ..TitanUtils_GetGreenText("TitanBag : \n") + ..TitanUtils_GetHighlightText("" + .."- Made 'open bags' (left click) an option (default off) until container taint resolved.\n" + ) + ..TitanUtils_GetGreenText("TitanGold : \n") + ..TitanUtils_GetHighlightText("" + .."- Fan fix for total being reset in certain situations - thanks to GrimNotepad.\n" + ) + ..TitanUtils_GetGreenText("TitanRepair : \n") + ..TitanUtils_GetHighlightText("" + .."- Removed unused tool tip code from old API.\n" + ) + ..TitanUtils_GetGreenText("TitanVolume : \n") + ..TitanUtils_GetHighlightText("" + .."- Fix to make sliders work via mouse wheel again.\n" + ) + ..TitanUtils_GetGreenText("TitanPanel : \n") + ..TitanUtils_GetHighlightText("" + .."- Fix for some LDB addons not being updating properly.\n" + ) ..TitanUtils_GetGoldText("6.00.09.100002 : 2020/12/01\n") ..TitanUtils_GetGreenText("TitanRepair : \n") ..TitanUtils_GetHighlightText("" .."- Quick fix for repair pop up.\n" ) - ..TitanUtils_GetGoldText("6.00.09.100002 : 2020/12/01\n") + ..TitanUtils_GetGoldText("6.00.08.100002 : 2020/12/01\n") ..TitanUtils_GetGreenText("TitanRepair rewritten - Notable changes: \n") ..TitanUtils_GetHighlightText("" .."- See plugin notes.\n" @@ -72,6 +99,7 @@ TITAN_PANEL_CONFIG = { extras = L["TITAN_PANEL_EXTRAS_SHORT"], attempts = L["TITAN_PANEL_ATTEMPTS_SHORT"], advanced = L["TITAN_PANEL_MENU_ADV"], + changes = (CHANGE or "Change").." "..(HISTORY or "History") } } -- TITAN_PANEL_CONFIG.topic.trans @@ -112,7 +140,7 @@ VAR: scale - the scale the user has selected for Titan OUT: None --]] local function TitanAdjustPanelScale(scale) - Titan_AdjustScale() + TitanAdjustPanelScale() -- Adjust frame positions TitanPanel_AdjustFrames(true, "AdjustPanelScale") @@ -160,6 +188,20 @@ local optionsControl = { name = L["TITAN_PANEL_CONFIG_MAIN_LABEL"].."\n\n", cmdHidden = true }, + confnotes = { + name = "Notes", + order = 3, + type = "group", inline = true, + args = { + confversiondesc = { + order = 1, + type = "description", + name = "" + ..notes, + cmdHidden = true + }, + } + }, confinfodesc = { name = "About", order = 5, @@ -216,8 +258,8 @@ local optionsControl = { }, } }, - confnotes = { - name = "Notes", + confslash = { + name = "Slash Commands", order = 3, type = "group", inline = true, args = { @@ -225,21 +267,42 @@ local optionsControl = { order = 1, type = "description", name = "" - ..notes, - cmdHidden = true - }, - } - }, - confchanges = { - order = 7, - name = CHANGES_COLON, - type = "group", inline = true, - args = { - confversiondesc = { - order = 1, - type = "description", - name = "" - ..changes, + ..TitanUtils_GetGoldText("reset\n") + ..L["TITAN_PANEL_SLASH_RESET_0"].."\n" + ..L["TITAN_PANEL_SLASH_RESET_1"].."\n" + ..L["TITAN_PANEL_SLASH_RESET_2"].."\n" + ..L["TITAN_PANEL_SLASH_RESET_3"].."\n" + ..L["TITAN_PANEL_SLASH_RESET_4"].."\n" + ..L["TITAN_PANEL_SLASH_RESET_5"].."\n" + .."\n" + ..TitanUtils_GetGoldText("gui\n") + ..L["TITAN_PANEL_SLASH_GUI_0"].."\n" + ..L["TITAN_PANEL_SLASH_GUI_1"].."\n" + ..L["TITAN_PANEL_SLASH_GUI_2"].."\n" + ..L["TITAN_PANEL_SLASH_GUI_3"].."\n" + .."\n" + ..TitanUtils_GetGoldText("profile\n") + ..L["TITAN_PANEL_SLASH_PROFILE_0"].."\n" + ..L["TITAN_PANEL_SLASH_PROFILE_1"].."\n" + ..L["TITAN_PANEL_SLASH_PROFILE_2"].."\n" + ..L["TITAN_PANEL_SLASH_PROFILE_3"].."\n" + .."\n" + ..TitanUtils_GetGoldText("silent\n") + ..L["TITAN_PANEL_SLASH_SILENT_0"].."\n" + ..L["TITAN_PANEL_SLASH_SILENT_1"].."\n" + .."\n" + ..TitanUtils_GetGoldText("orderhall\n") + ..L["TITAN_PANEL_SLASH_ORDERHALL_0"].."\n" + ..L["TITAN_PANEL_SLASH_ORDERHALL_1"].."\n" + .."\n" + ..TitanUtils_GetGoldText("help\n") + ..L["TITAN_PANEL_SLASH_HELP_0"].."\n" + ..L["TITAN_PANEL_SLASH_HELP_1"].."\n" + .."\n" + ..TitanUtils_GetGoldText("all\n") + ..L["TITAN_PANEL_SLASH_ALL_0"].."\n" + ..L["TITAN_PANEL_SLASH_ALL_1"].."\n" + .."", cmdHidden = true }, } @@ -1274,14 +1337,15 @@ local optionsExtras = { args = {} } --[[ local -NAME: TitanUpdateAddonAttempts +NAME: TitanUpdateExtras DESC: Show plugins that are not registered (loaded) but have config data. The data can be deleted by the user. VAR: None OUT: None NOTE: - As users change the plugins they use the old ones still have saved variable data stored by Titan. +- This allows even built-ins to be listed in case Titan removes them or the user disables them. - The old plugin data can be removed by the user when they will not longer use that plugin. -- This routine is called to 'redraw' the list as a user deletes data. +- This routine will 'redraw' the list as a user deletes data. - A message is sent to chat that the plugin data has been deleted. :NOTE --]] @@ -1297,18 +1361,47 @@ local function TitanUpdateExtras() name = L["TITAN_PANEL_EXTRAS_DESC"].."\n", cmdHidden = true } - for idx, value in pairs(TitanPluginExtras) do - if TitanPluginExtras[idx] then - local num = TitanPluginExtras[idx].num - local name = TitanPluginExtras[idx].id - args[name] = { +---[===[ + local iname = "" + local ival = 0 + for idx, value in pairs(TitanPluginSettings) do + if TitanPluginSettings[idx] and TitanUtils_IsPluginRegistered(idx) then + -- Plugin is being used. + else + ival = ival + 1 + iname = tostring(ival) + local extra = {} + if TitanPluginExtras and TitanPluginExtras[idx] then + -- found extra data for user + extra = TitanPluginExtras[idx] + else + extra = { + name ="?", + menuText = "?", + version = "?", + category = "?", + } + end +--[[ +print("TConfig extras" +.." "..tostring(idx).."" +.." "..tostring(TitanUtils_IsPluginRegistered(idx)).."" +.." "..tostring(extra.name).."" +) +--]] + args[idx] = { type = "group", - name = TitanUtils_GetGoldText(tostring(num)..": "..(name or "?")), - order = idx, + name = TitanUtils_GetGoldText(idx or "?"), + order = ival, args = { name = { type = "description", - name = TitanUtils_GetGoldText(name or "?"), + name = "" + ..TitanUtils_GetGoldText("Name: "..idx or "?").."\n" + ..TitanUtils_GetGoldText("Version: "..extra.version or "?").."\n" + ..TitanUtils_GetGoldText("Text: "..extra.menuText or "?").."\n" + ..TitanUtils_GetGoldText("Category: "..extra.category or "?").."\n" + , cmdHidden = true, order = 10, }, @@ -1316,11 +1409,16 @@ local function TitanUpdateExtras() name = L["TITAN_PANEL_EXTRAS_DELETE_BUTTON"], order = 15, type = "execute", width = "full", func = function(info, v) - TitanPluginSettings[info[1]] = nil -- delete the config entry + local pname = info[1] + TitanPluginSettings[pname] = nil -- delete the plugin settings + if TitanPluginExtras and TitanPluginExtras[pname] then + TitanPluginExtras[pname] = nil -- delete the extra plugin info + else + -- nothing to do; no error + end TitanPrint( " '"..info[1].."' "..L["TITAN_PANEL_EXTRAS_DELETE_MSG"] , "info") - TitanVariables_ExtraPluginSettings() -- rebuild the list TitanUpdateExtras() -- rebuild the options config AceConfigRegistry:NotifyChange("Titan Panel Addon Extras") -- tell Ace to redraw end, @@ -1330,6 +1428,15 @@ local function TitanUpdateExtras() end end + if ival == 0 then + args["none"] = { + order = 10, + type = "description", + name = "\n\n\n"..TitanUtils_GetGoldText(NONE or "None."), + cmdHidden = true + } + end +--]===] AceConfigRegistry:NotifyChange("Titan Panel Addon Extras") end ------------- @@ -1724,8 +1831,8 @@ local function TitanUpdateConfigAddons() set = function(info, v) local bar = TitanUtils_GetWhichBar(info[1]) TitanToggleVar(info[1], "DisplayOnRightSide"); - TitanPanel_RemoveButton(info[1]); - TitanUtils_AddButtonOnBar(bar, info[1]); +-- TitanPanel_RemoveButton(info[1]); +-- TitanUtils_AddButtonOnBar(bar, info[1]); TitanPanelButton_UpdateButton(info[1]) end, } @@ -1906,6 +2013,32 @@ local optionsAdvanced = { }, } +--[[ local +NAME: change history +DESC: Show change history of releases +:DESC +--]] +local changeHistory = { + name = TITAN_PANEL_CONFIG.topic.changes, --L["TITAN_PANEL_MENU_ADV"], + type = "group", + args = { + confchanges = { + order = 7, + name = CHANGES_COLON, + type = "group", inline = true, + args = { + confversiondesc = { + order = 1, + type = "description", + name = "" + ..changes, + cmdHidden = true + }, + } + }, + }, +} + --[[ Titan NAME: TitanUpdateConfig DESC: This routine will handle the requests to update the various data items in Titan options screens. @@ -1969,6 +2102,7 @@ AceConfig:RegisterOptionsTable("Titan Panel Addon Attempts", optionsAddonAttempt AceConfig:RegisterOptionsTable("Titan Panel Addon Extras", optionsExtras) AceConfig:RegisterOptionsTable("Titan Panel Addon Chars", optionsChars) AceConfig:RegisterOptionsTable("Titan Panel Addon Advanced", optionsAdvanced) +AceConfig:RegisterOptionsTable("Titan Panel Addon Changes", changeHistory) --]] -- Set the main options pages --[[ The first param must be the same as the cooresponding 'Ace register' @@ -1989,4 +2123,5 @@ AceConfigDialog:AddToBlizOptions("Titan Panel Skin Custom", optionsSkinsCustom.n AceConfigDialog:AddToBlizOptions("Titan Panel Addon Extras", optionsExtras.name, optionsControl.name) AceConfigDialog:AddToBlizOptions("Titan Panel Addon Attempts", optionsAddonAttempts.name, optionsControl.name) AceConfigDialog:AddToBlizOptions("Titan Panel Addon Advanced", optionsAdvanced.name, optionsControl.name) +AceConfigDialog:AddToBlizOptions("Titan Panel Addon Changes", changeHistory.name, optionsControl.name) diff --git a/Titan/TitanPanel.lua b/Titan/TitanPanel.lua index 87f784e..3b97559 100644 --- a/Titan/TitanPanel.lua +++ b/Titan/TitanPanel.lua @@ -314,7 +314,9 @@ function TitanPanel_PlayerEnteringWorld() TitanVariables_InitTitanSettings(); -- only do this sort of initialization on the first PEW event - if not TitanAllGetVar("Silenced") then + if TitanAllGetVar("Silenced") then + -- per user request + else TitanPrint("", "header") end @@ -370,8 +372,37 @@ function TitanPanel_PlayerEnteringWorld() end end + -- sanity checks to ensure the base tables are set + if (TitanSettings) then + -- all is good + else + TitanSettings = {} + end + -- check for player list per issue #745 + if TitanSettings.Players then + -- all is good + else + -- Create the table so profile(s) can be added + TitanSettings.Players = {} + end + if (TitanAll) then + -- all is good + else + TitanAll = {}; + end + local _ = nil TitanSettings.Player,_,_ = TitanUtils_GetPlayer() + local player_settings = TitanSettings.Players[TitanSettings.Player] + -- Used for Config > Extras + if player_settings.Extra then + -- We have some data + else + player_settings.Extra = {} + end + -- TitanPluginExtras must be set BEFORE registering plugins. + -- This table will build up until the user cleans up via Config > Extras + TitanPluginExtras = player_settings.Extra -- Some addons wait to create their LDB component or a Titan addon could -- create additional buttons as needed. -- So we need to sync their variables and set them up @@ -472,7 +503,7 @@ function TitanPanelBarButton:CVAR_UPDATE(cvarname, cvarvalue) or cvarname == "WINDOWED_MODE" or cvarname == "uiScale" then if TitanPlayerSettings and TitanPanelGetVar("Scale") then - Titan_AdjustScale() + TitanAdjustPanelScale() -- Adjust frame positions TitanPanel_AdjustFrames(true, "CVar update "..tostring(cvarname)) end @@ -486,7 +517,6 @@ function TitanPanelBarButton:PLAYER_LOGOUT() TitanPanelRegister.ToBe = TitanPluginToBeRegistered TitanPanelRegister.ToBeNum = TitanPluginToBeRegisteredNum TitanPanelRegister.TitanPlugins = TitanPlugins - TitanPanelRegister.Extras = TitanPluginExtras end end Titan__InitializedPEW = nil @@ -647,7 +677,7 @@ local function handle_reset_cmds(cmd_list) if not InCombatLockdown() then TitanPanelSetVar("Scale", 1); -- Adjust panel scale - Titan_AdjustScale() + TitanAdjustPanelScale() -- Adjust frame positions TitanPanel_AdjustFrames(true, "Config: adj scale") TitanPrint(L["TITAN_PANEL_SLASH_RESP3"], "info") @@ -1392,9 +1422,10 @@ function TitanPanel_InitPanelButtons() -- position the plugin relative to the prior plugin -- or the bar if it is the 1st r_prior = prior[TitanPanelSettings.Location[i]].right + r_spacing = r_prior.x * scale -- ========================= button:ClearAllPoints(); - button:SetPoint("RIGHT", _G[r_prior.button]:GetName(), r_prior.anchor, (-(r_prior.x) * scale), r_prior.y); + button:SetPoint("RIGHT", _G[r_prior.button]:GetName(), r_prior.anchor, (-r_spacing), r_prior.y); -- ========================= -- capture the button for the next plugin @@ -1877,12 +1908,12 @@ local function TitanPanel_PlayerSettingsMenu() if plugin.controlVariables.ShowIcon then info = {}; info.text = L["TITAN_PANEL_MENU_SHOW_ICON"]; - info.value = {id, "ShowIcon", nil}; + info.value = {plugin.id, "ShowIcon", nil}; info.func = function() - TitanPanelRightClickMenu_ToggleVar({id, "ShowIcon", nil}) + TitanPanelRightClickMenu_ToggleVar({plugin.id, "ShowIcon", nil}) end info.keepShownOnClick = 1; - info.checked = TitanGetVar(id, "ShowIcon"); + info.checked = TitanGetVar(plugin.id, "ShowIcon"); info.disabled = nil; TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); end @@ -1891,12 +1922,12 @@ local function TitanPanel_PlayerSettingsMenu() if plugin.controlVariables.ShowLabelText then info = {}; info.text = L["TITAN_PANEL_MENU_SHOW_LABEL_TEXT"]; - info.value = {id, "ShowLabelText", nil}; + info.value = {plugin.id, "ShowLabelText", nil}; info.func = function() - TitanPanelRightClickMenu_ToggleVar({id, "ShowLabelText", nil}) + TitanPanelRightClickMenu_ToggleVar({plugin.id, "ShowLabelText", nil}) end info.keepShownOnClick = 1; - info.checked = TitanGetVar(id, "ShowLabelText"); + info.checked = TitanGetVar(plugin.id, "ShowLabelText"); info.disabled = nil; TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); end @@ -1905,12 +1936,12 @@ local function TitanPanel_PlayerSettingsMenu() if plugin.controlVariables.ShowRegularText then info = {}; info.text = L["TITAN_PANEL_MENU_SHOW_PLUGIN_TEXT"] - info.value = {id, "ShowRegularText", nil}; + info.value = {plugin.id, "ShowRegularText", nil}; info.func = function() - TitanPanelRightClickMenu_ToggleVar({id, "ShowRegularText", nil}) + TitanPanelRightClickMenu_ToggleVar({plugin.id, "ShowRegularText", nil}) end info.keepShownOnClick = 1; - info.checked = TitanGetVar(id, "ShowRegularText"); + info.checked = TitanGetVar(plugin.id, "ShowRegularText"); info.disabled = nil; TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); end @@ -1919,12 +1950,12 @@ local function TitanPanel_PlayerSettingsMenu() if plugin.controlVariables.ShowColoredText then info = {}; info.text = L["TITAN_PANEL_MENU_SHOW_COLORED_TEXT"]; - info.value = {id, "ShowColoredText", nil}; + info.value = {plugin.id, "ShowColoredText", nil}; info.func = function() - TitanPanelRightClickMenu_ToggleVar({id, "ShowColoredText", nil}) + TitanPanelRightClickMenu_ToggleVar({plugin.id, "ShowColoredText", nil}) end info.keepShownOnClick = 1; - info.checked = TitanGetVar(id, "ShowColoredText"); + info.checked = TitanGetVar(plugin.id, "ShowColoredText"); info.disabled = nil; TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); end @@ -1934,12 +1965,12 @@ local function TitanPanel_PlayerSettingsMenu() info = {}; info.text = L["TITAN_PANEL_MENU_LDB_SIDE"]; info.func = function () - TitanToggleVar(id, "DisplayOnRightSide") - local bar = TitanUtils_GetWhichBar(id) - TitanPanel_RemoveButton(id); - TitanUtils_AddButtonOnBar(bar, id); + TitanToggleVar(plugin.id, "DisplayOnRightSide") +-- local bar = TitanUtils_GetWhichBar(id) +-- TitanPanel_RemoveButton(id); +-- TitanUtils_AddButtonOnBar(bar, id); end - info.checked = TitanGetVar(id, "DisplayOnRightSide"); + info.checked = TitanGetVar(plugin.id, "DisplayOnRightSide"); info.disabled = nil; TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); end diff --git a/Titan/TitanUtils.lua b/Titan/TitanUtils.lua index 4525759..3bdcbfd 100644 --- a/Titan/TitanUtils.lua +++ b/Titan/TitanUtils.lua @@ -766,20 +766,22 @@ OUT: None --]] function TitanPanelRightClickMenu_AddToggleRightSide(id, level) local plugin = TitanUtils_GetPlugin(id) - if plugin.controlVariables and plugin.controlVariables.DisplayOnRightSide then - -- copy of TitanPanelRightClickMenu_AddToggleVar adding a remove button + if plugin.controlVariables and plugin.controlVariables.DisplayOnRightSide == true then + TitanPanelRightClickMenu_AddToggleVar(L["TITAN_CLOCK_MENU_DISPLAY_ON_RIGHT_SIDE"], id, "DisplayOnRightSide", nil, level); +--[===[ local info = {}; info.text = L["TITAN_CLOCK_MENU_DISPLAY_ON_RIGHT_SIDE"]; info.value = {id, "DisplayOnRightSide"}; info.func = function() - local bar = TitanUtils_GetWhichBar(id) TitanPanelRightClickMenu_ToggleVar({id, "DisplayOnRightSide"}) - TitanPanel_RemoveButton(id); - TitanUtils_AddButtonOnBar(bar, id) +-- local bar = TitanUtils_GetWhichBar(id) +-- TitanPanel_RemoveButton(id); +-- TitanUtils_AddButtonOnBar(bar, id) end info.checked = TitanGetVar(id, "DisplayOnRightSide"); info.keepShownOnClick = 1; UIDropDownMenu_AddButton(info, level); +--]===] end end @@ -1473,7 +1475,6 @@ local function TitanUtils_RegisterPluginProtected(plugin) TitanPlugins[id].menuText = TitanPlugins[id].id; end TitanPlugins[id].menuText = NoColor(TitanPlugins[id].menuText) - table.insert(TitanPluginsIndex, self.registry.id); table.sort(TitanPluginsIndex, function(a, b) @@ -1490,6 +1491,26 @@ local function TitanUtils_RegisterPluginProtected(plugin) < string.lower(TitanPlugins[b].menuText); end ); + + --[[ TitanPluginExtras : Add to 'extras' to give user more info on which plugin settings to get rid of. + As the user adds plugins (Titan or LDB) this array will build up - + with the cooresponding settings info - until the user purges data from from the table. + + The table is saved under TitanSettings. + --]] + local ldb_cat = "" + if TitanPlugins[id] and TitanPlugins[id].ldb then + ldb_cat = "" + .." ["..TitanPlugins[id].ldb.."]" + else + ldb_cat = "" + end + TitanPluginExtras[id] = { + name = tostring(id or "?"), + menuText = tostring(TitanPlugins[id].menuText or "?"), + version = tostring(TitanPlugins[id].version or "?"), + category = tostring(TitanPlugins[id].category or "?")..ldb_cat, + } end end if issue ~= "" then diff --git a/Titan/TitanVariables.lua b/Titan/TitanVariables.lua index 95ec97f..accddd1 100644 --- a/Titan/TitanVariables.lua +++ b/Titan/TitanVariables.lua @@ -210,6 +210,7 @@ TitanPluginRegisteredNum = 0 --[[ Titan TitanPluginExtras table holds the plugin data for plugins that are in saved variables but not loaded on the current character. +Saved as TitanPlayerSettings.Extra TitanPluginExtrasNum is the number of plugins not loaded. --]] TitanPluginExtras = {} @@ -342,20 +343,6 @@ if fullversion then end end ---[[ local -NAME: TitanRegisterExtra -DESC: Add the saved variable data of an unloaded plugin to the 'extra' list in case the user wants to delete the data via Tian Extras option. -VAR: id - the name of the plugin (string) -OUT: None ---]] -local function TitanRegisterExtra(id) - TitanPluginExtrasNum = TitanPluginExtrasNum + 1 - TitanPluginExtras[TitanPluginExtrasNum] = - {num=TitanPluginExtrasNum, - id = (id or "?"), - } -end - -- routines to sync toon data local function CleanupProfile () if TitanPanelSettings and TitanPanelSettings["Buttons"] then @@ -586,26 +573,6 @@ function TitanVariables_SyncPluginSettings() -- one plugin uses this end --[[ Titan -NAME: TitanVariables_ExtraPluginSettings -DESC: Routine to mark plugin data that is not loaded (no lua file) but has plugin saved vars (last save to disk). -VAR: None -OUT: None -NOTE: This data is made available in case the user wants to delete the data via Tian Extras option. -:NOTE ---]] -function TitanVariables_ExtraPluginSettings() - TitanPluginExtrasNum = 0 - TitanPluginExtras = {} - -- Get the saved plugins that are not loaded - for id, plugin in pairs(TitanPluginSettings) do - if (id and TitanUtils_IsPluginRegistered(id)) then - else - TitanRegisterExtra(id) - end - end -end - ---[[ Titan NAME: TitanVariables_InitTitanSettings DESC: Ensure TitanSettings (one of the saved vars in the toc) exists and set the Titan version. VAR: None @@ -691,6 +658,7 @@ TitanDebug("_UseSettings " TitanPlayerSettings = TitanSettings.Players[to_profile]; TitanPluginSettings = TitanPlayerSettings["Plugins"]; TitanPanelSettings = TitanPlayerSettings["Panel"]; + Sync_panel_settings(TITAN_PANEL_SAVED_VARIABLES); if action == TITAN_PROFILE_RESET then @@ -733,14 +701,19 @@ TitanDebug("_UseSettings " else TitanVariables_PluginSettingsInit() end - TitanVariables_ExtraPluginSettings() end TitanSkins = TitanVariables_SyncSkins() Set_Timers(reset) + -- for debug if a user needs to send in the Titan saved vars - TitanPlayerSettings["Register"] = {} + if TitanPlayerSettings["Register"] then + -- From WoW saved vars + else + -- New install or after reset + TitanPlayerSettings["Register"] = {} + end TitanPanelRegister = TitanPlayerSettings["Register"] TitanSettings.Profile = to_profile diff --git a/Titan/locale/Localization.lua b/Titan/locale/Localization.lua index 95e52ae..a072909 100644 --- a/Titan/locale/Localization.lua +++ b/Titan/locale/Localization.lua @@ -54,28 +54,28 @@ L["TITAN_PANEL_REGISTER_START"] = "Register "..TITAN_PANEL.." plugins..." L["TITAN_PANEL_REGISTER_END"] = "Registration process done." -- slash command help -L["TITAN_PANEL_SLASH_RESET_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |cffffffff/titan {reset | reset tipfont/tipalpha/panelscale/spacing}"; -L["TITAN_PANEL_SLASH_RESET_1"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."reset: |cffffffffResets "..TITAN_PANEL.." to default values/position."; -L["TITAN_PANEL_SLASH_RESET_2"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."reset tipfont: |cffffffffResets "..TITAN_PANEL.." tooltip font scale to default."; -L["TITAN_PANEL_SLASH_RESET_3"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."reset tipalpha: |cffffffffResets "..TITAN_PANEL.." tooltip transparency to default."; -L["TITAN_PANEL_SLASH_RESET_4"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."reset panelscale: |cffffffffResets "..TITAN_PANEL.." scale to default."; -L["TITAN_PANEL_SLASH_RESET_5"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."reset spacing: |cffffffffResets "..TITAN_PANEL.." button spacing to default."; -L["TITAN_PANEL_SLASH_GUI_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |cffffffff/titan {gui control/trans/skin}"; -L["TITAN_PANEL_SLASH_GUI_1"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."gui control: |cffffffffOpens the "..TITAN_PANEL.." control GUI."; -L["TITAN_PANEL_SLASH_GUI_2"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."gui trans: |cffffffffOpens the Transparency control GUI."; -L["TITAN_PANEL_SLASH_GUI_3"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."gui skin: |cffffffffOpens the Skin control GUI."; -L["TITAN_PANEL_SLASH_PROFILE_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |cffffffff/titan {profile use <profile>}"; -L["TITAN_PANEL_SLASH_PROFILE_1"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."profile use <name> <server>: |cffffffffSets the profile to the requested saved profile."; -L["TITAN_PANEL_SLASH_PROFILE_2"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."<name>: |cffffffffcan be either the character name or the custom profile name." -L["TITAN_PANEL_SLASH_PROFILE_3"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."<server>: |cffffffffcan be either the server name or 'TitanCustomProfile'." -L["TITAN_PANEL_SLASH_SILENT_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |cffffffff/titan {silent}"; -L["TITAN_PANEL_SLASH_SILENT_1"] = LIGHTYELLOW_FONT_COLOR_CODE.."silent: |cffffffffToggles "..TITAN_PANEL.." to load silently."; -L["TITAN_PANEL_SLASH_ORDERHALL_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |cffffffff/titan {orderhall}"; -L["TITAN_PANEL_SLASH_ORDERHALL_1"] = LIGHTYELLOW_FONT_COLOR_CODE.."orderhall: |cffffffffToggles "..TITAN_PANEL.." to hide Order Hall Command Bar."; -L["TITAN_PANEL_SLASH_HELP_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |cffffffff/titan {help | help <topic>}"; -L["TITAN_PANEL_SLASH_HELP_1"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."<topic>: reset/gui/profile/silent/orderhall/help "; -L["TITAN_PANEL_SLASH_ALL_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |cffffffff/titan <topic>"; -L["TITAN_PANEL_SLASH_ALL_1"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."<topic>: |cffffffffreset/gui/profile/silent/orderhall/help "; +L["TITAN_PANEL_SLASH_RESET_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |r|cffffffff/titan {reset | reset tipfont/tipalpha/panelscale/spacing}|r"; +L["TITAN_PANEL_SLASH_RESET_1"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."reset: |r|cffffffffResets "..TITAN_PANEL.." to default values/position.|r"; +L["TITAN_PANEL_SLASH_RESET_2"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."reset tipfont: |r|cffffffffResets "..TITAN_PANEL.." tooltip font scale to default.|r"; +L["TITAN_PANEL_SLASH_RESET_3"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."reset tipalpha: |r|cffffffffResets "..TITAN_PANEL.." tooltip transparency to default.|r"; +L["TITAN_PANEL_SLASH_RESET_4"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."reset panelscale: |r|cffffffffResets "..TITAN_PANEL.." scale to default.|r"; +L["TITAN_PANEL_SLASH_RESET_5"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."reset spacing: |r|cffffffffResets "..TITAN_PANEL.." button spacing to default.|r"; +L["TITAN_PANEL_SLASH_GUI_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |r|cffffffff/titan {gui control/trans/skin}|r"; +L["TITAN_PANEL_SLASH_GUI_1"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."gui control: |r|cffffffffOpens the "..TITAN_PANEL.." control GUI.|r"; +L["TITAN_PANEL_SLASH_GUI_2"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."gui trans: |r|cffffffffOpens the Transparency control GUI.|r"; +L["TITAN_PANEL_SLASH_GUI_3"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."gui skin: |r|cffffffffOpens the Skin control GUI.|r"; +L["TITAN_PANEL_SLASH_PROFILE_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |r|cffffffff/titan {profile use <profile>}|r"; +L["TITAN_PANEL_SLASH_PROFILE_1"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."profile use <name> <server>: |r|cffffffffSets the profile to the requested saved profile.|r"; +L["TITAN_PANEL_SLASH_PROFILE_2"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."<name>: |r|cffffffffcan be either the character name or the custom profile name.|r" +L["TITAN_PANEL_SLASH_PROFILE_3"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."<server>: |r|cffffffffcan be either the server name or 'TitanCustomProfile'.|r" +L["TITAN_PANEL_SLASH_SILENT_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |r|cffffffff/titan {silent}|r"; +L["TITAN_PANEL_SLASH_SILENT_1"] = LIGHTYELLOW_FONT_COLOR_CODE.."silent: |r|cffffffffToggles "..TITAN_PANEL.." to load silently.|r"; +L["TITAN_PANEL_SLASH_ORDERHALL_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |r|cffffffff/titan {orderhall}|r"; +L["TITAN_PANEL_SLASH_ORDERHALL_1"] = LIGHTYELLOW_FONT_COLOR_CODE.."orderhall: |r|cffffffffToggles "..TITAN_PANEL.." to hide Order Hall Command Bar.|r"; +L["TITAN_PANEL_SLASH_HELP_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |r|cffffffff/titan {help | help <topic>}|r"; +L["TITAN_PANEL_SLASH_HELP_1"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."<topic>: |r|cffffffffreset/gui/profile/silent/orderhall/help |r"; +L["TITAN_PANEL_SLASH_ALL_0"] = LIGHTYELLOW_FONT_COLOR_CODE.."Usage: |r|cffffffff/titan <topic>|r"; +L["TITAN_PANEL_SLASH_ALL_1"] = " - "..LIGHTYELLOW_FONT_COLOR_CODE.."<topic>: |r|cffffffffreset/gui/profile/silent/orderhall/help |r"; -- slash command responses L["TITAN_PANEL_SLASH_RESP1"] = LIGHTYELLOW_FONT_COLOR_CODE..TITAN_PANEL.." tooltip font scale has been reset."; diff --git a/TitanBag/TitanBag.toc b/TitanBag/TitanBag.toc index ed76e63..9ec3576 100644 --- a/TitanBag/TitanBag.toc +++ b/TitanBag/TitanBag.toc @@ -1,10 +1,10 @@ ## Interface: 100002 -## Title: Titan Panel [|cffeda55fBag|r] |cff00aa006.00.10.100002|r +## Title: Titan Panel [|cffeda55fBag|r] |cff00aa006.00.11.100002|r ## Notes: Adds bag and free slot information to Titan Panel ## Author: Titan Panel Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 6.00.10.100002 +## Version: 6.00.11.100002 ## X-Child-Of: Titan TitanBag.lua diff --git a/TitanClock/TitanClock.toc b/TitanClock/TitanClock.toc index 7576138..c70c5ab 100644 --- a/TitanClock/TitanClock.toc +++ b/TitanClock/TitanClock.toc @@ -1,10 +1,10 @@ ## Interface: 100002 -## Title: Titan Panel [|cffeda55fClock|r] |cff00aa006.00.10.100002|r +## Title: Titan Panel [|cffeda55fClock|r] |cff00aa006.00.11.100002|r ## Notes: Adds a clock to Titan Panel ## Author: Titan Panel Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 6.00.10.100002 +## Version: 6.00.11.100002 ## X-Child-Of: Titan TitanClock.lua diff --git a/TitanGold/TitanGold.toc b/TitanGold/TitanGold.toc index c222b79..fd5e6e0 100644 --- a/TitanGold/TitanGold.toc +++ b/TitanGold/TitanGold.toc @@ -1,10 +1,10 @@ ## Interface: 100002 -## Title: Titan Panel [|cffeda55fGold|r] |cff00aa006.00.10.100002|r +## Title: Titan Panel [|cffeda55fGold|r] |cff00aa006.00.11.100002|r ## Notes: Keeps track of all gold held by a player's toons on a per server/faction basis. ## Author: Titan Panel Development Team (http://www.titanpanel.org) ## SavedVariables: GoldSave ## OptionalDeps: ## Dependencies: Titan -## Version: 6.00.10.100002 +## Version: 6.00.11.100002 ## X-Child-Of: Titan TitanGold.lua diff --git a/TitanLocation/TitanLocation.toc b/TitanLocation/TitanLocation.toc index e0270e9..a4e82e6 100644 --- a/TitanLocation/TitanLocation.toc +++ b/TitanLocation/TitanLocation.toc @@ -1,10 +1,10 @@ ## Interface: 100002 -## Title: Titan Panel [|cffeda55fLocation|r] |cff00aa006.00.10.100002|r +## Title: Titan Panel [|cffeda55fLocation|r] |cff00aa006.00.11.100002|r ## Notes: Adds coordinates and location information to Titan Panel ## Author: Titan Panel Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 6.00.10.100002 +## Version: 6.00.11.100002 ## X-Child-Of: Titan TitanLocation.lua diff --git a/TitanLootType/TitanLootType.toc b/TitanLootType/TitanLootType.toc index b80e883..467101a 100644 --- a/TitanLootType/TitanLootType.toc +++ b/TitanLootType/TitanLootType.toc @@ -1,10 +1,10 @@ ## Interface: 100002 -## Title: Titan Panel [|cffeda55fLootType|r] |cff00aa006.00.10.100002|r +## Title: Titan Panel [|cffeda55fLootType|r] |cff00aa006.00.11.100002|r ## Notes: Adds group loot and instance difficulty information to Titan Panel ## Author: Titan Panel Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 6.00.10.100002 +## Version: 6.00.11.100002 ## X-Child-Of: Titan TitanLootType.lua diff --git a/TitanPerformance/TitanPerformance.lua b/TitanPerformance/TitanPerformance.lua index 3132024..fc4c916 100644 --- a/TitanPerformance/TitanPerformance.lua +++ b/TitanPerformance/TitanPerformance.lua @@ -68,7 +68,7 @@ function TitanPanelPerformanceButton_OnLoad(self) ShowLabelText = true, ShowRegularText = false, ShowColoredText = true, - DisplayOnRightSide = false, + DisplayOnRightSide = true, }, savedVariables = { ShowFPS = 1, diff --git a/TitanPerformance/TitanPerformance.toc b/TitanPerformance/TitanPerformance.toc index 9ec7039..b6abcc1 100644 --- a/TitanPerformance/TitanPerformance.toc +++ b/TitanPerformance/TitanPerformance.toc @@ -1,10 +1,10 @@ ## Interface: 100002 -## Title: Titan Panel [|cffeda55fPerformance|r] |cff00aa006.00.10.100002|r +## Title: Titan Panel [|cffeda55fPerformance|r] |cff00aa006.00.11.100002|r ## Notes: Adds FPS and Garbage collection information to Titan Panel ## Author: Titan Panel Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 6.00.10.100002 +## Version: 6.00.11.100002 ## X-Child-Of: Titan TitanPerformance.lua diff --git a/TitanRepair/TitanRepair.toc b/TitanRepair/TitanRepair.toc index 536481e..0b480b9 100644 --- a/TitanRepair/TitanRepair.toc +++ b/TitanRepair/TitanRepair.toc @@ -1,10 +1,10 @@ ## Interface: 100002 -## Title: Titan Panel [|cffeda55fRepair|r] |cff00aa006.00.10.100002|r +## Title: Titan Panel [|cffeda55fRepair|r] |cff00aa006.00.11.100002|r ## Notes: Provides a configurable durability display. Also adds the ability to auto repair items and inventory at vendors ## Author: Titan Panel Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 6.00.10.100002 +## Version: 6.00.11.100002 ## X-Child-Of: Titan TitanRepair.lua diff --git a/TitanVolume/TitanVolume.toc b/TitanVolume/TitanVolume.toc index b075772..bc87b15 100644 --- a/TitanVolume/TitanVolume.toc +++ b/TitanVolume/TitanVolume.toc @@ -5,6 +5,6 @@ ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 6.00.10.100002 +## Version: 6.00.11.100002 ## X-Child-Of: Titan TitanVolume.lua diff --git a/TitanXP/TitanXP.toc b/TitanXP/TitanXP.toc index e6cc740..fbe44b7 100644 --- a/TitanXP/TitanXP.toc +++ b/TitanXP/TitanXP.toc @@ -1,10 +1,10 @@ ## Interface: 100002 -## Title: Titan Panel [|cffeda55fXP|r] |cff00aa006.00.10.100002|r +## Title: Titan Panel [|cffeda55fXP|r] |cff00aa006.00.11.100002|r ## Notes: Adds information to Titan Panel about XP earned and time to level ## Author: Titan Panel Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 6.00.10.100002 +## Version: 6.00.11.100002 ## X-Child-Of: Titan TitanXP.lua