trying to do my 1st LUA addon
hi im new to doing addons but i would like to try and do one.
but il need your help to get on track what i need help with is: im trying to do a icon that is above the chat box that has the name Emote ones you click on it it would show a frame with all the list of Emote that would be clickable on click it would send the / event in the chat. so far i did one file named emote_list.txt code: Code:
## Title: Emote list emote_list.lua emote_list.xml now from there im not sheer how to get my frame with the emote list... should i create a frame in the xml file ? and do a list of the in game emots scrip list in the lua file ? if i could get a short example of doing a frame with text in it that on click it would past that text in chat i think i could manage the rest. |
Neat addon idea.
Not as simple to implement as one might think. Tip 1: I wouldn't personally use an XML file for this. It's fairly pointless. Tip 2: You can get a dynamic list of emotes with something like this: Code:
local emotes = nil Code:
local emoteFrame = WINDOW_MANAGER:CreateTopLevelWindow( "some_unique_name" ) Tip 4: For the pop-up emote list since you want each emote clickable each one will have to be a different unique control, so it'd be best to build a local function that creates a Button with an overlayed Label (Label containing the Emote text). And then make the Button clickable. Tip 5: Here's the command to issue an emote to be played: Code:
PlayEmote(emotes[ emoteName ]) |
All times are GMT -6. The time now is 09:56 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI