-
Posted by thebrucrew on Tue, 09 Feb 2010 22:54:13
Hey WowProgramming, I was paging through some of the WoW interface files looking for something to me how to create a frame kind of like the guild frame, where there are multiple rows and columns that are updated with data.
I know how to physically build the frame and get the looks right, but I'm still not sure how to get the text in there, bit confused with that. Any help would be great!
Thanks Guys!
-
Posted by jnwhiteh on Tue, 09 Feb 2010 23:37:14
It's just a series of font strings, spaced apart into columns. In general for something like that you would create a single button that is the entire row, and then a series of font strings within that button to display the text.
-
Posted by thebrucrew on Wed, 10 Feb 2010 01:51:44
But the data changes, based on who is active or has a specific trait, so I am not sure how many rows or when they will be used. How can I write it to then add a new row if its needed?
-
Posted by jnwhiteh on Wed, 10 Feb 2010 09:56:24
The traditional way to do this is to use what is referred to as a faux scroll frame, or pseudo scroll frame, which I cover in the book. You know how many rows of data your window can possibly hold, so you create that many. Let's say you can put 20 rows in the frame, so do that.
Then, you write an update function that updates the rows with the data, hiding any that don't have any data (or clearing their display). Combining this with a slider to scroll through the results (see the scroll frame chapter), you get the behavior already in the default UI. As far as I know, this is how that window is written in the first place!