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/
C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
        <Script file="CT_UnitFrameOptions.lua"/>
        <CheckButton name="CT_UnitFramesOptionsRadioButtonTemplate" virtual="true">
                <Size>
                        <AbsDimension x="20" y="20"/>
                </Size>
                <Layers>
                        <Layer level="ARTWORK">
                                <FontString inherits="GameFontNormalSmall" name="$parentName">
                                        <Anchors>
                                                <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent">
                                                        <Offset>
                                                                <AbsDimension x="0" y="0"/>
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                        <Color r="1" g="1" b="1"/>
                                </FontString>
                        </Layer>
                </Layers>
                <NormalTexture name="$parentNormalTexture" file="Interface\Buttons\UI-RadioButton"> 
                        <TexCoords left="0" right="0.25" top="0" bottom="1"/> 
                </NormalTexture>                
                <DisabledTexture name="$parentDisabledTexture" file="Interface\Buttons\UI-RadioButton"> 
                        <TexCoords left="0" right="0.25" top="0" bottom="1"/> 
                </DisabledTexture>              
                <PushedTexture name="$parentPushedTexture" file="Interface\Buttons\UI-RadioButton"> 
                        <TexCoords left="0.25" right="0.5" top="0" bottom="1"/> 
                </PushedTexture> 
                <HighlightTexture name="$parentHighlightTexture" file="Interface\Buttons\UI-RadioButton" alphaMode="ADD">
                        <TexCoords left="0.51" right="0.75" top="0" bottom="1"/> 
                </HighlightTexture>
                <CheckedTexture name="$parentCheckedTexture" file="Interface\Buttons\UI-RadioButton"> 
                        <TexCoords left="0.25" right="0.5" top="0" bottom="1"/> 
                </CheckedTexture> 
                <DisabledCheckedTexture name="$parentDisabledCheckedTexture" file="Interface\Buttons\UI-RadioButton"> 
                        <TexCoords left="0.25" right="0.5" top="0" bottom="1"/> 
                </DisabledCheckedTexture>
                <Scripts>
                        <OnClick>
                                CT_UnitFramesOptions_Radio_OnClick();
                        </OnClick>
                        <OnLoad>
                                CT_UnitFramesOptions_Radio_OnLoad();
                        </OnLoad>
                </Scripts>
        </CheckButton>
        <Frame name="CT_UnitFramesOptionsFrameSelectionTemplate" virtual="true">
                <Size>
                        <AbsDimension x="270" y="20"/>
                </Size>
                <Layers>
                        <Layer level="ARTWORK">
                                <FontString name="$parentName" inherits="GameFontNormalSmall">
                                        <Anchors>
                                                <Anchor point="LEFT"/>
                                        </Anchors>
                                </FontString>
                        </Layer>
                </Layers>
                <Frames>
                        <CheckButton name="$parentRadio1" id="1" inherits="CT_UnitFramesOptionsRadioButtonTemplate"> <!-- None -->
                                <Anchors>
                                        <Anchor point="LEFT">
                                                <Offset>
                                                        <AbsDimension x="115" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                        </CheckButton>
                        <CheckButton name="$parentRadio2" id="2" inherits="CT_UnitFramesOptionsRadioButtonTemplate"> <!-- Percent -->
                                <Anchors>
                                        <Anchor point="LEFT" relativeTo="$parentRadio1" relativePoint="RIGHT">
                                                <Offset>
                                                        <AbsDimension x="32" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                        </CheckButton>
                        <CheckButton name="$parentRadio3" id="3" inherits="CT_UnitFramesOptionsRadioButtonTemplate"> <!-- Deficit -->
                                <Anchors>
                                        <Anchor point="LEFT" relativeTo="$parentRadio2" relativePoint="RIGHT">
                                                <Offset>
                                                        <AbsDimension x="48" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                        </CheckButton>
                        <CheckButton name="$parentRadio4" id="4" inherits="CT_UnitFramesOptionsRadioButtonTemplate"> <!-- Exact values -->
                                <Anchors>
                                        <Anchor point="LEFT" relativeTo="$parentRadio3" relativePoint="RIGHT">
                                                <Offset>
                                                        <AbsDimension x="40" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                        </CheckButton>
                        <Button name="$parentColorSwatch">
                                <Size>
                                        <AbsDimension x="16" y="16"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentRadio4">
                                                <Offset>
                                                        <AbsDimension x="40" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Layers>
                                        <Layer level="BACKGROUND">
                                                <Texture name="$parentBG">
                                                        <Size>
                                                                <AbsDimension x="14" y="14"/>
                                                        </Size>
                                                        <Color r="1.0" g="1.0" b="1.0"/>
                                                        <Anchors>
                                                                <Anchor point="CENTER"/>
                                                        </Anchors>
                                                </Texture>
                                        </Layer>
                                </Layers>
                                <Scripts>
                                        <OnClick>
                                                CloseMenus();
                                                CT_UnitFrameOptions_ColorSwatch_ShowColorPicker(CT_UnitFramesOptionsFrame);
                                        </OnClick>
                                        <OnEnter>
                                                getglobal(this:GetName().."BG"):SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
                                        </OnEnter>
                                        <OnLeave>
                                                getglobal(this:GetName().."BG"):SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
                                        </OnLeave>
                                </Scripts>
                                <NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\ChatFrameColorSwatch"/>
                        </Button>
                </Frames>
                <Scripts>
                        <OnLoad>
                                CT_UnitFramesOptions_Selection_OnLoad();
                        </OnLoad>
                </Scripts>
        </Frame>
        <Frame name="CT_UnitFramesOptionsBoxTemplate" virtual="true">
                <Size>
                        <AbsDimension x="390" y="50"/>
                </Size>

                <Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                        <EdgeSize>
                                <AbsValue val="16"/>
                        </EdgeSize>
                        <TileSize>
                                <AbsValue val="16"/>
                        </TileSize>
                        <BackgroundInsets>
                                <AbsInset left="5" right="5" top="5" bottom="5"/>
                        </BackgroundInsets>
                </Backdrop>

                <Layers>
                        <Layer level="ARTWORK">
                                <FontString name="$parentName" inherits="GameFontNormal">
                                        <Anchors>
                                                <Anchor point="TOP">
                                                        <Offset>
                                                                <AbsDimension x="0" y="12"/>
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                </FontString>
                        </Layer>
                </Layers>

                <Frames>
                        <Frame name="$parentSelection1" id="1" inherits="CT_UnitFramesOptionsFrameSelectionTemplate">
                                <Anchors>
                                        <Anchor point="TOPLEFT">
                                                <Offset>
                                                        <AbsDimension x="10" y="-5"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                        </Frame>
                        <Frame name="$parentSelection2" id="2" inherits="CT_UnitFramesOptionsFrameSelectionTemplate">
                                <Anchors>
                                        <Anchor point="TOPLEFT">
                                                <Offset>
                                                        <AbsDimension x="10" y="-25"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                        </Frame>
                </Frames>

                <Scripts>
                        <OnLoad>
                                this:SetBackdropColor(0, 0, 0, 0.5);
                                CT_UnitFramesOptions_Box_OnLoad();
                        </OnLoad>
                </Scripts>
        </Frame>

        <Frame name="CT_UnitFramesOptionsFrame" parent="UIParent" movable="true" hidden="true">
                <Size>
                        <AbsDimension x="430" y="450"/>
                </Size>

                <Anchors>
                        <Anchor point="CENTER"/>
                </Anchors>

                <Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                        <EdgeSize>
                                <AbsValue val="16"/>
                        </EdgeSize>
                        <TileSize>
                                <AbsValue val="16"/>
                        </TileSize>
                        <BackgroundInsets>
                                <AbsInset left="5" right="5" top="5" bottom="5"/>
                        </BackgroundInsets>
                </Backdrop>

                <Layers>
                        <Layer level="ARTWORK">
                                <FontString name="$parentTitle" text="CT_UnitFrames Options" inherits="GameFontNormal">
                                        <Anchors>
                                                <Anchor point="TOP">
                                                        <Offset>
                                                                <AbsDimension x="0" y="-5"/>
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                </FontString>
                        </Layer>
                </Layers>
                
                <Frames>
                        <Button name="$parentCloseButton" hidden="false">
                                <Size>
                                        <AbsDimension x="42" y="42"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="TOPRIGHT"/>
                                </Anchors>
                                <Scripts>
                                        <OnClick>
                                                HideUIPanel(this:GetParent());
                                        </OnClick>
                                </Scripts>
                                <NormalTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Up"/>
                                <PushedTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Down"/>
                                <HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight" alphaMode="ADD"/>
                        </Button>

                        <Frame name="$parentBox1" id="1" inherits="CT_UnitFramesOptionsBoxTemplate">
                                <Size>
                                        <AbsDimension x="390" y="95"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="TOPLEFT">
                                                <Offset>
                                                        <AbsDimension x="20" y="-45"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Frames>
                                        <Frame name="$parentSelection3" id="3" inherits="CT_UnitFramesOptionsFrameSelectionTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="10" y="-45"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                        </Frame>
                                        <Frame name="$parentSelection4" id="4" inherits="CT_UnitFramesOptionsFrameSelectionTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="10" y="-65"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                        </Frame>
                                </Frames>
                        </Frame>

                        <Frame name="$parentBox2" id="2" inherits="CT_UnitFramesOptionsBoxTemplate">
                                <Size>
                                        <AbsDimension x="390" y="130"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parentBox1">
                                                <Offset>
                                                        <AbsDimension x="0" y="-15"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Frames>
                                        <Frame name="$parentSelection3" id="3" inherits="CT_UnitFramesOptionsFrameSelectionTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="10" y="-45"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                        </Frame>
                                        <Frame name="$parentSelection4" id="4" inherits="CT_UnitFramesOptionsFrameSelectionTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="10" y="-65"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                        </Frame>
                                        <Slider name="$parentSlider" inherits="OptionsSliderTemplate">
                                                <Size>
                                                        <AbsDimension x="300" y="17"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="CENTER" relativePoint="TOP">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-105"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                CT_PartyFrameSlider_OnLoad();
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(CT_UnitFramesOptions.partyTextSize or 3);
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                CT_UnitFramesOptions.partyTextSize = this:GetValue();
                                                                getglobal(this:GetName().."Text"):SetText(CT_UFO_PARTYTEXTSIZE .. " - "..this:GetValue());
                                                                CT_UnitFramesOptions_Radio_Update();
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>
                                </Frames>
                        </Frame>
                        
                        <Frame name="$parentBox3" id="3" inherits="CT_UnitFramesOptionsBoxTemplate">
                                <Size>
                                        <AbsDimension x="390" y="70"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parentBox2">
                                                <Offset>
                                                        <AbsDimension x="0" y="-15"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Frames>
                                        <CheckButton name="$parentClassFrameCB" hidden="false" inherits="OptionsCheckButtonTemplate">
                                                <HitRectInsets>
                                                        <AbsInset left="0" right="0" top="0" bottom="0"/>
                                                </HitRectInsets>
                                                <Size>
                                                        <AbsDimension x="24" y="24"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="7" y="-42"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                CT_UnitFramesOptions_Box_CB_OnClick();
                                                        </OnClick>
                                                </Scripts>
                                                <Layers>
                                                        <Layer level="ARTWORK">
                                                                <FontString name="$parentName" inherits="GameFontNormalSmall">
                                                                        <Anchors>
                                                                                <Anchor point="LEFT" relativePoint="RIGHT">
                                                                                        <Offset>
                                                                                                <AbsDimension x="4" y="0"/>
                                                                                        </Offset>
                                                                                </Anchor>
                                                                        </Anchors>
                                                                        <Color r="1" g="1" b="1"/>
                                                                </FontString>
                                                        </Layer>
                                                </Layers>
                                        </CheckButton>
                                </Frames>
                        </Frame>

                        <Frame name="$parentBox4" id="4" inherits="CT_UnitFramesOptionsBoxTemplate">
                                <Anchors>
                                        <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parentBox3">
                                                <Offset>
                                                        <AbsDimension x="0" y="-15"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Frames>
                                        <CheckButton name="$parentDisplayCB" hidden="false" inherits="OptionsCheckButtonTemplate">
                                                <HitRectInsets>
                                                        <AbsInset left="0" right="0" top="0" bottom="0"/>
                                                </HitRectInsets>
                                                <Size>
                                                        <AbsDimension x="18" y="18"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="RIGHT" relativeTo="$parentName" relativePoint="LEFT">
                                                                <Offset>
                                                                        <AbsDimension x="-4" y="0"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                CT_UnitFramesOptions_Box_CB_OnClick();
                                                        </OnClick>
                                                </Scripts>
                                                <Layers>
                                                        <Layer level="ARTWORK">
                                                                <FontString name="$parentName" inherits="GameFontNormalSmall">
                                                                        <Anchors>
                                                                                <Anchor point="LEFT" relativePoint="RIGHT">
                                                                                        <Offset>
                                                                                                <AbsDimension x="2" y="1"/>
                                                                                        </Offset>
                                                                                </Anchor>
                                                                        </Anchors>
                                                                        <Color r="1" g="1" b="1"/>
                                                                </FontString>
                                                        </Layer>
                                                </Layers>
                                        </CheckButton>
                                </Frames>
                        </Frame>
                </Frames>

                <Scripts>
                        <OnLoad>
                                this:SetBackdropColor(0, 0, 0, 0.8);
                                this:RegisterEvent("VARIABLES_LOADED");
                        </OnLoad>
                        <OnEvent>
                                CT_UnitFramesOptions_Radio_Update();
                        </OnEvent>
                        <OnMouseDown>
                                if ( arg1 == "LeftButton" ) then
                                        this:StartMoving();
                                end
                        </OnMouseDown>
                        <OnMouseUp>
                                if ( arg1 == "LeftButton" ) then
                                        this:StopMovingOrSizing();
                                end
                        </OnMouseUp>
                        <OnHide>
                                PlaySound("UChatScrollButton");
                                this:StopMovingOrSizing();
                        </OnHide>
                        <OnShow>
                                PlaySound("UChatScrollButton");
                        </OnShow>
                </Scripts>
        </Frame>
</Ui>

Generated by GNU Enscript 1.6.5.90.