Download
(2 Kb)
Download
Updated: 05-06-07 02:23 AM
Pictures
File Info
Updated:05-06-07 02:23 AM
Created:unknown
Downloads:1,500
Favorites:3
MD5:
ExtensibleMainMenu
Version: 1.0
by: RaeVanMorlock [More]
Allows addon authors to add buttons to the game's main menu frame. Buttons may be inserted at any numerical index within the list by calling ExtensibleMainMenu.AddButton(obj|text, position, onClickHandler).

Usage Examples
Example 1:
local addonOptionsButton =
ExtensibleMainMenu.AddButton("My Addon", 7, function()
DEFAULT_CHAT_FRAME:AddMessage("Load options frame for my addon...")
end)

Example 2:
local obj = CreateFrame("BUTTON", nil, nil, "GameMenuButtonTemplate")
obj:SetText("My Addon")
ExtensibleMainMenu.AddButton(obj, 7, function()
DEFAULT_CHAT_FRAME:AddMessage("Load options frame for my addon...")
end)


Addon Definition

Methods

ExtensibleMainMenu.AddButton([text|obj, [position, [onClickHandler]]]) - Adds a button to the main menu. If a table is passed, it's treated as a UI object. If a string or number is passed, it's set as the text of a new button. If nil is passed, it creates a space between the buttons. This function returns a reference to the created (or given) object.
Optional Files (0)


There have been no comments posted to this file.
Be the first to add one.



Category Jump: