Thread: GUI's
View Single Post
05-25-05, 10:25 PM   #5
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
The syntax checkers and stuff that reads blizzard's UI.xsd are nice but to those starting out it's like handing a book on Swahili grammar to someone who's never spoken a word of Swahili before.

A good approach to teaching the WoW UI would be a documented step-by-step building of a mod from something simple to complex. Once the relationship between the syntax and semantics falls into place by example, all of the wowwiki suddenly makes sense.

I find that building a mod happens in stages which anyone who's done any programming is familiar with:

1. Write out the intent of the mod, with a bunch of ideas that may or may not be doable: We want a mod to keep track of looted items. We want the items to be clickable links, to show who looted what and when. We want to make the results show in a scrollable window.
2. Draw a mock-up of the GUI in paint shop or any graphics program: Define which columns we want in the list, we want a reset button, where will settings go? If there's a ton of options it's best in a separate window. For a couple settings they can go on the main window.
3. Lay a workable foundation in the lua: Create a mod that saves looted items into an internal table. Make a temporary slash command to spit back the results.
4. Lay down the xml elements one layer at a time: Options and altering the elements can wait, we can keep those defined in the lua for now. Create the list, add the scrollbar, reference the interface.mpq to grab textures, reference the FrameXML lua's to see what we're actually inheriting for our controls.
5. Mesh the two together: Make the xml elements react to the lua and vice versa. Plugging in the scrollbar to our internal table, adding the code to react on a push of the reset button, etc.

Most can do 1-3 fine but get stuck on #4. A tutorial to lay some foundation of the elements would be an invaluable document. Once I get recap and hitlist settled I'll see about writing one up. The information seems overwhelming but once you get the basics down the work is 40% design, 20% looking stuff up in the wiki, 10% actually coding it (and 10% debugging hehe).
  Reply With Quote