Beelzer
02-03-2007, 07:10 AM
I used the XML tutorial at top and my mod isn't showing up in the addons list, nor is doing anything, here is my code...
Interface
## Interface : 20003
## Name : Simple
## Notes : A very simple add-on.
## Author : Anthei
Simple.xml
lua
function Simple_ButtonClick()
DEFAULT_CHAT_FRAME:AddMessage(Simple_EditBox:GetTe xt());
Simple_EditBox:SetText("");
end
function Simple_Close()
SimpleFrame:Hide();
end
XML
<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/
C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
<Script file="Simple.lua"/>
<Frame name="SimpleFrame" parent="UIParent" visible="true">
<Size>
<AbsDimension x="200" y="133" />
</Size>
</Frame>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Frame>
<Backdrop bgFile="Interface\TutorialFrame\TutorialFrameBackg round"
edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<EdgeSize>
<AbsValue val="16"/>
</EdgeSize>
<TileSize>
<AbsValue val="32"/>
</TileSize>
<BackgroundInsets>
<AbsInset left="5" right="5" top="5" bottom="5"/>
</BackgroundInsets>
</Backdrop>
</Frame>
<Layers>
<Layer level="ARTWORK">
<FontString name="Simple_Text" inherits="ChatFontNormal" text="Type in something:">
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="-33"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frames>
<Button name="Simple_CloseButton" inherits="UIPanelCloseButton">
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-3" y="-3" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>Simple_Close();</OnClick>
</Scripts>
</Button>
<EditBox name="Simple_EditBox" letters="50">
<Layers>
<Layer level="BACKGROUND">
<Texture name="Simple_Background">
<Color r=".2" g=".2" b=".2" a="1"/>
</Texture>
</Layer>
</Layers>
<Size>
<AbsDimension x="190" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="5" y="-66"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnEnterPressed>
Simple_AcceptButton:Click();
</OnEnterPressed>
</Scripts>
<FontString inherits="ChatFontNormal"/>
</EditBox>
<Button name="Simple_AcceptButton" inherits="OptionsButtonTemplate" text="GO!">
<Anchors>
<Anchor point="BOTTOM">
<Offset>
<AbsDimension x="0" y="20"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>Simple_ButtonClick();</OnClick>
</Scripts>
</Button>
</Frames>
</Frame>
</Ui>
Interface
## Interface : 20003
## Name : Simple
## Notes : A very simple add-on.
## Author : Anthei
Simple.xml
lua
function Simple_ButtonClick()
DEFAULT_CHAT_FRAME:AddMessage(Simple_EditBox:GetTe xt());
Simple_EditBox:SetText("");
end
function Simple_Close()
SimpleFrame:Hide();
end
XML
<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/
C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
<Script file="Simple.lua"/>
<Frame name="SimpleFrame" parent="UIParent" visible="true">
<Size>
<AbsDimension x="200" y="133" />
</Size>
</Frame>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Frame>
<Backdrop bgFile="Interface\TutorialFrame\TutorialFrameBackg round"
edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<EdgeSize>
<AbsValue val="16"/>
</EdgeSize>
<TileSize>
<AbsValue val="32"/>
</TileSize>
<BackgroundInsets>
<AbsInset left="5" right="5" top="5" bottom="5"/>
</BackgroundInsets>
</Backdrop>
</Frame>
<Layers>
<Layer level="ARTWORK">
<FontString name="Simple_Text" inherits="ChatFontNormal" text="Type in something:">
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="-33"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frames>
<Button name="Simple_CloseButton" inherits="UIPanelCloseButton">
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-3" y="-3" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>Simple_Close();</OnClick>
</Scripts>
</Button>
<EditBox name="Simple_EditBox" letters="50">
<Layers>
<Layer level="BACKGROUND">
<Texture name="Simple_Background">
<Color r=".2" g=".2" b=".2" a="1"/>
</Texture>
</Layer>
</Layers>
<Size>
<AbsDimension x="190" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="5" y="-66"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnEnterPressed>
Simple_AcceptButton:Click();
</OnEnterPressed>
</Scripts>
<FontString inherits="ChatFontNormal"/>
</EditBox>
<Button name="Simple_AcceptButton" inherits="OptionsButtonTemplate" text="GO!">
<Anchors>
<Anchor point="BOTTOM">
<Offset>
<AbsDimension x="0" y="20"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>Simple_ButtonClick();</OnClick>
</Scripts>
</Button>
</Frames>
</Frame>
</Ui>