WoW:User interface customization guide: Difference between revisions

→‎Lua Scripting: trying to make the article a bit better
mNo edit summary
(→‎Lua Scripting: trying to make the article a bit better)
Line 28: Line 28:


== Lua Scripting ==
== Lua Scripting ==
All of the functionality in the interface is provided through Lua scripting.  
All of the functionality in the interface is provided through Lua scripting. It is also possible to create any layout that is possible with the XML markup in pure Lua scripting.


The manual for Lua 5.1.4 is available online at: http://www.lua.org
The manual for Lua 5.1.4 (http://www.lua.org) is available online at http://www.lua.org/manual/5.1
 
See the Reference manual at: http://www.lua.org/manual/5.1


For more concise help, topic-specific Lua tutorials can be found at: http://lua-users.org/wiki/TutorialDirectory
For more concise help, topic-specific Lua tutorials can be found at: http://lua-users.org/wiki/TutorialDirectory


The best way to become familiar with the way Lua is used to script the interface is to look at the scripts in the XML files, denoted by the <script> tag, and to browse the lua files. The lua files typically contain functions which are used by the corresponding XML files.
The best way to become familiar with the way Lua is used to script the interface is to look at the scripts in the XML files, denoted by the <script> tag, and to browse the lua files. The lua files typically contain functions which are used by the corresponding XML files.
As a reference, the [[World_of_Warcraft_API]] page contains a (almost) complete list of available API functions in World of Warcraf. Also the [[Widget API]] page contains an overview of the methods that are available when dealing with objects of the user interface - like action buttons or unit frames. Feel free to play around with the <tt>print()</tt> function to try out the various API functions.
For example:
/run print(GetLocale());
This will print your client locale into the default chat window. ("enUS" for english clients, "deDE" for german clients, etc.)


== Getting Started ==
== Getting Started ==
Anonymous user