Well, I've almost got it working. I'm really excited about its progress, since it's a mod others have expressed an interest in seeing ported and it's my first.
I am getting hung up at one point though. I've been able to get the menus to display correctly now. The menu and the sub-menu are working perfectly. The issue I'm having is getting the mod to pass a slash command through an editbox. I understand that for an editbox to work, an xml file is needed, but I'm not quite sure what the programming of that xml file should even come close to looking like.
The function I have receiving the slash command follows:
Code:
function EmoteFu:PassSlashCmd(c)
local cmd = c;
if (not cmd) then cmd = "/"..k2; end
dewdrop:Close(1)
EmoteFuEditBox:SetText(cmd);
ChatEdit_SendText(EmoteFuEditBox);
end
I have verified that the variables are being passed correctly by doing a "print(cmd)", so the variable is being passed correctly. I just need it to pass to an editbox. If anyone could lend a hand with the xml for this one (or even just point me in the right direction), I'd be very thankful...and the mod would be done!
[edit: I threw together a quick xml file based on some things I've seen in other mods, but I know it's not accurate, since I'm getting an "attempt to index global 'EmoteFuEditBox' (a nil value)" error. The code for my xml currently is:
Code:
<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">
<EditBox name="EmoteFuEditBox" inherits="ChatFrameEditBoxTemplate" parent="UIParent" hidden="true">
<Scripts>
<OnLoad>
</OnLoad>
</Scripts>
</EditBox>
</Ui>