syrioussam
03-10-2006, 10:15 PM
I am trying to write my own UI mod. I've understood all the tutorials i've read. I heard about the CreateFrame() api and decided to learn more about it. Editing frames in lua seems easier and much less prone to bugs than editing frames in XML. Plus my understanding is that you can reload your lua script while the client is running, not so for XML.
So most of the tutorials I've read are heavy on the XML. I'm trying to find out more about this CreateFrame API and what functions are available in LUA to do all the things that I've seen done in XML. Basically I'm looking for a list of functions that I can use on the frame "object" (is that what it's called in lua?) in order to set its characteristics, add widgets i.e. buttons, etc.
So far this is all I found, the one example on wowwiki:
-----------
local f = CreateFrame("Frame",nil,UIParent)
f:SetFrameStrata("BACKGROUND")
f:SetWidth(128) -- Set These to whatever height/width is needed
f:SetHeight(64) -- for your Texture
local t = f:CreateTexture(nil,"BACKGROUND")
t:SetTexture("Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Factions.blp")
t:SetAllPoints(f)
f.texture = t
f:SetPoint("CENTER",0,0)
f:Show()
-----------
Does anyone know where I can go to find out what functions can be called on the frame object returned by CreateFrame() ? I have not found ANYTHING besides the above which although it shows promise of what might be possible, doesn't provide any kind of reference for discovering new functions.
I have put a couple hours into searching, so if there is a way to answer this question, I would greatly appreciate a direct answer such as:
Read the frameapi.lua file found inside frames.mpq
Read the webpage here: http://wow.interface.com/createframeapi.html
------------
And not one of these:
Look at how blizzard did it
Read the blizzard UI files
Its somewhere on the website here: http://home.wow.interface.com
----------------
Many thanks and looking forward to discovering what cool functions are available....!
So most of the tutorials I've read are heavy on the XML. I'm trying to find out more about this CreateFrame API and what functions are available in LUA to do all the things that I've seen done in XML. Basically I'm looking for a list of functions that I can use on the frame "object" (is that what it's called in lua?) in order to set its characteristics, add widgets i.e. buttons, etc.
So far this is all I found, the one example on wowwiki:
-----------
local f = CreateFrame("Frame",nil,UIParent)
f:SetFrameStrata("BACKGROUND")
f:SetWidth(128) -- Set These to whatever height/width is needed
f:SetHeight(64) -- for your Texture
local t = f:CreateTexture(nil,"BACKGROUND")
t:SetTexture("Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Factions.blp")
t:SetAllPoints(f)
f.texture = t
f:SetPoint("CENTER",0,0)
f:Show()
-----------
Does anyone know where I can go to find out what functions can be called on the frame object returned by CreateFrame() ? I have not found ANYTHING besides the above which although it shows promise of what might be possible, doesn't provide any kind of reference for discovering new functions.
I have put a couple hours into searching, so if there is a way to answer this question, I would greatly appreciate a direct answer such as:
Read the frameapi.lua file found inside frames.mpq
Read the webpage here: http://wow.interface.com/createframeapi.html
------------
And not one of these:
Look at how blizzard did it
Read the blizzard UI files
Its somewhere on the website here: http://home.wow.interface.com
----------------
Many thanks and looking forward to discovering what cool functions are available....!