WoW:Creating tabbed windows: Difference between revisions

m
Move page script moved page Creating tabbed windows to WoW:Creating tabbed windows without leaving a redirect
m (sp)
m (Move page script moved page Creating tabbed windows to WoW:Creating tabbed windows without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 33: Line 33:
         </Size>
         </Size>
         <Anchors>
         <Anchors>
             <Anchor point="CENTER"/>
             <Anchor point="CENTER">
            <Offset><AbsDimension x="-200" y="200"/></Offset>
                <Offset><AbsDimension x="-200" y="200"/></Offset>
            </Anchor>
         </Anchors>
         </Anchors>
         <Backdrop
         <Backdrop
Line 126: Line 127:
                     <Anchor point="CENTER" relativePoint="BOTTOMLEFT">
                     <Anchor point="CENTER" relativePoint="BOTTOMLEFT">
                         <Offset>
                         <Offset>
                             <AbsDimension x="60" y="-8"/>
                             <AbsDimension x="60" y="-12"/>
                         </Offset>
                         </Offset>
                     </Anchor>
                     </Anchor>
Line 173: Line 174:
     </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