Update me please! =
(emphasize note about this article being out-of-date) |
(Update me please! =) |
||
| Line 1: | Line 1: | ||
{{redband|'''Much of the information in this article is badly out of date.''' <br>For one, you no longer need to modify FrameXML in order to add code to WoW (yes, that's how badly out of date it is). --[[User:Mikk|Mikk]] 07:00, 23 May 2006 (EDT)}} | |||
''Much of the information in this article is badly out of date. For one, you no longer need to modify FrameXML in order to add code to WoW (yes, that's how badly out of date it is). --[[User:Mikk|Mikk]] 07:00, 23 May 2006 (EDT) | |||
{{stub/Accuracy}} | {{stub/Accuracy}} | ||
This is based on slouken's post on the official beta UI forums | {{tocright}} | ||
This is based on slouken's post on the official beta UI forums ''(a long long time ago)''. | |||
== World of Warcraft Interface Customization Guide == | == World of Warcraft Interface Customization Guide == | ||
| Line 16: | Line 16: | ||
Before you report a bug in the interface, move your custom interface directory out of the way, to make sure the bug occurs in the unmodified game. | Before you report a bug in the interface, move your custom interface directory out of the way, to make sure the bug occurs in the unmodified game. | ||
== XML Layout == | == XML Layout == | ||
| Line 25: | Line 26: | ||
Lots more details here: [[XML User Interface]] | Lots more details here: [[XML User Interface]] | ||
== Lua Scripting == | == Lua Scripting == | ||
| Line 37: | Line 39: | ||
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. | ||
== Getting Started == | == Getting Started == | ||
| Line 49: | Line 52: | ||
At the end of the file we define an actual frame called "ScriptErrors" which inherits the dialog box we defined previously. This is the frame which is shown in the message function at the top of the file. | At the end of the file we define an actual frame called "ScriptErrors" which inherits the dialog box we defined previously. This is the frame which is shown in the message function at the top of the file. | ||
== How Does It Work? == | == How Does It Work? == | ||
| Line 61: | Line 65: | ||
Having the UI respond to events wouldn't be very useful if the interface couldn't affect the game in return. The game provides a wide array of functions to query information and change game state. Examples of using these functions are throughout the provided lua files. | Having the UI respond to events wouldn't be very useful if the interface couldn't affect the game in return. The game provides a wide array of functions to query information and change game state. Examples of using these functions are throughout the provided lua files. | ||
== Tips and Tricks == | == Tips and Tricks == | ||
World of Warcraft supports dynamically '''reloading the user interface.''' At any time you can modify the XML and Lua files and then reload them by | World of Warcraft supports dynamically '''reloading the user interface.''' At any time you can modify the XML and Lua files and then reload them by either typing: | ||
* /console reloadui | |||
* /script ReloadUI() | |||
If you are using Cosmos, you can use the shorcut /rl | |||
If you're not sure what's happening in the script, use the''' message() function to print a message and view variables'''. Once the dialog is shown, your script keeps on executing, but no other message() calls will show anything until you click the button to dismiss the dialog. | If you're not sure what's happening in the script, use the''' message() function to print a message and view variables'''. Once the dialog is shown, your script keeps on executing, but no other message() calls will show anything until you click the button to dismiss the dialog. | ||
Feel free to experiment. If you break something, starting fresh is really easy. If you have questions, look on the forums to see if other people have already figured out the answers. Occasionally, Blizzard staff will be available to answer scripting questions - we value your feedback! | Feel free to experiment. If you break something, starting fresh is really easy. If you have questions, look on the forums to see if other people have already figured out the answers. Occasionally, Blizzard staff will be available to answer scripting questions - we value your feedback! | ||
== Conclusion == | == Conclusion == | ||
| Line 78: | Line 86: | ||
'''See also:''' | |||
*[[UI Questions]] | |||
*[[Interface Customization]] | |||
[[Category:Interface Customization]] | [[Category:Interface Customization]] | ||