Skip to content

Instantly share code, notes, and snippets.

@roloenusa
Created July 8, 2010 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roloenusa/467660 to your computer and use it in GitHub Desktop.
Save roloenusa/467660 to your computer and use it in GitHub Desktop.
Lua
mBSpecs = {};
mBSpecs.panel = CreateFrame( "Frame", "mBindingSpecs", UIParent );
-- Register in the Interface Addon Options GUI
-- Set the name for the Category for the Options Panel
mBSpecs.panel.name = "mBindingSpecs";
--mBSPecs.parent = "mBindings";
-- Add the panel to the Interface Options
InterfaceOptions_AddCategory(mBSpecs.panel);
local macro = CreateFrame("Frame")
macro:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED");
macro:SetScript("OnEvent", function(frame, event, firstArg, secondArg)
if event == "ACTIVE_TALENT_GROUP_CHANGED" then
--ACTIVE_TALENT_GROUP_CHANGED(frame, event, firstArg, secondArg);
DEFAULT_CHAT_FRAME:AddMessage("SPECS CHANGED");
MBSP_ACTIVE_TALENT_GROUP_CHANGED();
end
end)
SLASH_MBSPECS1, SLASH_MBSPECS2 = '/mbsp', '/mbspecs'; -- 3.
function handler(msg, editbox)
DEFAULT_CHAT_FRAME:AddMessage(format("HELLO %s", msg));
if(msg == 'a') then
DEFAULT_CHAT_FRAME:AddMessage(format(" %d", a))
end
end
SlashCmdList["MBSPECS"] = handler;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment