<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">

    <Frame name="GwPaperDollStat" enableMouse="true" virtual="true">
        <Size x="92" y="30"></Size>
        <Anchors>
            <Anchor point="TOPLEFT"></Anchor>
        </Anchors>
        <Layers>
            <Layer level="OVERLAY">
                <Texture name="$parentIcon" parentKey="icon" file="Interface\AddOns\GW2_UI\textures\character\statsicon-classic.png">
                    <Size x="35" y="35"></Size>
                    <Anchors>
                        <Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT"></Anchor>
                    </Anchors>
                </Texture>
                <FontString parentKey="Value" text="Not Loaded" justifyV="MIDDLE" justifyH="LEFT">
                    <Size x="72" y="35"></Size>
                    <Anchors>
                        <Anchor point="LEFT" x="35"></Anchor>
                    </Anchors>
                </FontString>
                <FontString parentKey="Label" text="" justifyH="LEFT">
                    <Size x="72" y="20"></Size>
                    <Anchors>
                        <Anchor point="LEFT"></Anchor>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>
    </Frame>

    <Button name="GwPaperSkillsItem" enableMouse="true" inherits="GwCharacterMenuBlankTemplate" virtual="true">
        <Size x="220" y="50"></Size>
        <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="8"></Anchor>
        </Anchors>
        <Layers>
            <Layer level="ARTWORK">
                <Texture parentKey="bg" file="Interface\AddOns\GW2_UI\textures\character\menu-bg.png">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0"></Anchor>
                        <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="0" y="0"></Anchor>
                    </Anchors>
                </Texture>
                <Texture parentKey="bgstatic" file="Interface\AddOns\GW2_UI\textures\character\menu-bg.png">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0"></Anchor>
                        <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="0" y="0"></Anchor>
                    </Anchors>
                </Texture>
                <Texture parentKey="bgheader" file="Interface\AddOns\GW2_UI\textures\talents\spell-sep.png">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0"></Anchor>
                        <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="0" y="0"></Anchor>
                    </Anchors>
                    <TexCoords left="0" right="0.97656" top="1" bottom="0.03125" />
                </Texture>
            </Layer>
            <Layer level="OVERLAY">
                <Texture parentKey="arrow" file="Interface/AddOns/GW2_UI/textures/uistuff/arrowdown_down.png">
                    <Size x="28" y="28"></Size>
                </Texture>
                <Texture parentKey="arrow2" file="Interface/AddOns/GW2_UI/textures/uistuff/arrowdown_down.png" rotation="90">
                    <Size x="28" y="28"></Size>
                </Texture>
                <FontString parentKey="name" text="Unknown" justifyH="LEFT">
                    <Size x="231" y="20"></Size>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="10" y="-5"></Anchor>
                    </Anchors>
                </FontString>
                <FontString parentKey="val" text="Unknown" justifyH="RIGHT">
                    <Size x="231" y="20"></Size>
                    <Anchors>
                        <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-5" y="-5"></Anchor>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>
        <Frames>
            <StatusBar name="$parentStatusBar" minValue="0" maxValue="1" hidden="false" parentKey="StatusBar">
                <Size x="196" y="4"></Size>
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeKey="$parent.name" x="0" y="0"></Anchor>
                </Anchors>
                <BarTexture file="Interface/AddOns/GW2_UI/textures/uistuff/gwstatusbar.png"/>
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture file="Interface/AddOns/GW2_UI/textures/uistuff/gwstatusbar-bg.png">
                            <Anchors>
                                <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="-3" y="0"></Anchor>
                                <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="3" y="0"></Anchor>
                            </Anchors>
                        </Texture>
                    </Layer>
                    <Layer level="ARTWORK">
                        <Texture name="$parentSpark" parentKey="spark" file="Interface\AddOns\GW2_UI\textures\uistuff/statusbar-spark-white.png">
                            <Size x="10" y="4"></Size>
                            <Anchors>
                                <Anchor point="RIGHT" relativePoint="LEFT" x="0" y="0"></Anchor>
                            </Anchors>
                        </Texture>
                    </Layer>
                </Layers>
                <Scripts>
                    <OnLoad>
                        self:SetMinMaxValues(0, 1)
                        self:SetStatusBarColor(240/255, 240/255, 155/255)

                        local BNAME = self:GetName()
                        hooksecurefunc(self, "SetValue", function(self)
                            local min, max = self:GetMinMaxValues()
                            local v = self:GetValue()
                            local width = math.max(1, math.min(10, 10 * ((v / max) / 0.1)))
                            self.spark:SetPoint("RIGHT", self, "LEFT", self:GetWidth() * (v / max), 0)
                            self.spark:SetWidth(width)
                        end)
                    </OnLoad>
                </Scripts>
            </StatusBar>
            <Button parentKey="abandon">
                <Size x="20" y="20"/>
                <Anchors>
                    <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="0" y="0"></Anchor>
                </Anchors>
                <NormalTexture file="Interface/AddOns/GW2_UI/textures/uistuff/window-close-button-normal.png"/>
                <PushedTexture file="Interface/AddOns/GW2_UI/textures/uistuff/window-close-button-hover.png"/>
                <HighlightTexture file="Interface/AddOns/GW2_UI/textures/uistuff/window-close-button-hover.png"/>
            </Button>
        </Frames>
        <Scripts>
            <OnEnter>
                GwStandardButton_OnEnter(self)
                if not self.tooltip then
                    return
                end
                GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
                GameTooltip:SetText(HIGHLIGHT_FONT_COLOR_CODE .. self.tooltip .. FONT_COLOR_CODE_CLOSE)
                if self.tooltip2 ~= nil then
                    GameTooltip:AddLine(self.tooltip2, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true)
                end
                GameTooltip:Show()
            </OnEnter>
            <OnLeave>
                GwStandardButton_OnLeave(self)
                GameTooltip:Hide()
            </OnLeave>
        </Scripts>
    </Button>

    <Frame name="GwPetPaperdollBaseTemplate" inherits="SecureHandlerBaseTemplate" virtual="true">
        <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0"></Anchor>
            <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="0" y="0"></Anchor>
        </Anchors>
        <Layers>
            <Layer level="ARTWORK">
                <Texture parentKey="background" file="Interface\AddOns\GW2_UI\textures\character\windowbg-pet.png">
                    <Size x="853" y="853"></Size>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0"></Anchor>
                    </Anchors>
                </Texture>
            </Layer>
            <Layer level="ARTWORK" textureSubLevel="2">
                <Texture parentKey="classIcon" alphaMode="ADD" file="Interface\AddOns\GW2_UI\textures\character\pet-happiness.png">
                    <Size x="64" y="64"></Size>
                    <Anchors>
                        <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-145" y="-45"></Anchor>
                    </Anchors>
                </Texture>
            </Layer>
            <Layer level="OVERLAY">
                <FontString parentKey="characterName" text="Unknown" justifyH="LEFT">
                    <Size x="170" y="20"></Size>
                    <Anchors>
                        <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-10" y="-10"></Anchor>
                    </Anchors>
                </FontString>
                <FontString parentKey="characterData" text="Level %d class" justifyH="LEFT" justifyV="TOP">
                    <Size x="170" y="40"></Size>
                    <Anchors>
                        <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-10" y="-30"></Anchor>
                    </Anchors>
                </FontString>
                <FontString parentKey="itemLevel" text="100" justifyH="LEFT">
                    <Anchors>
                        <Anchor point="LEFT" relativePoint="RIGHT" relativeKey="$parent.classIcon" x="-5" y="-5"></Anchor>
                    </Anchors>
                </FontString>
                <FontString parentKey="itemLevelLabel" text="Level %d class" justifyH="LEFT" justifyV="BOTTOM">
                    <Size x="110" y="40"></Size>
                    <Anchors>
                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeKey="$parent.itemLevel" x="5" y="4"></Anchor>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>
        <Frames>
            <Button name="$parentBackButton" parentKey="backButton" inherits="GwCharacterPanelMenuButtonBackSecureTemplate" text="Character: Pet">
                <Size x="231" y="50"></Size>
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="13" y="-15"></Anchor>
                </Anchors>
            </Button>
            <PlayerModel name="PaperDoll3dModel" inherits="ModelWithZoomTemplate ModelTemplate" enableMouse="true" parentKey="model">
                <Size x="355" y="598"></Size>
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0"></Anchor>
                    <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="0" y="0"></Anchor>
                </Anchors>
                <Scripts>
                    <OnLoad>
                        self:SetUnit("pet")
                        Model_OnLoad(self, 4, -0.5, 0, CharacterModelFrame_OnMouseUp)
                    </OnLoad>
                </Scripts>
                <Frames>
                    <StatusBar name="$parentExpBar" minValue="0" maxValue="1" hidden="false" parentKey="expBar">
                        <Size x="380" y="10"></Size>
                        <Anchors>
                            <Anchor point="BOTTOM" relativePoint="BOTTOM" x="0" y="40"></Anchor>
                        </Anchors>
                        <BarTexture file="Interface/AddOns/GW2_UI/textures/uistuff/gwstatusbar.png"/>
                        <Layers>
                            <Layer level="BACKGROUND">
                                <Texture file="Interface/AddOns/GW2_UI/textures/uistuff/gwstatusbar-bg.png">
                                    <Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="-2" y="2"></Anchor>
                                        <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="2" y="-2"></Anchor>
                                    </Anchors>
                                </Texture>
                            </Layer>
                            <Layer level="ARTWORK">
                                <Texture name="$parentSpark" parentKey="spark" file="Interface\AddOns\GW2_UI\textures\uistuff/statusbar-spark-white.png">
                                    <Size x="10" y="10"></Size>
                                    <Anchors>
                                        <Anchor point="RIGHT" relativePoint="LEFT" x="0" y="0"></Anchor>
                                    </Anchors>
                                </Texture>
                                <FontString parentKey="value" text="%s / %s" justifyH="CENTER">
                                    <Size x="380" y="8"></Size>
                                    <Anchors>
                                        <Anchor point="CENTER"></Anchor>
                                    </Anchors>
                                </FontString>
                            </Layer>
                        </Layers>
                        <Scripts>
                            <OnLoad>
                                self:SetStatusBarColor(GW2_ADDON.Colors.FactionBarColors[4]:GetRGB())
                                self.value:SetFont(UNIT_NAME_FONT, 12, "")
                                self.value:SetShadowColor(0, 0, 0, 1)
                                self.value:SetShadowOffset(1, -1)

                                local BNAME = self:GetName()
                                hooksecurefunc(self, "SetValue", function(self)
                                    local min, max = self:GetMinMaxValues()
                                    local v = self:GetValue()
                                    local width = math.max(1, math.min(10, 10 * ((v / max) / 0.1)))
                                    self.spark:SetPoint("RIGHT", self, "LEFT", self:GetWidth() * (v / max), 0)
                                    self.spark:SetWidth(width)
                                end)
                            </OnLoad>
                        </Scripts>
                    </StatusBar>
                </Frames>
            </PlayerModel>
            <Frame parentKey="stats">
                <Size x="184" y="301"></Size>
                <Anchors>
                    <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-10" y="-120"></Anchor>
                </Anchors>
                <Layers>
                    <Layer level="ARTWORK">
                        <Texture file="Interface\AddOns\GW2_UI\textures\character\statsbg.png">
                            <Size x="256" y="512"></Size>
                            <Anchors>
                                <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0"></Anchor>
                            </Anchors>
                        </Texture>
                    </Layer>
                    <Layer level="OVERLAY">
                        <FontString parentKey="header" text="Attributes" justifyH="LEFT">
                            <Size x="180" y="40"></Size>
                            <Anchors>
                                <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="8" y="2"></Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
                <Scripts>
                    <OnLoad>
                        self.header:SetFont(DAMAGE_TEXT_FONT, 14, "")
                        self.header:SetText(STAT_CATEGORY_ATTRIBUTES)

                        self:RegisterEvent("PET_UI_UPDATE")
                        self:RegisterEvent("PET_BAR_UPDATE")
                        self:RegisterEvent("PET_UI_CLOSE")
                        self:RegisterEvent("UNIT_PET")
                        self:RegisterEvent("UNIT_PET_EXPERIENCE")
                        self:RegisterEvent("UNIT_MODEL_CHANGED")
                        self:RegisterEvent("UNIT_LEVEL")
                        self:RegisterEvent("UNIT_RESISTANCES")
                        self:RegisterEvent("UNIT_STATS")
                        self:RegisterEvent("UNIT_DAMAGE")
                        self:RegisterEvent("UNIT_RANGEDDAMAGE")
                        self:RegisterEvent("UNIT_ATTACK_SPEED")
                        self:RegisterEvent("UNIT_ATTACK_POWER")
                        self:RegisterEvent("UNIT_RANGED_ATTACK_POWER")
                        self:RegisterEvent("UNIT_DEFENSE")
                        self:RegisterEvent("UNIT_ATTACK")
                    </OnLoad>
                </Scripts>
            </Frame>
        </Frames>
    </Frame>

</Ui>
