vanilla-wow-addons – Rev 1

Subversion Repositories:
Rev:
<Ui xmlns="http://www.blizzard.com/wow/ui/"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.blizzard.com/wow/ui/FrameXML/UI.xsd">
        <Script file="locals.lua" />
        <Script file="MyEquipment.lua" />

        <!-- Templates -->
   <Button name="MyEquipmentItemButtonTemplate" inherits="ItemButtonTemplate" virtual="true">
                <Frames>
                        <Model name="$parentCooldown" inherits="CooldownFrameTemplate"/>
                </Frames>
      <Scripts>
                        <OnLoad>
                                MyEquipment.MyEquipmentItemSlotButton_OnLoad()
                        </OnLoad>
                        <OnClick>
                                self = this:GetParent():GetParent().self
                                self:MyEquipmentItemSlotButton_OnClick(arg1)
                        </OnClick>
                        <OnDragStart>
                                self = this:GetParent():GetParent().self
                                self:MyEquipmentItemSlotButton_OnClick("LeftButton", 1)
                        </OnDragStart>
                        <OnReceiveDrag>
                                self = this:GetParent():GetParent().self
                                self:MyEquipmentItemSlotButton_OnClick("LeftButton", 1)
                        </OnReceiveDrag>
                        <OnEnter>
                                self = this:GetParent():GetParent().self
                                self:MyEquipmentItemSlotButton_OnEnter()
                        </OnEnter>
                        <OnLeave>
                                GameTooltip:Hide()
                        </OnLeave>
<!--                    <OnUpdate>
                                self = this:GetParent():GetParent().self
                                self:MyEquipmentItemSlotButton_OnUpdate(arg1);
                        </OnUpdate>
                        <OnEvent>
                                self = this:GetParent():GetParent().self
                                self:MyEquipmentItemSlotButton_OnEvent(event)
                        </OnEvent>
