View Single Post
12-31-14, 04:48 PM   #5
Dandamis
A Kobold Labourer
Join Date: Dec 2014
Posts: 1
I know the feeling of not being able to find out how to create some of the most basic elements. You got a perfect example! From this Frame you can build quite interesting applications already. Think Handlers (OnEvent, OnClick, OnUpdate) and Events (PLAYER_XP_UPDATE, ADDON_LOADED, etc) and you'll be going in no-time.

What I found helpful in my one day experience of making Addons:

Code:
local last = 0;
frame:SetScript("OnUpdate", function(self, elapsed)
	last = last + elapsed;
	
	if last >= 1 then
		-- Your code
		last = 0;
	end
end)
So the structure of your lua could look something like this:
Code:
-- VARIABLES
-- FRAME CREATION
-- STRING CREATION
-- EVENT REGISTRATION
-- ONEVENT FUNCTIONS
-- ONUPDATE FUNCTIONS
-- SUPPORT FUNCTIONS
This will allow you to create exciting stuff without the need of any XML.
__________________
  Reply With Quote