Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
m (typo)
(Version update.)
Line 21: Line 21:
   
 
== Release history ==
 
== Release history ==
  +
Version 4.2.3.30100, Compatible with (3.1.0) available since 2009-06-02 at [http://wowui.incgamers.com/?p=mod&m=1442 IncGamers], [http://www.wowinterface.com/downloads/fileinfo.php?id=8092 WoWInterface] and [http://wow.curse.com/downloads/details/618/ Curse]
  +
 
Version 4.2.2.30100, Compatible with (3.1.0) available since 2009-05-02 at [http://wowui.incgamers.com/?p=mod&m=1442 IncGamers], [http://www.wowinterface.com/downloads/fileinfo.php?id=8092 WoWInterface] and [http://wow.curse.com/downloads/details/618/ Curse]
 
Version 4.2.2.30100, Compatible with (3.1.0) available since 2009-05-02 at [http://wowui.incgamers.com/?p=mod&m=1442 IncGamers], [http://www.wowinterface.com/downloads/fileinfo.php?id=8092 WoWInterface] and [http://wow.curse.com/downloads/details/618/ Curse]
   
Line 132: Line 134:
   
 
== Author history ==
 
== Author history ==
*The new authors of the revamped Titan Panel are the Titan Development Team, consisting of: HonorGoG, Lothaer, Joejanko, oXidFoX, pato.daia, trisTitan (aka Tristanian), Urnati, Stingersoft & YeaChan. You can find their work at [http://code.google.com/p/titanpanel/list Google Code]
+
*The new authors of the revamped Titan Panel are the Titan Development Team, consisting of: HonorGoG, Lothaer, oXidFoX, pato.daia, trisTitan (aka Tristanian), Urnati, Stingersoft & YeaChan. You can find their work at [http://code.google.com/p/titanpanel/list Google Code]
  +
*Authors who have left the Titan Development Team: jaketodd422 & Joejanko
 
*The author of Titan 2 addon was [http://ui.worldofwar.net/users.php?name=Adsertor Adsertor @ UI.WWN].
 
*The author of Titan 2 addon was [http://ui.worldofwar.net/users.php?name=Adsertor Adsertor @ UI.WWN].
 
*The author of some updates and bug fixes was [http://www.curse-gaming.com/mod.php?authorid=2142 Dark Imakuni @ Curse] ([http://ui.worldofwar.net/users.php?name=Dark%20Imakuni @ UI.WWN]).
 
*The author of some updates and bug fixes was [http://www.curse-gaming.com/mod.php?authorid=2142 Dark Imakuni @ Curse] ([http://ui.worldofwar.net/users.php?name=Dark%20Imakuni @ UI.WWN]).

Revision as of 02:50, 3 June 2009

AddOn
AddOn article
This page describes fan-made scripting using the World of Warcraft API which has had notable impact on the game's development/history.

Titan Panel is an interface AddOns which creates a horizontal bar where additional plugin modules can be deployed displaying all sorts of useful, at-a-glance, game data. Its growing in popularity because of its good looks, simplicity, and ease of creating plugins to be displayed within the panel.

Version 4 supports a variety of different bar locations. They are:

  • 1 bar at the top
  • 1 bar at the bottom
  • 1 bar at the top and 1 bar at the bottom
  • 2 bars at the top
  • 2 bars at the bottom
  • 2 bars at the top and 1 bar at the bottom

News

  • May 1, 2009: HonorGoG posted a news item on the Titan Panel Portal explaining a change in the licensing for Titan Panel as follows: "The Titan Development Team has changed the licensing for Titan Panel from the implied "All Rights Reserved" to a limited BSD license. This will allow the Titan Development Team to control distrubition under an open source license. All previous versions that claimed to be GPLv3 were, in fact, "All Rights Reserved" as the required text for GPLv3 licensing was not included within the distribution. Please keep this in mind if you find a version claiming to be a GPLv3 licensed copy of Titan Panel as it is not supported by the Titan Development Team and is a violation of our copyright. For additional licensing details, please refer to the license.txt file included within the distribution." ref
  • November 29, 2008: HonorGoG posted the latest version of Titan Panel on Curse stating "We've been working with the Curse team to help develop a more streamlined process for addon authors who don't maintain a presence on the CurseForge SVN. There have been several dramatic improvements which allowed us to return Titan Panel to Curse without it becoming a burden as it had in the past." ref
  • October 17, 2008: HonorGoG cited the reason for the removal of Titan from Curse as "Curse is currently too unstable for us to maintain a copy on this site." ref Further explanations within the Curse comments area for Titan by HonorGoG explain "...they start a massive migration effort to merge WoWAce and Curse with CurseForge as their back-end right before the 3.0 release. Sorry, we just don't need that level of pain." ref
  • October 15, 2008: The Titan development team no longer updates addons on curse.com or affiliates. No reason specified. ref
  • December 2007 : Titan Panel was adopted by the Titan Development Team with the development effort being hosted at Google Code.

Release history

Version 4.2.3.30100, Compatible with (3.1.0) available since 2009-06-02 at IncGamers, WoWInterface and Curse

Version 4.2.2.30100, Compatible with (3.1.0) available since 2009-05-02 at IncGamers, WoWInterface and Curse

Version 4.2.1.30100, Compatible with (3.1.0) available since 2009-04-25 at Google Code, IncGamers, WoWInterface and Curse

Version 4.2.0.30100, Compatible with (3.1.0) available since 2009-04-24 at Google Code, IncGamers, WoWInterface and Curse

Version 4.1.9.30100, Compatible with (3.1.0) available since 2009-04-15 at Google Code, IncGamers, WoWInterface and Curse

Version 4.1.8.30000, Compatible with (3.0.9) available since 2009-03-23 at Google Code, IncGamers, WoWInterface and Curse

Version 4.1.7.30000, Compatible with (3.0.9) available since 2009-03-03 at Google Code, IncGamers, WoWInterface and Curse

Version 4.1.6.30000, Compatible with (3.0.9) available since 2009-02-14 at Google Code, IncGamers, WoWInterface and Curse

Version 4.1.5.30000, Compatible with (3.0.8) available since 2009-02-09 at Google Code, IncGamers, WoWInterface and Curse

Version 4.1.4.30000, Compatible with (3.0.8) available since 2009-01-19 at Google Code, IncGamers, WoWInterface and Curse

Version 4.1.3.30000, Compatible with (3.0.3) available since 2008-11-30 at Google Code, IncGamers, WoWInterface and Curse

Version 4.1.2.30000, Compatible with (3.0.3) available since 2008-11-16 at Google Code, IncGamers and WoWInterface

Version 4.1.1.30000, Compatible with (3.0.3) available since 2008-11-11 at Google Code, IncGamers and WoWInterface

Version 4.1.0.30000, Compatible with (3.0.3) available since 2008-11-11 at Google Code, IncGamers and WoWInterface

Version 4.0.2.30000, Compatible with (3.0.2) available since 2008-10-24 at Google Code, IncGamers and WoWInterface

Version 4.0.1.30000, Compatible with (3.0.2) available since 2008-10-17 at Google Code, IncGamers and WoWInterface

Version 4.0.0.30000, Compatible with (3.0.2) available since 2008-10-14 at Google Code, IncGamers and WoWInterface

Version 3.2.9.20400, Compatible with (2.4.3) available since 2008-09-03 at Google Code, Curse, IncGamers and WoWInterface

Version 3.2.8.20400, Compatible with (2.4.3) available since 2008-09-02 at Google Code, Curse, IncGamers and WoWInterface

Version 3.2.7.20400, Compatible with (2.4.3) available since 2008-08-23 at Google Code, Curse, IncGamers and WoWInterface

Version 3.2.6.20400, Compatible with (2.4.3) available since 2008-07-17 at Google Code, Curse, IncGamers and WoWInterface

Version 3.2.5.20400, Compatible with (2.4.3) available since 2008-07-15 at Google Code, Curse, IncGamers and WoWInterface

Version 3.2.4.20400, Compatible with (2.4.2) available since 2008-06-20 at Google Code, Curse, IncGamers and WoWInterface

Version 3.2.3.20400, Compatible with (2.4.2) available since 2008-05-16 at Google Code, Curse, IncGamers and WoWInterface

Version 3.2.2.20400, Compatible with (2.4.0) available since 2008-03-25 at Google Code, Curse, IncGamers and wow-patch.mp-gamer.de

Version 3.2.1.20300, Compatible with (2.3.3) available since 2008-03-11 at Google Code, Curse and IncGamers

Version 3.2.0.20300, Compatible with (2.3.3) available since 2008-02-17 at Google Code, Curse and IncGamers

Version 3.1.2.20300r240, Compatible with (2.3.2) available since 2008-01-25 at Google Code, Curse and IncGamers

Version 3.1.2.20300r123, Compatible with (2.3.2) available since 2008-01-12 at Google Code

Version 3.1.2.20300r70, Compatible with (2.3.2) available since 2008-01-05 at Google Code

Version 3.1.2.20300r27, Compatible with (2.3.0) available since 2007-12-29 at Google Code

Version 3.1.1, Compatible with (2.2.0) available since 10/10/2007 at curse.com

Version 3.1.0, Compatible with (2.2.0) available since 9/25/2007 at curse.com

Version 3.0.7, Compatible with (2.1.2), available since 06/13/07 at ui.worldofwar.net

Version 3.0.5, compatible with Before The Storm patch (2.03), available since 01/11/07 at ui.worldofwar.net

Version 3.0.1, compatible with Before The Storm patch (2.01), available since 12/07/06 at ui.worldofwar.net

Version 2.20 was made available on 8/24/06 at worldofwar.net

Version 2.19.1 was replaced with 2.20. It can be found here as well as at most other major WoW UI sites.

Version 2.18 is (was) most current. Can still be downloaded here as well as earlier versions.

Version 2.15.1 is out and located here (same place as before). By Adsertor, this is the third person working on this mod. This version fixed several bugs and was released for 1.10 Patch compatibility.

Version 2.13s (panels) on top and bottom of the screen.

Version 2.12 is the first Titan Panel 2 version to be compatible with the new 1.9.0.4937 World of Warcraft patch, although some issues remain. Adsertor is still active and more updates are expected in order to fix remaining issues.

This information was provided by Adsertor on the Titan Panel ui.worldofwarcraft.net page.

Whats in version 2.15.2

  • Minor fixes to item bonuses

This edition of Titan Panel is exactly the same as the original (found here: http://www.curse-gaming.com/mod.php?addid=860 ) except with a few changes and bug fixes. As the author of Titan Panel hasn't been online lately, I'm going to update it for when he/she gets back.

Titan Panel is not mine. Only the changes I made are mine. If the author is reading this, you are welcome to take this version back and submit it as your own." -- Dark Imakuni

An updated version of Titan Panel can be found here: v1.3 or v1.27 by Dark Imakuni

Curse does not seem to have the 1700 version up yet.

Now updated for patch 1.7, you can get it here: Version 1.25.1600 by TitanMod. NOTE: Curse Gaming can be very busy sometimes, so keep trying.

Titan Panel has been upgraded to work with patch 1.6 of World of Warcraft... :-)

Author history

  • The new authors of the revamped Titan Panel are the Titan Development Team, consisting of: HonorGoG, Lothaer, oXidFoX, pato.daia, trisTitan (aka Tristanian), Urnati, Stingersoft & YeaChan. You can find their work at Google Code
  • Authors who have left the Titan Development Team: jaketodd422 & Joejanko
  • The author of Titan 2 addon was Adsertor @ UI.WWN.
  • The author of some updates and bug fixes was Dark Imakuni @ Curse (@ UI.WWN).
  • The author of the Titan addon was TitanMod @ Curse (@ UI.WWN).

Past author versions

  • Last version by Adsertor: 3.1.1
  • Last version by Dark Imakuni: 1.3
  • Last version by TitanMod: research needed

URLs

Screenshots

Titan 2:
http://ui.worldofwar.net/images/ui/1129167028WoWScrnShot_101205_172526.jpg

TitanPanel

Included Titan plugins

Version 4

Pending...

Version 3

The final iteration of Titan version 3 contained the following plugins within the core distribution:

List of Titan Plugins
Name Description
TitanAmmo show ammo counts
TitanBag show room left in bags
TitanClock clock with offsets for your true timezone
TitanCoords displays location, plus coordinates. Won't work inside instances
TitanGoldTracker displays money count
TitanXP displays XP and tooltip with more information
TitanVolume Volume slider for the main volume
TitanLootType displays party loot settings
TitanPerformance Shows the Performance data of WoW. Memory usage by UI, garbage collection time, fps, latency
TitanUIScale slider for scaling the Titan Panel and the overall UI elements
ItemBonuses Shows the total bonus given by items for each stat
Regen Show the amount of HP and Mana regenerated per tick
Repair Shows the current/max durability of each item you are currently wearing and the money needed to repair them

Version 2

As of Version 2, Adsertor has added many third party plugins on the Core Distribution of Titan Panel. Every time a new version of these plugins get released, a new version of Titan will be released as well (in theory).

List of Titan Plugins
Name Version Last Update Author Description
TitanAmmo 2.04 - TitanMod show ammo counts
TitanBag 2.04 - TitanMod show room left in bags
TitanClock 2.04 - TitanMod clock with offsets for your true timezone
TitanCoords 2.04 - TitanMod displays location, plus coordinates. Won't work inside instances
TitanMoney 2.04 - TitanMod displays money count
TitanXP 2.04 - TitanMod displays XP and tooltip with more information
TitanVolume 2.04 - TitanMod Volume slider for the main volume
TitanLootType 2.04 - TitanMod displays party loot settings
TitanPerformance 2.04 - TitanMod Shows the Performance data of WoW. Memory usage by UI, garbage collection time, fps, latency
TitanUIScale 2.04 - TitanMod slider for scaling the Titan Panel and the overall UI elements
HonorPlus r10.1700 9/22/05 Swiftstab Shows Honor Information on the Titan Panel
ItemBonuses 0.9 10/12/05 CrowleyAJ Shows the total bonus given by items for each stat
Regen 1700 9/21/05 skeetskeet Show the amount of HP and Mana regenerated per tick
Repair 0.2 7/18/05 LumpN Shows the current/max durability of each item you are currently wearing and the money needed to repair them

Version 1.X

To get you started with the Titan Panel, the author has included several plugins with the framework release:

  • TitanAmmo - show ammo counts
  • TitanBag - show room left in bags
  • TitanClock - clock with offsets for your true timezone
  • TitanCoords - displays location, plus coordinates
  • TitanFPS - displays color coded FPS in the bar
  • TitanLatency - displays color coded latency in the bar
  • TitanHonor - displays your PvP stats
  • TitanMoney - displays money count
  • TitanXP - displays XP and tooltip with more information
  • TitanVolume - volume slider
  • TitanLootType - displays party loot settings
  • TitanMemory - displays memory usage
  • TitanUIScale - slider for scaling the Titan Panel and the overall UI elements

Other Titan plugins

Sites

Titan Panel Portal is the location for current information regarding the development of Titan Panel. A list of available Titan plugins is pending.

DrainingSouls.net has a comprehensive and up-to-date listing of Titan Panel mods available. It was last updated in May 2008, for Patch 2.4.

Query UI.worldofwar.net for plugins. Faster than Curse, just not as "popular".

Titan Plugin Listing maintained by Sepioth. This list is great but hasn't been updated since July 2005.

Links to AddOns

A list of Titan Panel 4.0 compatible plugins will soon be available at the Titan Panel Portal.

Suggestions

The Titan Development Team has requested that all suggestions be entered as an issue at the Google Code website.

Garbage collection

You can force a garbage collection within Titan Panel by left-clicking on the TitanPerformance button.

Recent Changes For Developers

Dev Team Comment, 12 Feb 2008: As of version 3.2.0, the frequency and updateType fields will no longer be supported as valid registry entries for a plugin's OnLoad method (they will be ignored even if they exist). Plugins will be responsible for handling their own timed updates to their button/tooltip (if needed) either via the use of an OnEvent method (with proper event registration), a timer library (eg. AceEvent, LibRockTimer), Titan's LibRockTimer registration or at worst an OnUpdate method inside the specific plugin that requires it.

Titan will no longer go through each plugin and update it based on the frequency value, on every frame. This kind of functionality has been disabled for good and will not come back. However, Titan will still support the usual TitanPanelButton_UpdateButton(id) and TitanPanelButton_UpdateTooltip() functions in order to handle button/tooltip refreshing and in addition will provide a new function, named : TitanPanelPluginHandle_OnUpdate(id, updateType) (args : id, updateType), where id is the id string of your plugin and updateType can be one of TITAN_PANEL_UPDATE_TOOLTIP, TITAN_PANEL_UPDATE_BUTTON or TITAN_PANEL_UPDATE_ALL depending on which component of your addon you want to update. Note that both arguments are mandatory to ensure proper and efficient updating.

It is possible for a plugin to use Titan's timer registration to handle its own button/tooltip timed updates. An example of this is shown below:

  1. Let's assume for simplicity that we have a plugin named "MyAddon" with an id of "MyAddon" as well (TITAN_ADDON_ID = "MyAddon").
  2. What we need to do first, is define an OnShow and OnHide method, either through lua or in the plugin's xml file. Each method will call a function that will handle our update timer. Let's assume that those functions are named MyAddon_OnShow and MyAddon_OnHide.
  3. The code should look something like this :
function MyAddon_OnShow()
 -- first we check if a timer has been defined for our plugin
  local hasTimer = TitanPanel:HasTimer("TitanPanel"..TITAN_ADDON_ID);
    if (hasTimer) then
     --do nothing if the timer is present
    else
     -- if no timer is present we need to define one like this
      TitanPanel:AddRepeatingTimer("TitanPanel"..TITAN_ADDON_ID, 1, TitanPanelPluginHandle_OnUpdate, TITAN_ADDON_ID, TITAN_PANEL_UPDATE_BUTTON);
     -- this will add a repeating timer with a uid of : "TitanPanelMyAddon"
     -- that will fire (on) every (1) second
     -- and call the TitanPanelPluginHandle_OnUpdate function
     -- with args, "MyAddon" and TITAN_PANEL_UPDATE_BUTTON which will update only the button of our plugin
    end
end
function MyAddon_OnHide()
  -- since our plugin is hidden, it's most likely disabled
  -- so we check again if a repeating timer exists/is defined
   local hasTimer = TitanPanel:HasTimer("TitanPanel"..TITAN_ADDON_ID);
     if (hasTimer) then
      -- if a timer is found then we remove it
       TitanPanel:RemoveTimer("TitanPanel"..TITAN_ADDON_ID);
     end
end

The comments should be self-explanatory. As for the syntax being used for repeating timers :

  • TitanPanel:AddRepeatingTimer(uid, delay, callback, ...)

Adds a timer that will fire in the allotted time and repeatedly every so often after that point.

Arguments:

uid (string or number)
a unique identifier, to allow for easy removal later. It is recommended that you use the simple naming convention of : "TitanPanel"..id, where id is the id of your addon.
delay
the amount of seconds until the callback is fired. It is recommended that you use values of 1 or greater unless you require absolute precision or you have a rather "spammy" plugin that must process and possible send/retrieve a lot of data, in a short amount of time.
callback
the method name or function to call. This should typically be : TitanPanelPluginHandle_OnUpdate.
tuple
a list of arguments to pass along. If you are using the update callback mentioned earlier, you must provide a valid id and a valid updateType.
  • local hasTimer = TitanPanel:HasTimer("myUID")

Returns: boolean or number - false if the timer does not exist, otherwise the amount of time until the timer goes off.

Arguments:

string or number
a unique identifier. Should normally be : "TitanPanel"..id, where id is the id of your addon.
  • TitanPanel:RemoveTimer("myUID")

Removes a timer with the specified uid.

Arguments:

string or number
a unique identifier. Should normally be : "TitanPanel"..id, where id is the id of your addon.

General note: This little tutorial has been added for convenience and to ensure a proper transition of some pre 3.2.0 plugins. Timers are a powerful tool but as such, they can also be abused. For your sanity (and ours) it is recommended that you don't use them, unless you absolutely need them. If you can base your updates on simple event triggering, you should be able to use TitanPanelButton_UpdateButton(id) and TitanPanelButton_UpdateTooltip() to handle your updates without any real issues and most importantly without necessarily affecting performance. On the other hand, if you absolutely must use a timed update, make sure that you are only updating what needs to be updated and don't just use TITAN_PANEL_UPDATE_ALL if it's not required.

Developer's guide

If you want to create your own Titan panel plug-in, you should get the Titan Panel developer's kit for some simple examples.

The general anatomy of a Titan panel button is fairly simple. There's the button itself, which is what appears on the Titan panel. These can be text, icons, combination text and icons, or other arbitrarily complex UI frames. Each button has a context menu, a tooltip and often a control window.

You define the button in your XML as you might expect:

...
<Frame parent="UIParent">
  <Frames>
    <Button name="TitanPanelExampleButton" inherits="TitanPanelTextTemplate"
            frameStrata="FULLSCREEN" toplevel="true">
      <Scripts>
        <OnLoad>
          TitanPanelExampleButton_OnLoad();
          TitanPanelButton_OnLoad();
        </OnLoad>
      </Scripts>
    </Button>
  </Frames>
</Frame>
...

The button should have an OnLoad hook to set up the plug-in's details, and should call the original TitanPanelButton_OnLoad() function to insert itself into the Panel's list of known plug-ins. The template to inherit from depends on what sort of plug-in you wish to create:

TitanPanelButtonTemplate
The basic template; has a right click menu, and default handlers for OnLoad, OnShow, OnClick, OnUpdate, OnEnter, and OnLeave, but no way to display anything. If you use this template, you must add child frames to do something.
TitanPanelTextTemplate
A basic Titan panel button with a text string. Use this if you have no icon and nothing more complex than a text string to display.
TitanPanelIconTemplate
A basic Titan panel button with an icon. Use this if you only have an icon. Titan panel buttons with just an icon will be displayed on the right side of the Titan panel. The registry entry icon determines the texture used, and iconWidth determines the icon's width.
TitanPanelComboTemplate
A Titan panel button with both an icon and a text string. Use this when you want to display a text string with an optionally visible icon beside it. The Titan variable ShowIcon will determine if the icon appears, and the registry entry iconButtonWidth will determine the space reserved for the icon.

Two other templates are available as an aid also, but should not be used as a top level Titan Panel button:

TitanPanelChildButtonTemplate
A child button within a parent button template. Use this to add more than one button to a TitanPanelButtonTemplate instance; you should hook the OnClick event if you want your child buttons to exhibit different behaviour to the parent.
TitanOptionsSliderTemplate
A template for vertical sliders to use in control windows.

In your OnLoad method, before the TitanPanelButton_OnLoad() is called, you must set up the button's registry. This is a table defining how the button appears and works within the Panel, and has the following fields:

id
A string ID for the plug-in.
builtIn
Set to 1 to appear in built-ins menu.
menuText
Label for plug-in toggle menu.
buttonTextFunction
The name of a function to call to get the button text; should return up to four pairs of label, value. If only a single string is returned, it is always displayed. If a label and a value, or more than one label and value, are returned, the labels will only be displayed if the ShowLabelText variable is true. The labels and values aren't separated by Titan, so you should make sure your label text includes some separation (eg, return "Label: ", "value").
tooltipTitle
The title line for the plug-in's tooltip.
tooltipTextFunction
The name of a function that should return text to display in the plug-in's tooltip, below the title line.
tooltipCustomFunction
The name of a function to be called when the GameTooltip should be updated for this plug-in.
icon
A texture name for this plug-in's icon.
iconWidth
The width, in pixels, of the icon texture. The default width is 16 pixels.
iconButtonWidth
The width, in pixels, of an icon or combo button. If the ShowIcon variable is true, this width will be added to a combo button and the icon displayed. Icon buttons will always show their icon; if this width is not set, the width of the icon will be used.
savedVariables
A table of (key, default) data listing variables to save per-user for this plug-in. The variables can be accessed via TitanGetVar(id, key) and TitanSetVar(id, key, value). The variables ShowIcon and ShowLabelText are understood by Titan Panel. Default values of nil must use TITAN_NIL instead, since lua table values cannot be nil.
frequency
The interval, in (floating point) seconds, between updates. When that interval (or more) has elapsed, either a button or tooltip update function, or both, will be called, according to updateType.
updateType
One of TITAN_PANEL_UPDATE_TOOLTIP, TITAN_PANEL_UPDATE_BUTTON or TITAN_PANEL_UPDATE_ALL (default). Determines which update functions will be called every frequency seconds.

Moving on to our example plugin's OnLoad method. You must at least supply the id and menuText entries, though usually you will want to supply more:

function TitanPanelExamplePlugin_OnLoad()
  this.registry = {
    id = "Example",
    menuText = "Example Plug-in",
    tooltipTitle = "Example Plug-in",
    buttonTextFunction = "TitanPanelExamplePlugin_GetButtonText",
  };
end

function TitanPanelExamplePlugin_GetButtonText()
  return "Example";
end

Note: If you intend to use the TitanPanelIconTemplate template, you must also make sure to insert a new entry in the TITAN_PANEL_NONMOVABLE_PLUGINS table, on your OnLoad method, containing the id of your plugin, eg tinsert(TITAN_PANEL_NONMOVABLE_PLUGINS, "MyAddonid").

With just this code, you should have a Titan Panel plug-in that simply shows "Example".

If you want it to respond to left clicks, you need to either hook the OnClick event to do what you want, or create a frame called TitanPanel(ID)ControlFrame, where (ID) is your plug-in's id (eg, TitanPanelExampleControlFrame). This frame will be shown and hidden attached to your button when it is left clicked.

If you want your button to respond to right clicks with a contextual menu, ensure that either you don't hook OnClick or that you call TitanPanelButton_OnClick(arg1) after doing your own work, so that the Titan code can catch the right click event. You will also need to define a function named TitanPanelRightClickMenu_Prepare(ID)Menu, calling a combination of the right click menu construction functions:

TitanPanelRightClickMenu_AddTitle(text, level?)
Adds the given text as a right click menu title. level, if set, will determine the menu nesting level.
TitanPanelRightClickMenu_AddSpacer(level?)
Adds a padding space to the right click menu. level, if set, will determine the menu nesting level.
TitanPanelRightClickMenu_AddToggleIcon(id)
Adds an icon toggle option to the right click menu.
TitanPanelRightClickMenu_AddToggleLabelText(id)
Adds a label text toggle option to the right click menu.
TitanPanelRightClickMenu_AddToggleColoredText(id)
Adds a coloured text toggle option to the right click menu.
TitanPanelRightClickMenu_AddCommand(text, value, funcname, level?)
Adds a callback function to the right click menu, with the given text label, argument and function name to call. Predefined functions are TITAN_PANEL_MENU_FUNC_HIDE, which should have a text of TITAN_PANEL_MENU_HIDE and a value of the plug-in ID to remove from the panel.
TitanPanelRightClickMenu_AddToggleVar(text, id, var, toggleTable?)
Adds a toggle option with label text, for plug-in id's variable var. If toggleTable is present, it is a list of options, at least one of which must always be set.

You can build a typical context menu easily:

function TitanPanelRightClickMenu_PrepareExampleMenu()
  TitanPanelRightClickMenu_AddTitle(TitanPlugins["Example"].menuText);
  TitanPanelRightClickMenu_AddToggleIcon("Example");
  TitanPanelRightClickMenu_AddToggleLabelText("Example");
  TitanPanelRightClickMenu_AddSpacer();
  TitanPanelRightClickMenu_AddCommand(TITAN_PANEL_MENU_HIDE, "Example", TITAN_PANEL_MENU_FUNC_HIDE);
end

Note that the example plug-in's registry didn't include any variables, so these toggles won't work, and may even generate errors. On top of that, it neither has an icon nor returns a label from its GetButtonText method, so the toggles would have no effect even if the variables existed. Example only, cut and paste at your own risk!

Historical reference

All items within this section are historical and therefore are no longer relevant to the current Titan Panel effort. This is intended just to show the evolution of the most popular addon for the World of Warcraft to this date. Further, it should show how something that is open source can be adopted by dedicated people who will keep something alive indefinitely.