Quantcast

- Example plugin and LDB : Expand comments and tweak code

urnati [02-01-24 - 16:15]
- Example plugin and LDB : Expand comments and tweak code
Filename
TitanExampleLDB/StarterLDB.lua
TitanExamplePlugin/TitanStarter.lua
diff --git a/TitanExampleLDB/StarterLDB.lua b/TitanExampleLDB/StarterLDB.lua
index a9e5e1c..800039b 100644
--- a/TitanExampleLDB/StarterLDB.lua
+++ b/TitanExampleLDB/StarterLDB.lua
@@ -7,8 +7,13 @@ It is based loosely on the Titan Bag addon but is not Titan specific.
 It is not required that a display addon exist for your addon to run; Such as Titan :-)
 However your addon will need to enable command line commands or the user will not be able to see or do anything.

-Enjoy!
+If running this example, it shows up in the Titan right click menu > General > LDBStarter
+
+NOTE: Before running this addon, the folder and file prefix must be the same to be considered for loading into WoW!
+For example to just run this as is, remove the 'Example' from the folder name then start or reload WoW.
+This is explained in more detail below in 'Folder Structure'.

+Enjoy!
 By: The Titan Development Team
 --]]

@@ -195,9 +200,7 @@ local function LDB_Init(LDB_frame)
 			-- SDK: The two options are:
 			--      "data source" - A data source is expected to show some type of info
 			--      "launcher" - Expected to open another window or perform some action
-
-			-- For some unknown reason, Classic Era shows a tiny icon... Wrath and Retail show fine...
-			icon = artwork_path.."Starter", -- The icon to display on the display addon
+			icon = artwork_path.."Starter.tga", -- The icon to display on the display addon
 			label = id, -- label is the text the user will use to find this addon in the display addon.
 			text  = "nyl", -- will be updated later
 			OnTooltipShow = function(tooltip)
diff --git a/TitanExamplePlugin/TitanStarter.lua b/TitanExamplePlugin/TitanStarter.lua
index a46b79a..e559856 100644
--- a/TitanExamplePlugin/TitanStarter.lua
+++ b/TitanExamplePlugin/TitanStarter.lua
@@ -5,19 +5,23 @@
 -- * By: The Titan Panel Development Team
 -- **************************************************************************
 --]]
+
 --[[ Example
 This is an example Titan (Titen Panel) plugin based on Titan Bag.
 It is intended to introduce Titan plugin essentials by using a basic addon
 with a lot of comments. This can be run as is then changed to implement your great idea!

+If running this example, it shows up in the Titan right click menu > Information > Starter
+
+NOTE: Before running this addon, the folder and file prefix must be the same to be considered for loading into WoW!
+For example to just run this as is, remove the 'Example' from the folder name then start or reload WoW.
+This is explained in more detail below in 'Folder Structure'.
+
 NOTE: The terms addon and plugin are essentially the same.
 Here plugin is used when the addon is displayed by Titan.
 --]]

 --[[ Folder Structure
-NOTE: Before running this addon, the folder and file prefix must be the same to be considered for loading into WoW!
-For example to just run this as is, remove the 'Example' from the folder name then start or reload WoW.
-This is explained in more detail below.


 This plugin folder must be added to the Addon folder to be considered for loading into WoW.
@@ -80,7 +84,7 @@ The other routines will be modified to impement your idea.
 --]]

 --[[ Code flow
-NOTE: The .toc states Titan is required [## Dependencies: Titan].
+NOTE: The .toc states Titan or TitanClassic is required [## Dependencies: Titan].
 WoW insures Titan is loaded BEFORE this addon.

 First step: ==== Starting WoW
@@ -588,7 +592,7 @@ local function OnLoad(self)
 		id = TITAN_PLUGIN,
 		category = "Information",
 		version = VERSION,
-		menuText = L["TITAN_BAG_MENU_TEXT"],
+		menuText = TITAN_PLUGIN,
 		buttonTextFunction = "TitanPanelBagButton_GetButtonText",
 		tooltipTitle = L["TITAN_BAG_TOOLTIP"],
 		tooltipTextFunction = "TitanPanelBagButton_GetTooltipText",