i've just started playing with Lua Programming now, and making a addon for wow, but can't get it to work properly.
i have getting the box to work and the close button to hide the frame, BUT i can't get the code to work so i get the slashcommand to open the box again, someone that can help me figure it out?
here is the Lua coding:
Code:
function Followup_OnEscapePressed()
Followup:Hide();
end
function Button1_OnClick()
Followup:Hide();
end
function Followup_OnLoad()
SlashCmdList["FOLLOWUP"] = FunctionToCall;
SLASH_FOLLOWUP1 = "/followup";
SLASH_FOLLOWUP2 = "/fu";
end
function Folloup_SlashCmdHandler()
-- to do stuff
end
here is the xml coding if you need it:
Code:
<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
<Script file="Frame.lua" />
<Frame name="Followup" parent="UIParent" toplevel="true" movable="true" enableMouse="true">
<Size>
<AbsDimension x="284" y="301" />
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="268" y="-183" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnMouseDown>self:StartMoving();</OnMouseDown>
<OnMouseUp>self:StopMovingOrSizing();</OnMouseUp>
<OnEscapePressed>Frame1_OnEscapePressed();</OnEscapePressed>
<OnTextSet>Frame1_OnTextSet();</OnTextSet>
</Scripts>
<Layers>
<Layer>
<FontString name="FontString1" inherits="GameFontNormalSmall" text="FollowUp">
<Size x="100" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="92" y="-15" />
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets>
<AbsInset left="11" right="12" top="12" bottom="11" />
</BackgroundInsets>
<TileSize>
<AbsValue val="32" />
</TileSize>
<EdgeSize>
<AbsValue val="32" />
</EdgeSize>
</Backdrop>
<Frames>
<Button name="Button1" inherits="UIPanelButtonTemplate" text="Close">
<Size x="100" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="169" y="-266" />
</Anchor>
</Anchors>
<Scripts>
<OnClick>Button1_OnClick();</OnClick>
</Scripts>
</Button>
</Frames>
</Frame>
<OnLoad>
AddonName_OnLoad();
</OnLoad>
</Ui>
and yes, i have googled my ass off to find a solution