-->             </Scripts>
   </Button>

   <Frame name="MyEquipmentTemplate" virtual="true">
      <Frames>
         <Frame name="$parentBackRow1"/>         
         <Frame name="$parentBackRow2"/>
         <Frame name="$parentBackRow3"/>
         <Button name="$parentItem0"  inherits="MyEquipmentItemButtonTemplate" id="0"/>
         <Button name="$parentItem1"  inherits="MyEquipmentItemButtonTemplate" id="1"/>
         <Button name="$parentItem2"  inherits="MyEquipmentItemButtonTemplate" id="2"/>
         <Button name="$parentItem3"  inherits="MyEquipmentItemButtonTemplate" id="3"/>
         <Button name="$parentItem4"  inherits="MyEquipmentItemButtonTemplate" id="4"/>
         <Button name="$parentItem5"  inherits="MyEquipmentItemButtonTemplate" id="5"/>
         <Button name="$parentItem6"  inherits="MyEquipmentItemButtonTemplate" id="6"/>
         <Button name="$parentItem7"  inherits="MyEquipmentItemButtonTemplate" id="7"/>
         <Button name="$parentItem8"  inherits="MyEquipmentItemButtonTemplate" id="8"/>
         <Button name="$parentItem9"  inherits="MyEquipmentItemButtonTemplate" id="9"/>
         <Button name="$parentItem10" inherits="MyEquipmentItemButtonTemplate" id="10"/>
         <Button name="$parentItem11" inherits="MyEquipmentItemButtonTemplate" id="11"/>
         <Button name="$parentItem12" inherits="MyEquipmentItemButtonTemplate" id="12"/>
         <Button name="$parentItem13" inherits="MyEquipmentItemButtonTemplate" id="13"/>
         <Button name="$parentItem14" inherits="MyEquipmentItemButtonTemplate" id="14"/>
         <Button name="$parentItem15" inherits="MyEquipmentItemButtonTemplate" id="15"/>
         <Button name="$parentItem16" inherits="MyEquipmentItemButtonTemplate" id="16"/>
         <Button name="$parentItem17" inherits="MyEquipmentItemButtonTemplate" id="17"/>
         <Button name="$parentItem18" inherits="MyEquipmentItemButtonTemplate" id="18"/>
         <Button name="$parentItem19" inherits="MyEquipmentItemButtonTemplate" id="19"/>
      </Frames>
        </Frame>

        <Frame name="MyEquipmentFrameTemplate" virtual="true" movable="true" enableMouse="true" toplevel="true" hidden="true">
                <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                        <BackgroundInsets><AbsInset left="5" right="5" top="5" bottom="5"/></BackgroundInsets>
                        <TileSize><AbsValue val="16"/></TileSize>
                        <EdgeSize><AbsValue val="16"/></EdgeSize>
                </Backdrop>
                <Layers>
                        <!-- -LITE{{{ -->
                        <Layer level="BACKGROUND">
                                <Texture name="$parentPortrait" hidden="false" file="Interface\AddOns\MyBags\Skin\Backpack" > <!--   -->
                                        <Size><AbsDimension x="58" y="58"/></Size>
                                        <Anchors>
                                                <Anchor point="TOPLEFT">
                                                        <Offset><AbsDimension x="-5" y="1"/></Offset>
                                                </Anchor>
                                        </Anchors>
                                </Texture>
                                <Texture name="$parentTextureTopLeft" file="Interface\AddOns\MyBags\Skin\TopLeft" hidden="false">
                                        <Size><AbsDimension x="128" y="128"/></Size>
                                        <Anchors>
                                                <Anchor point="TOPLEFT">
                                                        <Offset><AbsDimension x="-65" y="58"/></Offset>
                                                </Anchor>
                                        </Anchors>
                                </Texture>
                                <Texture name="$parentTextureTopRight" file="Interface\AddOns\MyBags\Skin\TopRight" hidden="false">
                                        <Size><AbsDimension x="64" y="128"/></Size>
                                        <Anchors>
                                                <Anchor point="TOPRIGHT"> 
                                                        <Offset><AbsDimension x="36" y="58"/></Offset>
                                                </Anchor>
                                        </Anchors>
                                </Texture>
                                <Texture name="$parentTextureTopCenter" file="Interface\AddOns\MyBags\Skin\TopCenter" hidden="false">
                                        <Size><AbsDimension x="128" y="128"/></Size>
                                        <Anchors>
                                                <Anchor point="BOTTOMLEFT" relativeTo="$parentTextureTopLeft" relativePoint="BOTTOMRIGHT"/>
                                                <Anchor point="BOTTOMRIGHT" relativeTo="$parentTextureTopRight" relativePoint="BOTTOMLEFT"/>
                                        </Anchors>
                                </Texture>
                                <Texture name="$parentTextureBottomLeft" file="Interface\AddOns\MyBags\Skin\BottomLeft" hidden="false">
                                        <Size><AbsDimension x="128" y="128"/></Size>
                                        <Anchors>
                                                <Anchor point="BOTTOMLEFT">
                                                        <Offset><AbsDimension x="-65" y="-60"/></Offset>
                                                </Anchor>
                                        </Anchors>
                                </Texture>
                                <Texture name="$parentTextureBottomRight" file="Interface\AddOns\MyBags\Skin\BottomRight" hidden="false">
                                        <Size><AbsDimension x="64" y="128"/></Size>
                                        <Anchors>
                                                <Anchor point="BOTTOMRIGHT"> 
                                                        <Offset><AbsDimension x="36" y="-60"/></Offset>
                                                </Anchor>
                                        </Anchors>
                                </Texture>
                                <Texture name="$parentTextureBottomCenter" file="Interface\AddOns\MyBags\Skin\BottomCenter" hidden="false">
                                        <Size><AbsDimension x="128" y="128"/></Size>
                                        <Anchors>
                                                <Anchor point="TOPLEFT" relativeTo="$parentTextureBottomLeft" relativePoint="TOPRIGHT"/>
                                                <Anchor point="TOPRIGHT" relativeTo="$parentTextureBottomRight" relativePoint="TOPLEFT"/>
                                        </Anchors>
                                </Texture>
                                <Texture name="$parentTextureLeft" file="Interface\AddOns\MyBags\Skin\Left" hidden="false">
                                        <Size><AbsDimension x="64" y="128"/></Size>
                                        <Anchors>
                                                <Anchor point="TOPRIGHT" relativeTo="$parentTextureTopLeft" relativePoint="BOTTOMRIGHT"/>
                                                <Anchor point="BOTTOMRIGHT" relativeTo="$parentTextureBottomLeft" relativePoint="TOPRIGHT"/>
                                        </Anchors>
                                </Texture>
                                <Texture name="$parentTextureRight" file="Interface\AddOns\MyBags\Skin\Right" hidden="false">
                                        <Size><AbsDimension x="64" y="128"/></Size>
                                        <Anchors>
                                                <Anchor point="TOPLEFT" relativeTo="$parentTextureTopRight" relativePoint="BOTTOMLEFT"/>
                                                <Anchor point="BOTTOMLEFT" relativeTo="$parentTextureBottomRight" relativePoint="TOPLEFT"/>
                                        </Anchors>
                                </Texture>
                                <Texture name="$parentTextureCenter" file="Interface\AddOns\MyBags\Skin\Center" hidden="false">
                                        <Size><AbsDimension x="128" y="128"/></Size>
                                        <Anchors>
                                                <Anchor point="TOPLEFT" relativeTo="$parentTextureTopCenter" relativePoint="BOTTOMLEFT"/>
                                                <Anchor point="TOPRIGHT" relativeTo="$parentTextureTopCenter" relativePoint="BOTTOMRIGHT"/>
                                                <Anchor point="BOTTOMLEFT" relativeTo="$parentTextureBottomCenter" relativePoint="TOPLEFT"/>
                                                <Anchor point="BOTTOMRIGHT" relativeTo="$parentTextureBottomCenter" relativePoint="TOPRIGHT"/>
                                        </Anchors>
                                </Texture>
                        </Layer>
                        <!-- }}}-LITE -->
                        <Layer level="ARTWORK">
                                <FontString name="$parentName" inherits="GameFontNormal" justifyH="LEFT">
                                        <Color r="1.0" g="1.0" b="1.0" />
                                        <Anchors>
                                                <Anchor point="TOPLEFT">
                                                        <Offset><AbsDimension x="7" y="-10"/></Offset>
                                                </Anchor>
                                        </Anchors>
                                </FontString>
                                <FontString name="$parentSlots" inherits="GameFontNormal" justifyH="LEFT">
                                        <Color r="1.0" g="1.0" b="1.0" />
                                        <Anchors>
                                                <Anchor point="BOTTOMLEFT">
                                                        <Offset><AbsDimension x="7" y="10"/></Offset>
                                                </Anchor>
                                        </Anchors>
                                </FontString>
                        </Layer>
                </Layers>
                <Frames>
                        <Frame name="MyEquipmentSlots" inherits="MyEquipmentTemplate"/>
                        <Frame name="$parentButtons" inherits="MyBagsButtonBarTemplate"/>
                        <Frame name="$parentCharSelect" inherits="MyBagsCharSelectTemplate"/>
                        <Frame name="$parentMoneyFrame" inherits="SmallMoneyFrameTemplate" hidden="false">
                                <Anchors>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="BOTTOMRIGHT">
                                                <Offset><AbsDimension x="0" y="8"/></Offset>
                                        </Anchor>
                                </Anchors>
                        </Frame>
                </Frames>
                <Scripts>
                        <OnShow>
                                PlaySound("igBackPackOpen")
                        </OnShow>
                        <OnHide>
                                PlaySound("igBackPackClose")
                        </OnHide>
                        <OnMouseDown>
                                self = this.self
                                if not self.GetOpt("Lock") then
                                        self:debug("Moving Frame")
                                        self:debug("Frame:"..this:GetParent():GetName())
                                        this:GetParent():StartMoving()
                                else
                                        self:debug("FRAME IS LOCKED, MOUSE SHOULD BE DISABLED")
                                end
                        </OnMouseDown>
                        <OnMouseUp>
                                self:debug("Stop moving")
                                this:GetParent():StopMovingOrSizing()
                        </OnMouseUp>
                </Scripts>
        </Frame>

        <!-- Frame -->
        <Frame name="MyEquipmentAnchorFrame" hidden="false" movable="true" parent="UIParent">
                <Size><AbsDimension x="10" y="10"/></Size>
                <Anchors>
                        <Anchor point="BOTTOMRIGHT" >
                                <Offset><AbsDimension x="-5" y="100"/></Offset>
                        </Anchor>
                </Anchors>
                <Frames>
                        <Frame name="MyEquipmentFrame" inherits="MyEquipmentFrameTemplate">
                                <Size>
                                        <AbsDimension x="500" y="500"/>
                                </Size>
                                <Anchors><Anchor point="BOTTOMRIGHT"/></Anchors>
                        </Frame>
                </Frames>
        </Frame>
</Ui>