Created
February 20, 2013 07:47
-
-
Save zachwlewis/4993734 to your computer and use it in GitHub Desktop.
Using Blizzard's Interface Options Addons Panel in World of Warcraft
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MyAddOnSettingsFrame_OnLoad(self) | |
-- Set the name for the Category for the Panel | |
self.name = "My AddOn" .. GetAddOnMetadata("MyAddon", "Version") | |
-- When the player clicks okay, run this function. | |
self.okay = function (self) print("MyAddOnSettings: Okay clicked") end | |
-- When the player clicks cancel, run this function. | |
self.cancel = function (self) print("MyAddOnSettings: Cancel clicked.") end | |
-- Add the panel to the Interface Options | |
InterfaceOptions_AddCategory(self) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ .. \FrameXML\UI.xsd"> | |
<Script file="MyAddOnSettings.lua"/> | |
<Frame name="MyAddOnSettingsFrame"> | |
<Scripts> | |
<OnLoad function="MyAddOnSettingsFrame_OnLoad"/> | |
</Scripts> | |
</Frame> | |
</Ui> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment