diff --git a/Titan/Titan.lua b/Titan/Titan.lua
index 17ca730..601a835 100644
--- a/Titan/Titan.lua
+++ b/Titan/Titan.lua
@@ -73,7 +73,7 @@ end
---Titan The user wants to save a custom Titan profile. Show the user the dialog boxes to make it happen.
--- The profile is written to the Titan saved variables. A reload of the UI is needed to ensure the profile is written to disk for the user to load later.
-function TitanPanel_SaveCustomProfile()
+function TitanPanel_SaveCustomProfile(profile_name)
-- Create the dialog box code we'll need...
---helper to get the edit box depending on expansion API
@@ -90,7 +90,8 @@ function TitanPanel_SaveCustomProfile()
-- helper to actually write the profile to the Titan saved vars
local function Write_profile(name)
- local currentprofilevalue, _, _ = TitanUtils_GetPlayer()
+-- local currentprofilevalue, _, _ = TitanUtils_GetPlayer()
+ local currentprofilevalue = profile_name
local profileName = TitanUtils_CreateName(name, TITAN_CUSTOM_PROFILE_POSTFIX)
TitanSettings.Players[profileName] =
TitanUtils_DeepCopy(TitanSettings.Players[currentprofilevalue])
@@ -99,7 +100,9 @@ function TitanPanel_SaveCustomProfile()
TitanSettings.Players[profileName].Panel["SyncWithProfile"] = Titan_Global.profile.NONE
TitanPrint(L["TITAN_PANEL_MENU_PROFILE_SAVE_PENDING"]
- .. "'" .. name .. "'"
+ .. "'" .. profile_name .. "'"
+ .. " > '" .. profileName .. "'"
+-- .. " > '" .. name .. "'"
, "info")
end
-- helper to ask the user to overwrite a profile
diff --git a/Titan/TitanConfig.lua b/Titan/TitanConfig.lua
index ef5799d..fb809a5 100644
--- a/Titan/TitanConfig.lua
+++ b/Titan/TitanConfig.lua
@@ -1343,6 +1343,22 @@ local function SummaryText(profile)
return res
end
+local function EndProfileText(profile)
+ local res = ""
+
+ if profile.ptype == Titan_Global.profile.GLOBAL then
+ res = " : "..profile.cname
+ elseif profile.ptype == Titan_Global.profile.SYNC then
+ res = " : "..profile.cname
+ elseif profile.ptype == Titan_Global.profile.TOON then
+ res = " : "..Titan_Global.profile.NONE
+ else
+ res = " : ?"..Titan_Global.profile.NONE
+ end
+
+ return res
+end
+
-- These are here so the config function can see them (not sure this works...).
local players = {} -- used for left side list of profiles
local p_info = {} -- used to hold info about each toon in players
@@ -1374,6 +1390,7 @@ local function TitanUpdateChars()
this_toon.name = index
this_toon.profile = TitanVariables_GetProfile(index)
this_toon.summary = SummaryText(this_toon.profile)
+ this_toon.toon_header = this_toon.fancy_name..EndProfileText(this_toon.profile)
this_toon.is_player = (index == TitanUtils_GetPlayer())
this_toon.sync_set = not (id.Panel["SyncWithProfile"] == Titan_Global.profile.NONE)
this_toon.sync_name = id.Panel["SyncWithProfile"]
@@ -1427,7 +1444,7 @@ local function TitanUpdateChars()
position = position + 1
p_args.name = {
type = "header",
- name = TitanUtils_GetGoldText(this_toon.name or "?"),
+ name = TitanUtils_GetGoldText(this_toon.toon_header or "?") ,
cmdHidden = true,
order = position,
}
@@ -1455,6 +1472,10 @@ local function TitanUpdateChars()
-- width = "0.4",
func = function(info, v)
TitanVariables_UseSettings(info[1], TitanUtils_GetPlayer(), TITAN_PROFILE_USE)
+ TitanPrint(
+ L["TITAN_PANEL_MENU_LOAD_SETTINGS"]
+ .. " > " .. info[1].. ""
+ , "info")
end,
-- does not make sense to load current character profile
disabled = (this_toon.is_player or g_sync),
@@ -1480,7 +1501,7 @@ local function TitanUpdateChars()
TitanSettings.Players[info[1]] = nil -- delete the entry
TitanPrint(
L["TITAN_PANEL_MENU_PROFILE"]
- .. info[1]
+ .. " " .. info[1].. " "
.. L["TITAN_PANEL_MENU_PROFILE_DELETED"]
, "info")
TitanUpdateChars() -- rebuild the toons
@@ -1512,49 +1533,59 @@ local function TitanUpdateChars()
order = position,
}
position = position + 1
- p_args.optionsave = {
- order = position,
- type = "execute",
- -- width = "0.5",
- name = L["TITAN_PANEL_MENU_PROFILE_SAVE"] .. " " .. L["TITAN_PANEL_MENU_PROFILE_CUSTOM"],
- desc = L["TITAN_PANEL_MENU_PROFILE_SAVE_DESC"],
- func = function(info, v)
- TitanPanel_SaveCustomProfile()
- TitanUpdateChars() -- rebuild the toons
- end,
- }
- position = position + 1
p_args.reset_this = {
- name = L["TITAN_PANEL_MENU_PROFILE_RESET"], --
- desc = L["TITAN_PANEL_MENU_PROFILE_RESET_DESC"],
+ --name = L["TITAN_PANEL_MENU_PROFILE_RESET"].." : "..this_toon.profile.cname, --
+ --desc = L["TITAN_PANEL_MENU_PROFILE_RESET_DESC"],
+ name = "Reset Profile in Use", --
+ desc = "Will reset".." : "..this_toon.profile.cname,
order = position,
type = "execute",
- -- width = "0.5",
+ --width = "1.0",
func = function(info, v)
+ local selected = info[1]
local str = ""
str = str
- .. " " .. tostring(Titan_Global.profile.TOON) .. ""
- .. " > '" .. tostring(info[1]) .. "'"
+ .. " " .. tostring(selected) .. ""
+ .. " > '" .. tostring(this_toon.profile.cname) .. "'"
.. " : '" .. tostring(TITAN_PROFILE_RESET) .. "'"
-- .. " | '" .. tostring(p_info[info[1]].is_player) .. "'"
Titan_Debug.Out('titan', 'profile', str)
- if this_toon.is_player then
- -- Change over to new profile
- TitanVariables_UseSettings(nil, TitanUtils_GetPlayer(), TITAN_PROFILE_RESET)
- else
- -- Not this toon. Next time user plays this toon it will reset
- TitanSettings.Players[info[1]] = nil
- end
+ -- Disabled if not current toon, otherwise it gets way complicated...
+ TitanVariables_UseSettings(nil, TitanUtils_GetPlayer(), TITAN_PROFILE_RESET)
+
+ TitanPrint(
+ L["TITAN_PANEL_MENU_PROFILE_RESET"]
+ .. " "..selected
+ , "info")
TitanUpdateChars()
AceConfigRegistry:NotifyChange("Titan Panel Addon Chars")
end,
- disabled = (g_sync),
+ disabled = not (this_toon.is_player),
+ }
+ position = position + 1
+ p_args[tostring(position)] = {
+ type = "description",
+ name = " ",
+ cmdHidden = true,
+ order = position,
+ }
+ position = position + 1
+ p_args.optionsave = {
+ order = position,
+ type = "execute",
+ -- width = "0.5",
+ name = L["TITAN_PANEL_MENU_PROFILE_SAVE"] .. " " .. L["TITAN_PANEL_MENU_PROFILE_CUSTOM"],
+ desc = L["TITAN_PANEL_MENU_PROFILE_SAVE_DESC"],
+ func = function(info, v)
+ TitanPanel_SaveCustomProfile(info[1]) -- will output message on write
+ TitanUpdateChars() -- rebuild the toons
+ end,
}
position = position + 1
- p_args.sp_39 = {
+ p_args[tostring(position)] = {
type = "description",
name = " ",
cmdHidden = true,
@@ -1593,6 +1624,12 @@ local function TitanUpdateChars()
.. " : '" .. tostring(TITAN_PROFILE_USE) .. "'"
Titan_Debug.Out('titan', 'profile', str)
+ TitanPrint(""
+ .. "" .. L["TITAN_PANEL_MENU_PROFILE_SYNC"] .. ""
+ .. " '" .. TitanUtils_GetPlayer() .. "'"
+ .. " > '" .. tostring(info[1]) .. "'"
+ , "info")
+
-- Change over to new profile
-- TitanVariables_UseSettings(nil, info[1], TITAN_PROFILE_USE)
TitanVariables_UseSettings(nil, TitanUtils_GetPlayer(), TITAN_PROFILE_USE)
@@ -1619,13 +1656,18 @@ local function TitanUpdateChars()
Titan_Debug.Out('titan', 'profile', str)
- if p_info[info[1]].is_player then
+ if info[1] == TitanUtils_GetPlayer() then
-- Change over to new profile
TitanVariables_UseSettings(nil, TitanUtils_GetPlayer(), TITAN_PROFILE_USE)
else
-- Not this toon
end
+ TitanPrint(""
+ .. "" .. L["TITAN_PANEL_MENU_PROFILE_CLEAR_SYNC"] .. ""
+ .. " '" .. tostring(info[1]) .. "'"
+ , "info")
+
TitanUpdateChars()
AceConfigRegistry:NotifyChange("Titan Panel Addon Chars")
end,
@@ -1671,6 +1713,12 @@ local function TitanUpdateChars()
.. " : '" .. tostring(TITAN_PROFILE_USE) .. "'"
Titan_Debug.Out('titan', 'profile', str)
+
+ TitanPrint(""
+ .. "" .. "Sync All" .. ""
+ .. " > '" .. tostring(info[1]) .. "'"
+ , "info")
+
-- Change over to new profile
TitanVariables_UseSettings(nil, TitanUtils_GetPlayer(), TITAN_PROFILE_USE)
TitanUpdateChars()
@@ -1693,6 +1741,11 @@ local function TitanUpdateChars()
.. " : '" .. tostring(Titan_Global.profile.NONE) .. "'"
Titan_Debug.Out('titan', 'profile', str)
+ TitanPrint(""
+ .. "" .. "Clear Sync All" .. ""
+ .. " > '" .. tostring(info[1]) .. "'"
+ , "info")
+
-- Change over to new profile
TitanVariables_UseSettings(nil, TitanUtils_GetPlayer(), TITAN_PROFILE_USE)
@@ -1701,6 +1754,7 @@ local function TitanUpdateChars()
end,
disabled = (not g_sync),
}
+ --[[
position = position + 1
p_args.reset_all_this = {
name = "Reset Global Profile", --L["TITAN_PANEL_MENU_PROFILE_RESET"], --
@@ -1730,6 +1784,7 @@ local function TitanUpdateChars()
end,
disabled = (not g_sync),
}
+ --]]
--[[
position = position + 1
p_args[tostring(position)] = {
@@ -1747,7 +1802,7 @@ local function TitanUpdateChars()
order = position,
}
- --====
+--[[ --====
--==== Summary section
position = position + 1
p_args.setting_title = {
@@ -1763,7 +1818,7 @@ local function TitanUpdateChars()
cmdHidden = true,
order = position,
}
-
+--]]
-- tell the options screen there is a new list
AceConfigRegistry:NotifyChange("Titan Panel Addon Chars")
end
diff --git a/Titan/TitanVariables.lua b/Titan/TitanVariables.lua
index 16c518f..1c6b0db 100644
--- a/Titan/TitanVariables.lua
+++ b/Titan/TitanVariables.lua
@@ -1133,9 +1133,10 @@ local function Check_toon_settings(toon, toon_table)
local str = ""
if TitanSettings.Players[toon] == nil
- or TitanSettings.Players[toon] == {} then
+ or TitanSettings.Players[toon] == TITAN_PROFILE_RESET then
-- build debug output
str = "Init_player_settings"
+ .. " " .. tostring(TitanSettings.Players[toon]) .. ""
.. " " .. tostring("TitanSettings.Players[] {}") .. ""
Titan_Debug.Out('titan', 'profile', str)
@@ -1695,6 +1696,28 @@ function TitanVariables_UseSettings(from, profile, action)
-- ==== Determine the profile to use based on profile settings
local profile_info = TitanVariables_GetProfile(profile)
local profile_name = profile_info.pname
+ --[[
+ if action == TITAN_PROFILE_USE then
+ local profile_info = TitanVariables_GetProfile(profile)
+ profile_name = profile_info.pname
+ elseif action == TITAN_PROFILE_RESET then
+ profile_name = profile
+ else
+ -- action == TITAN_PROFILE_INIT
+ -- OR something bad; use curent toon
+ if profile == nil then
+ -- Likely login of current toon
+ profile, _, _ = TitanUtils_GetPlayer()
+ else
+ -- Use what was given
+ end
+ str = "_UseSettings - init check"
+ .. " for '" .. tostring(profile) .. "'"
+ Titan_Debug.Out('titan', 'profile', str)
+ local profile_info = TitanVariables_GetProfile(profile)
+ profile_name = profile_info.pname
+ end
+ --]]
--[[
-- User setting 'sync with' will cause profile to change to the user selected sync.
if action == TITAN_PROFILE_USE then
diff --git a/Titan/_ATitanDoc.lua b/Titan/_ATitanDoc.lua
index ebaf604..bdf174a 100644
--- a/Titan/_ATitanDoc.lua
+++ b/Titan/_ATitanDoc.lua
@@ -12,12 +12,14 @@ Many of Titan mysteries will be explained. 🙂
The Titan team and its users are available to answer questions.
The two most used ways are :
-The Titan Discord community - https://discord.gg/e93sxuSPwC
-Curse comments under Titan Panel addon
+- The Titan Discord community
+- Curse comments under Titan Panel addon
=== IDE Tools used:
+For small changes to Titan, an editor with syntax highlighting and code folding features such as NotepadPlusPlus can be used.
+
Visual Studio Code - https://code.visualstudio.com/
-Other IDEs accept Lua Language Server, see if your prefered IDE will accept LLS
+Other IDEs accept Lua Language Server, see if your prefered IDE will accept LLS.
Lua Language Server (LLS) - https://marketplace.visualstudio.com/items?itemName=sumneko.lua
https://github.com/LuaLS/lua-language-server
@@ -26,13 +28,18 @@ WoW API - LLS extension - https://marketplace.visualstudio.com/items?itemName=ke
And a tiny Python parser to pull these comments.
-Note: The WoW API is geared to Retail.
-There was no option to automatically include 'Classic' deprecated routines.
-There are diagnostic annotations used to ignore some warnings.
-Ignore warning annotations were limited as much as practical to 'this line' to point out usage of Classic routines.
+Note:
+ - The WoW API plugin is geared to Retail.
+ There was no option to automatically include 'Classic' deprecated routines.
+ - There are diagnostic annotations used to ignore some warnings.
+ Ignore warning annotations were limited as much as practical to 'this line' to point out usage of Classic routines.
+ - Files or folders for the IDE such as .vscode; Titan.code-workspace; and others are included in the TItan release.
+
+The file _TitanIDE.lua contains Titan specific IDE Intellisense definitions. It is NOT included in the TOC file.
=== Documentation blocks
These are created from annotations in the Lua files.
+
API :
These are routines Titan will keep stable.
Changes to these varaibles and routines will be broadcast to developers via Discord at a minimum.
@@ -46,7 +53,7 @@ Each file has a terse description of its contents.
--[===[ Titan Start editing
-Before you start changing this example, it is HIGHLY recommended to install the following WoW addons:
+Before you start changing any code, it is HIGHLY recommended to install the following WoW addons:
- BugGrabber : Grabs errors and stores them
- BugSack : The visual part of BugGrabber
- WowLua : This allows you to try Lua code directly in WoW.
@@ -55,12 +62,6 @@ Small changes are recommended; then test your coding.
When testing, just start or reload WoW. All versions now check and load new files on reload.
Reload is /reload in game chat.
-Using a text editor with code folding features will make this file easier to read and find information.
-
-For simple changes, install a code / text editor. NotepadPlusPlus is a very popular editor.
-
-For more in delpth changes consider using an IDE (Integrated Development Environment).
-The file TitanIDE contains details on tools and annotation.
Regardless of tools used, please update any annotations and comments as changes are made!!!
@@ -86,18 +87,15 @@ Inside the Titan folder you will notice :
=== .toc
-NOTE: Summer 2025 Titan dropped TitanClassic as a method to make CE and other WoW versions distinct.
+The site https://warcraft.wiki.gg/wiki/TOC_format contains more info than you will ever need on TOC format.
The folder and the .toc files MUST have the same name!
Sort of... the name prior to the underscore(_) must be the same as the folder name.
The part after (postfix) has meaning to the WoW addon loader.
This list changes : https://warcraft.wiki.gg/wiki/TOC_format
-Titan uses at least two postfix values.
-_Mainline : current retail version
-_Vanilla : Classic Era version
-
-Titan uses this TOC method. Notice a couple built-ins use _Vanilla.toc.
+Titan uses at least one postfix value - _Vanilla - for Classic Era version
+Notice Ammo and Regen use _Vanilla.toc files.
This allows Titan to load plugins (built-in or 3rd party) intended for Classic only without change.
=== .toc internals
@@ -107,13 +105,12 @@ DragonFlight 10.02.05 is represented without dots - 100207 - in the .toc.
If the interface value is higher or lower, WoW will complain that you are running 'out of date' addons.
-See one of the referrenced sites for more detail.
-- https://warcraft.wiki.gg/wiki/TOC_format contains more info than you will ever need on TOC format.
+The Interface value can be a list of WoW versions.
After the TOC directives, Titan lists the files in the order they are to be parsed.
This is important for Titan (or any addon) to load properly.
-TitanGame.Lua specifies TITAN_ID which is the addon ID and is determines whether to use Retail or Classic versions of some routines.
+TitanGame.Lua specifies TITAN_ID used throughout Titan.
Then the Ace libraries. Note Titan does not use all the Ace libraries.
_Titan_Lib_Notes shows a running change history of the libraries.
@@ -128,31 +125,31 @@ WoW tends to use .tga image files.
Lookup TextureBase:SetTexture for current accepted image types.
NOTE: All versions of WoW may not accept all image types.
-Most graphic art software can save to these formats. We don’t recommend using an online source to convert options.
+Most graphic art software can save to these formats. We don’t recommend using an online source to convert one image format to another.
They have a tendency to add additional code or info to the artwork.
--]===]
--[===[ Titan Addon code flow
First step: ==== Starting WoW
-Wow will load load Titan along with other addons installed. There is no guarantee of order the addons are installed!
+Wow will load Titan along with other addons installed. The order addons are installed is not guaranteed!
-The files will be loaded / run per the order in the TOC.
-TitanTemplate.xml : Creates the Titan frame - TitanPanelBarButton - along with Titan Templates. This is used to receive events.
-
-Any code outside the Lua functions will be run per the order in the TOC.
+The files listed in the TOC will will be loaded and run in the order listed.
Examples:
- TitanGlobal.lua sets up constants and variables used by Titan
+- TitanTemplate.xml : Creates the Titan frame - TitanPanelBarButton - used to receive events.
- Titan.lua local variables and registering for some events such as ADDON_LOADED
- Creation of functions
-- TitanLDB.lua creates LDBToTitan frome to handle LDB objects
+- TitanLDB.lua creates LDBToTitan frame to handle LDB objects
-When ADDON_LOADED event is received,
+ADDON_LOADED event is fired after every addon WoW is loaded.
+When ADDON_LOADED event for Titan is received:
- Titan registers for event PLAYER_ENTERING_WORLD
-- Titan ensures its saved variables are whole and known player profiles are read.
+- Titan ensures its saved variables are whole and known player profiles are read
NOTE: On ADDON_LOADED is the first time addon saved variables should be considered loaded and safe!!
-Using addon saved variables before ADDON_LOADED is likely to result in nil(s). Such as when WoW parses the addon code as it is loading.
+Using addon saved variables before ADDON_LOADED is likely to result in nil(s).
+
NOTE: The addon saved vars are NOT the Titan plugin saved vars via the registry (.savedVariables)! The registry is processed later!
Next: ==== Waiting for WoW
@@ -160,18 +157,20 @@ WoW fires a bunch of events as this and other addons are loaded.
Eventually the game and all addons are loaded and PLAYER_ENTERING_WORLD event is sent
Next: ==== Entering world - PLAYER_ENTERING_WORLD (PEW) event
+NOTE: This event (with parameter) is sent on both login and reload.
+
When PLAYER_ENTERING_WORLD event is received via OnEvent, the real work begins.
-The PEW events do NOT guarantee order! Titan plugins (addons) could receive a PEW before Titan - See NOTE below.
+The PEW events do NOT guarantee order across addons, even if a dependency is listed! Titan plugins (addons) could receive a PEW before Titan - See NOTE below.
The local routine - TitanPanel_PlayerEnteringWorld - is called using pcall.
-This ensures Titan reacts to errors rather than forcing an error to the user.
+This ensures Titan reacts to errors rather than forcing an error to the user and leaving Titan (and possibly the user) in a bad state.
TitanPanel_PlayerEnteringWorld does all the variable and profile setup for the character entering the world.
On login PLAYER_ENTERING_WORLD - not reload - Titan
- Sets character profiles - TitanVariables_InitTitanSettings
- Sets TitanPanel*Anchor for other addons to adjust for Titan
- Creates all Titan bars including right click menu and auto hide frames. See Frames below.
-- Registers for events Titan uses - RegisterForEvents
+- Registers for events Titan - RegisterForEvents
On login and reload Titan
- Set THIS character profile () - TitanVariables_UseSettings -
@@ -180,12 +179,13 @@ On login and reload Titan
TitanVariables_UseSettings uses
- TitanPanel_InitPanelBarButton to set the bars the user wants.
- TitanPanel_InitPanelButtons to set the plugins the user wants on the user selected bars via OnShow.
-- Update the Titan config tables - TitanUpdateConfig
+- Update the Titan config tables for the config screens - TitanUpdateConfig
- Set Titan font and strata
- Sync any LDB plugins with the cooresponding Titan plugin- TitanLDBRefreshButton
+
If the above was successful then all is good
If the above failed with an error then
-- tell user some bad happened with error they can pass to dev team
+- tell user something bad happened along with the error they can pass to the dev team
- attempt to hide all bars as cleanup
- nuke the Titan config tables as cleanup
@@ -193,30 +193,31 @@ NOTE: The PEW event is an important but subtle distinction for Titan plugins!
Titan plugins should be very careful if they use the PEW event to run code. The PEW events do NOT guarantee order!
Meaning the plugin PEW could be processed BEFORE Titan has set saved vars for itself or plugins.
Titan plugins should not assume ANY saved vars are available until their OnShow.
-Only at the OnShow are the 'right' plugin saved vars guaranteed to be set.
+Only at the OnShow is the profile known and the plugin saved vars guaranteed to be set.
We have seen bugs occur on some user systems due to the order addons get and process the PEW event.
--]===]
--[[ Frames and Frame Scripts
-Here we detour into XML. TitanTemplate.xml contains the frames used by Titan.
+Here we detour into XML. TitanTemplate.xml contains the frame definitions used by Titan.
- TitanPanelBarButton : This "is" Titan in the sense that it has all events attached to it and all the code.
- Titan_Bar__Display_Template : The template (Button) for a Titan bar.
- TitanPanelBarButtonHiderTemplate : The template (Button) paired a full width Titan bar to allow hiding and unhiding the paired Titan Bar.
- TitanPanelTooltip : This or GameTooltip is used for tool tips.
+Currently, the only way to define a 'virtual' template is in XML.
-TitanPanelButton_CreateBar in Titan.lua creates the full width bars and short bars by looping through TitanBarData.
TitanBarData in TitanVariables.lua holds creation data for each bar.
+TitanPanelButton_CreateBar in Titan.lua creates the full width bars and short bars by looping through TitanBarData.
TitanBarDataVars holds the Titan and user settings for each bar. An initial setup (fresh / another install) uses TitanBarVarsDefaults.
-The frame scripts are how WoW and Titan interact with this addon.
+The frame scripts (OnShow, etc) are how WoW and Titan interact with this addon.
-==== OnEnter and OnLeave
-Titan sets these scripts on a Bar for future use . Currently Titan does no work.
+==== OnEnter and OnLeave frame scripts :
+Titan sets these scripts on a Bar for future use. Currently Titan does no work.
For Titan Hider Bars these are used to show / hide the Titan Bar.
Note: Hider Bars are only for the full width bars - NOT Short Bars.
-==== OnClick script :
+==== OnClick frame scripts :
Right click is to open the Titan menu.
Left click closes any tooltip and any menu.
@@ -224,13 +225,13 @@ On Short Bars Titan registers for
- OnDragStart and OnDragStop (left mouse button) for moving Short Bars
- OnMouseWheel to size a Short Bar
-==== OnShow script :
+==== OnShow frame script :
Not used by Titan bars.
-==== OnHide script :
+==== OnHide frame script :
Not used by Titan bars.
-==== OnEvent script :
+==== OnEvent frame script :
Titan.lua sets the OnEvent stript for TitanPanelBarButton to redirect events to TitanPanelBarButton:<registered event>
See local function RegisterForEvents for the list of eventsand their usage.
--]]
@@ -238,21 +239,21 @@ See local function RegisterForEvents for the list of eventsand their usage.
--[[ Plugin .registry
=== Titan plugins
+Plugins are the heart of Titan. They provide the information and features users want to see
The routine - TitanUtils_RegisterPluginList - starts the plugin registry process.
=== LDB objects : See LDBTitan.lua for many more details.
-
The OnEvent script of LDBToTitan frame processes the PLAYER_LOGIN event.
This starts the process to convert all known LDB objects into Titan plugins.
-Note: PLAYER_LOGIN occurs same time or very close to PLAYER_ENTERING_WORLD.
+
+Note: PLAYER_LOGIN occurs at same time or very close to PLAYER_ENTERING_WORLD.
This event was chosen by the orignal developer.
Each object found calls TitanLDBCreateObject using pcall to protect Titan.
Before Titan is initialized (first PLAYER_ENTERING_WORLD) the LDB object will be added to the plugin list.
-After, TitanUtils_RegisterPluginList will be used iteratively to register each found LDB object.
-Most LDB objects are created on loading by addons. There should only an issue for addons that create
-many LDB objects on demand.
+As part of the PEW event processing, TitanUtils_RegisterPluginList will be used iteratively to register each found LDB object.
+Most LDB objects are created on loading by addons. There may be an issue for addons that create many LDB objects on demand.
The Titan plugin example has a lot more detail from the plugin view that would be helpful to a Titan dev.
--]]
@@ -276,13 +277,16 @@ TitanSettings contains all the plugin saved variables.
Titan uses the single table structure to store the saved variables across a user account.
This makes the setup code rather cumbersome and not straight forward - just warning...
-The saved variables can be found here: .../World of Warcraft/_retail_/WTF/Account/(account name>/SavedVariables/Titan.lua
+The saved variables can be found here: .../World of Warcraft/_retail_/WTF/Account/<account name>/SavedVariables/Titan.lua
There is a Titan.lua.bak which is the prior save (logout / exit / reload).
+NOTE : _retail_ is for Retail WoW. Classic and other WoW versions will have different folder names, such as _classic_era_, _beta_, _*ptr_, etc.
+
It is HIGHLY recommended opening the saved variables file in an editor with code folding features!
This file could be quite large with many lines.
I have 20+ characters on one server. Even though I do not use many addons, I do test with addons on some characters.
-A plugin such as Titan Panel [Reputation] can create 100+ plugins. My file is nearly 90,000 lines long!
+My file is nearly 90,000 lines long!
+A plugin such as Titan Panel [Reputation] can create 100+ plugins.
Say we want to find a character named Embic on Staghelm which you are using for testing.
This would under
diff --git a/Titan/_TitanIDE.lua b/Titan/_TitanIDE.lua
index 97ddd06..59b2f30 100644
--- a/Titan/_TitanIDE.lua
+++ b/Titan/_TitanIDE.lua
@@ -1,11 +1,30 @@
--[===[ File
This file is NOT to be included in the TOC file!
This is intended for IDE Intellisense.
---]===]
+
+
+ This file is to remove errors and warnings thrown by the Intellisense tools used.
+ It declares variables and tables :
+ - That are not readily available to the IDE
+ - That are declared via indirection as the drop down lib is
+ - When Lua Intellisense parser is stricter than Lua is
+ - When Titan is checking for an addon the user may or may not have loaded
+
+ Titan may contain IDE annotations.
+ These are ---@<tag> to help the parser understand the intent of the code.
+
+ Some Titan files may contain lines beginning with
+---@diagnostic
+ These remove LLS errors where
+ - Titan is handling Classic versions that use deprecated routines
+ - Possibly the WoW extension is out of date or the Blizz documentation is wrong
+
+ Note: the diagnostic could be by line, file, or workspace / project.
+ --]===]
--[[ IDE
This file is NOT to be included in the TOC file!
- This is intended to be used for IDE Intellisense.
+ This is intended to be used by IDE Intellisense feature.
These tools can make dev a lot easier.
Visual Studio Code - https://code.visualstudio.com/
@@ -32,24 +51,6 @@
- Ignore warning annotations were limited as much as practical to 'this line' to point out usage of Classic routines.
- Files or folders for the IDE such as .vscode; Titan.code-workspace; and others are included in the TItan release.
-
- This file is to remove errors and warnings thrown by the Intellisense tools used.
- It declares variables and tables :
- - That are not readily available to the IDE
- - That are declared via indirection as the drop down lib is
- - When Lua Intellisense parser is stricter than Lua is
- - When Titan is checking for an addon the user may or may not have loaded
-
- Titan may contain IDE annotations.
- These are ---@<tag> to help the parser understand the intent of the code.
-
- Some Titan files may contain lines beginning with
----@diagnostic
- These remove LLS errors where
- - Titan is handling Classic versions that use deprecated routines
- - Possibly the WoW extension is out of date or the Blizz documentation is wrong
-
- Note: the diagnostic could be by line, file, or workspace / project.
--]]
-- Use Linux command below to get a rough line count of a Titan release.