WoW:Creating tabbed windows: Difference between revisions

m
Updated date code tested
m (sp)
m (Updated date code tested)
Line 173: Line 173:
     </Frame>
     </Frame>


This is a completely functional, self contained Tab Frame which you should be able to plop into any WoW XML UI file and run (as of Feb. 17, 2007).  There are a lot of redundancies here.  Things like the tab button properties should be templated and the logic controlling the selection of tabs is best handled by a custom function.
This is a completely functional, self contained Tab Frame which you should be able to plop into any WoW XML UI file and run (as of Apr. 23, 2008).  There are a lot of redundancies here.  Things like the tab button properties should be templated and the logic controlling the selection of tabs is best handled by a custom function.


Things like the tab button properties should be templated if you're going to have lots of tabs.  As mentioned before, from an UI's point of view, tabs are simply some buttons at the bottom of your frame. You should define a template like this in XML, and then implement a smart click handler in Lua:
Things like the tab button properties should be templated if you're going to have lots of tabs.  As mentioned before, from an UI's point of view, tabs are simply some buttons at the bottom of your frame. You should define a template like this in XML, and then implement a smart click handler in Lua:
Anonymous user