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="GuildAdsConfig.lua"/>

    

    <CheckButton name="GuildAdsConfig_CheckButton" virtual="true">

        <Size>

                        <AbsDimension x="20" y="20"/>

                </Size>

                <NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>

                <PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>

                <HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>

                <CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>

                <DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>

    </CheckButton>

        

        <EditBox name="GuildAdsConfig_EditBox" virtual="true">

                <TextInsets>

                        <AbsInset  left="5" right="5" />

                </TextInsets>

                <FontString inherits="ChatFontNormal" bytes="256"/>

                <Backdrop name="$parentBackdrop" bgFile="Interface\TutorialFrame\TutorialFrameBackground" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">

                        <EdgeSize>

                                <AbsValue val="8"/>

                        </EdgeSize>

                        <TileSize>

                                <AbsValue val="16"/>

                        </TileSize>

                </Backdrop>

        </EditBox>

        

        <Frame name="GuildAdsConfig_OptionFrameBoxTemplate" inherits="OptionFrameBoxTemplate" virtual="true">           

                <Scripts>

                        <OnLoad>

                                this:SetBackdropBorderColor(0.4, 0.4, 0.4);

                                this:SetBackdropColor(0.15, 0.15, 0.15);

                        </OnLoad>

                </Scripts>

        </Frame>

        

    <Frame name="GuildAdsConfigFrame" frameStrata="HIGH" parent="UIParent" hidden="true" enableMouse="true" movable="true">

        <Size>

            <AbsDimension x="400" y="500"/> <!-- 320 -->

        </Size>

        <Anchors>

                <Anchor point="TOPLEFT">

                        <Offset>

                                <AbsDimension x="100" y="-104"/>

                        </Offset>

                </Anchor>

        </Anchors>

        <Backdrop name="$parentBackdrop" bgFile="Interface\TutorialFrame\TutorialFrameBackground" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">

                <EdgeSize>

                        <AbsValue val="16"/>

                </EdgeSize>

                <TileSize>

                        <AbsValue val="16"/>

                </TileSize>

                <BackgroundInsets>

                        <AbsInset left="3" right="5" top="3" bottom="5"/>

        </BackgroundInsets>

        </Backdrop>

        <Layers>

            <Layer level="BACKGROUND">

                <FontString name="GuildAdsConfigTitle" inherits="GameFontNormal" text="GUILDADS_TITLE">

                    <Anchors>

                        <Anchor point="TOP" relativeTo="GuildAdsConfigFrame" relativePoint="TOP">

                            <Offset>

                                <AbsDimension x="0" y="-15"/>

                            </Offset>

                        </Anchor>

                    </Anchors>

                </FontString>

            </Layer>

        </Layers>

        <Frames>

                <Button name="GuildAdsConfigCloseButton" inherits="UIPanelCloseButton">

                        <Anchors>

                                <Anchor point="TOPRIGHT" relativeTo="GuildAdsConfigFrame">

                                        <Offset>

                                                <AbsDimension x="2" y="2"/>

                                        </Offset>

                                </Anchor>

                        </Anchors>

                </Button>

                

                <Frame name="GuildAdsConfig_Chat" inherits="GuildAdsConfig_OptionFrameBoxTemplate">

                <Size>

                        <AbsDimension x="380" y="235"/>

                </Size>

                <Anchors>

                        <Anchor point="TOP">

                                <Offset>

                                        <AbsDimension x="0" y="-30"/>

                                </Offset>

                        </Anchor>

                </Anchors>

                <Layers>

                        <Layer level="ARTWORK">

                                <FontString name="$parentTitleLabel" inherits="GameFontHighlightSmall" text="GUILDADS_CHAT_OPTIONS">

                                        <Anchors>

                                                <Anchor point="TOP" relativePoint="TOP">

                                                        <Offset>

                                                                <AbsDimension x="0" y="-10"/>

                                                        </Offset>

                                                </Anchor>

                                        </Anchors>

                                </FontString>

                        </Layer>

                </Layers>

                <Frames>

                

                <EditBox name="GuildAds_ChannelAliasEditBox" autoFocus="false" historyLines="0" inherits="GuildAdsConfig_EditBox">

                        <Size>

                                <AbsDimension x="200" y="26"/>

                        </Size>

                        <Anchors>

                                <Anchor point="TOPLEFT">

                                        <Offset>

                                                <AbsDimension x="130" y="-30" />

                                        </Offset>

                                </Anchor>

                        </Anchors>

                        <Layers>

                                <Layer level="ARTWORK">

                                        <FontString name="$parentLabel" inherits="GameFontNormalSmall" text="GUILDADS_CHAT_ALIAS">

                                                <Anchors>

                                                        <Anchor point="RIGHT" relativePoint="LEFT">

                                                                <Offset>

                                                                        <AbsDimension x="-5" y="0"/>

                                                                </Offset>

                                                        </Anchor>

                                                </Anchors>

                                        </FontString>

                                </Layer>

                        </Layers>

                </EditBox>

                

                <EditBox name="GuildAds_ChannelCommandEditBox" autoFocus="false" historyLines="0" inherits="GuildAdsConfig_EditBox">

                        <Size>

                                <AbsDimension x="200" y="26"/>

                        </Size>

                        <Anchors>

                                <Anchor point="TOPLEFT" relativeTo="GuildAds_ChannelAliasEditBox" relativePoint="BOTTOMLEFT">

                                        <Offset>

                                                <AbsDimension x="0" y="-5"/>

                                        </Offset>

                                </Anchor>

                        </Anchors>

                        <Layers>

                                <Layer level="ARTWORK">

                                        <FontString name="$parentLabel" inherits="GameFontNormalSmall" text="GUILDADS_CHAT_COMMAND">

                                                <Anchors>

                                                        <Anchor point="RIGHT" relativePoint="LEFT">

                                                                <Offset>

                                                                        <AbsDimension x="-2" y="0"/>

                                                                </Offset>

                                                        </Anchor>

                                                </Anchors>

                                        </FontString>

                                </Layer>

                        </Layers>

                </EditBox>

                

                <CheckButton name="GuildAds_ChatUseThisCheckButton" inherits="GuildAdsConfig_CheckButton">

                        <Anchors>

                                <Anchor point="TOPLEFT" relativeTo="GuildAds_ChannelCommandEditBox" relativePoint="BOTTOMLEFT">

                                        <Offset>

                                                <AbsDimension x="-110" y="-12" />

                                        </Offset>

                                </Anchor>

                        </Anchors>

                        <Layers>

                                <Layer level="ARTWORK">

                                        <FontString name="$parentLabel" inherits="GameFontNormalSmall" text="GUILDADS_CHAT_USETHIS">

                                                <Anchors>

                                                        <Anchor point="LEFT" relativePoint="RIGHT">

                                                                <Offset>

                                                                        <AbsDimension x="5" y="1"/>

                                                                </Offset>

                                                        </Anchor>

                                                </Anchors>

                                        </FontString>

                                </Layer>

                        </Layers>

                        <Scripts>

                                <OnClick>

                                        if ( this:GetChecked() ) then

                                                PlaySound("igMainMenuOptionCheckBoxOff");

                                                GuildAdsConfig_SetUseThisChannel(true);

                                        else

                                                PlaySound("igMainMenuOptionCheckBoxOn");

                                                GuildAdsConfig_SetUseThisChannel(false);

                                        end

                                </OnClick>

                        </Scripts>

                </CheckButton>

                

                <EditBox name="GuildAds_ChannelEditBox" autoFocus="false" historyLines="0" inherits="GuildAdsConfig_EditBox">

                        <Size>

                                <AbsDimension x="200" y="26"/>

                        </Size>

                        <Anchors>

                                <Anchor point="TOPLEFT" relativeTo="GuildAds_ChatUseThisCheckButton" relativePoint="BOTTOMLEFT">

                                        <Offset>

                                                <AbsDimension x="110" y="0"/>

                                        </Offset>

                                </Anchor>

                        </Anchors>

                        <Layers>

                                <Layer level="ARTWORK">

                                        <FontString name="$parentLabel" inherits="GameFontNormalSmall" text="GUILDADS_CHAT_CHANNEL">

                                                <Anchors>

                                                        <Anchor point="RIGHT" relativePoint="LEFT">

                                                                <Offset>

                                                                        <AbsDimension x="-5" y="0"/>

                                                                </Offset>

                                                        </Anchor>

                                                </Anchors>

                                        </FontString>

                                </Layer>

                        </Layers>

                </EditBox>

                

                <EditBox name="GuildAds_ChannelPasswordEditBox" autoFocus="false" historyLines="0" password="true" inherits="GuildAdsConfig_EditBox">

                        <Size>

                                <AbsDimension x="200" y="26"/>

                        </Size>

                        <Anchors>

                                <Anchor point="TOPLEFT" relativeTo="GuildAds_ChatUseThisCheckButton" relativePoint="BOTTOMLEFT">

                                        <Offset>

                                                <AbsDimension x="110" y="-30"/>

                                        </Offset>

                                </Anchor>

                        </Anchors>

                        <Layers>

                                <Layer level="ARTWORK">

                                        <FontString name="$parentLabel" inherits="GameFontNormalSmall" text="GUILDADS_CHAT_PASSWORD">

                                                <Anchors>

                                                        <Anchor point="RIGHT" relativePoint="LEFT">

                                                                <Offset>

                                                                        <AbsDimension x="-5" y="0"/>

                                                                </Offset>

                                                        </Anchor>

                                                </Anchors>

                                        </FontString>

                                </Layer>

                        </Layers>

                </EditBox>

                

                <CheckButton name="GuildAds_ChatShowNewAskCheckButton" inherits="GuildAdsConfig_CheckButton">

                        <Anchors>

                                <Anchor point="TOPLEFT" relativeTo="GuildAds_ChannelPasswordEditBox" relativePoint="BOTTOMLEFT">

                                        <Offset>

                                                <AbsDimension x="-110" y="-12" />

                                        </Offset>

                                </Anchor>

                        </Anchors>

                        <Layers>

                                <Layer level="ARTWORK">

                                        <FontString name="$parentLabel" inherits="GameFontNormalSmall" text="GUILDADS_CHAT_SHOW_NEWASK">

                                                <Anchors>

                                                        <Anchor point="LEFT" relativePoint="RIGHT">

                                                                <Offset>

                                                                        <AbsDimension x="5" y="1"/>

                                                                </Offset>

                                                        </Anchor>

                                                </Anchors>

                                        </FontString>

                                </Layer>

                        </Layers>

                        <Scripts>

                                <OnClick>

                                        if ( this:GetChecked() ) then

                                                GuildAdsConfig_SetProfileValue("ShowNewAsk", true);

                                                PlaySound("igMainMenuOptionCheckBoxOn");

                                        else

                                                GuildAdsConfig_SetProfileValue("ShowNewAsk", nil);

                                                PlaySound("igMainMenuOptionCheckBoxOff");

                                        end

                                </OnClick>

                        </Scripts>

                </CheckButton>

                

                <CheckButton name="GuildAds_ChatShowNewHaveCheckButton" inherits="GuildAdsConfig_CheckButton">

                        <Anchors>

                                <Anchor point="TOPLEFT" relativeTo="GuildAds_ChatShowNewAskCheckButton" relativePoint="BOTTOMLEFT">

                                        <Offset>

                                                <AbsDimension x="0" y="0" />

                                        </Offset>

                                </Anchor>

                        </Anchors>

                        <Layers>

                                <Layer level="ARTWORK">

                                        <FontString name="$parentLabel" inherits="GameFontNormalSmall" text="GUILDADS_CHAT_SHOW_NEWHAVE">

                                                <Anchors>

                                                        <Anchor point="LEFT" relativePoint="RIGHT">

                                                                <Offset>

                                                                        <AbsDimension x="5" y="1"/>

                                                                </Offset>

                                                        </Anchor>

                                                </Anchors>

                                        </FontString>

                                </Layer>

                        </Layers>

                        <Scripts>

                                <OnClick>

                                        if ( this:GetChecked() ) then

                                                GuildAdsConfig_SetProfileValue("ShowNewHave", true);

                                                PlaySound("igMainMenuOptionCheckBoxOn");

                                        else

                                                GuildAdsConfig_SetProfileValue("ShowNewHave", nil);

                                                PlaySound("igMainMenuOptionCheckBoxOff");

                                        end

                                </OnClick>

                        </Scripts>

                </CheckButton>

                

                </Frames>

                </Frame>

                

                <Frame name="GuildAdsConfig_Ads" inherits="GuildAdsConfig_OptionFrameBoxTemplate">

                <Size>

                        <AbsDimension x="380" y="105"/>

                </Size>

                <Anchors>

                        <Anchor point="TOP" relativeTo="GuildAdsConfig_Chat" relativePoint="BOTTOM">

                                <Offset>

                                        <AbsDimension x="0" y="-5"/>

                                </Offset>

                        </Anchor>

                </Anchors>

                <Layers>

                        <Layer level="ARTWORK">

                                <FontString name="$parentTitleLabel" inherits="GameFontHighlightSmall" text="GUILDADS_ADS_OPTIONS">

                                        <Anchors>

                                                <Anchor point="TOP" relativePoint="TOP">

                                                        <Offset>

                                                                <AbsDimension x="0" y="-10"/>

                                                        </Offset>

                                                </Anchor>

                                        </Anchors>

                                </FontString>

                        </Layer>

                </Layers>

                <Frames>

                <CheckButton name="GuildAds_PublishMyAdsCheckButton" inherits="GuildAdsConfig_CheckButton">

                        <Anchors>

                                <Anchor point="TOPLEFT">

                                        <Offset>

                                                <AbsDimension x="20" y="-25"/>

                                        </Offset>

                                </Anchor>

                        </Anchors>

                        <Layers>

                                <Layer level="ARTWORK">

                                        <FontString name="GuildAds_PublishMyAdsCheckButtonText" inherits="GameFontNormalSmall" text="GUILDADS_PUBLISH">

                                                <Anchors>

                                                        <Anchor point="LEFT" relativePoint="RIGHT">

                                                                <Offset>

                                                                        <AbsDimension x="5" y="1"/>

                                                                </Offset>

                                                        </Anchor>

                                                </Anchors>

                                        </FontString>

                                </Layer>

                        </Layers>

                        <Scripts>

                                <OnClick>

                                        if ( this:GetChecked() ) then

                                                PlaySound("igMainMenuOptionCheckBoxOff");

                                        else

                                                PlaySound("igMainMenuOptionCheckBoxOn");

                                        end

                                        GuildAds_SetPublishMyAds(this:GetChecked());

                                </OnClick>

                        </Scripts>

                </CheckButton>

                

                <CheckButton name="GuildAds_ShowOfflinePlayerCheckButton" inherits="GuildAdsConfig_CheckButton">

                        <Anchors>

                                <Anchor point="TOPLEFT" relativeTo="GuildAds_PublishMyAdsCheckButton" relativePoint="BOTTOMLEFT">

                                        <Offset>

                                                <AbsDimension x="0" y="-10"/>

                                        </Offset>

                                </Anchor>

                        </Anchors>

                        <Layers>

                                <Layer level="ARTWORK">

                                        <FontString name="GuildAds_ShowOfflinePlayerCheckButtonText" inherits="GameFontNormalSmall" text="SHOW_OFFLINE_MEMBERS" >

                                                <Anchors>

                                                        <Anchor point="LEFT" relativePoint="RIGHT">

                                                                <Offset>

                                                                        <AbsDimension x="5" y="1"/>

                                                                </Offset>

                                                        </Anchor>

                                                </Anchors>

                                        </FontString>

                                </Layer>

                        </Layers>

                        <Scripts>

                                <OnClick>

                                        if ( this:GetChecked() ) then

                                                PlaySound("igMainMenuOptionCheckBoxOff");

                                        else

                                                PlaySound("igMainMenuOptionCheckBoxOn");

                                        end

                                        GuildAds_ShowOfflinePlayer(this:GetChecked());

                                </OnClick>

                        </Scripts>

                </CheckButton>

                

                <CheckButton name="GuildAds_ShowMyAdsCheckButton" inherits="GuildAdsConfig_CheckButton">

                        <Anchors>

                                <Anchor point="TOPLEFT" relativeTo="GuildAds_ShowOfflinePlayerCheckButton" relativePoint="BOTTOMLEFT">

                                        <Offset>

                                                <AbsDimension x="0" y="0"/>

                                        </Offset>

                                </Anchor>

                        </Anchors>

                        <Layers>

                                <Layer level="ARTWORK">

                                        <FontString name="GuildAds_ShowMyAdsCheckButtonText" inherits="GameFontNormalSmall" text="GUILDADS_VIEWMYADS" >

                                                <Anchors>

                                                        <Anchor point="LEFT" relativePoint="RIGHT">

                                                                <Offset>

                                                                        <AbsDimension x="5" y="1"/>

                                                                </Offset>

                                                        </Anchor>

                                                </Anchors>

                                        </FontString>

                                </Layer>

                        </Layers>

                        <Scripts>

                                <OnClick>

                                        if ( this:GetChecked() ) then

                                                PlaySound("igMainMenuOptionCheckBoxOff");

                                        else

                                                PlaySound("igMainMenuOptionCheckBoxOn");

                                        end

                                        GuildAds_ShowMyAds(this:GetChecked());

                                </OnClick>

                        </Scripts>

                </CheckButton>

                

                </Frames>

                </Frame>

                

                <Frame name="GuildAdsConfig_MinimapButton" inherits="GuildAdsConfig_OptionFrameBoxTemplate">

                <Size>

                        <AbsDimension x="380" y="110"/>

                </Size>

                <Anchors>

                        <Anchor point="TOP" relativeTo="GuildAdsConfig_Ads" relativePoint="BOTTOM">

                                <Offset>

                                        <AbsDimension x="0" y="-5"/>

                                </Offset>

                        </Anchor>

                </Anchors>

                <Layers>

                        <Layer level="ARTWORK">

                                <FontString name="$parentTitleLabel" inherits="GameFontHighlightSmall" text="GUILDADS_ICON_OPTIONS">

                                        <Anchors>

                                                <Anchor point="TOP" relativePoint="TOP">

                                                        <Offset>

                                                                <AbsDimension x="0" y="-10"/>

                                                        </Offset>

                                                </Anchor>

                                        </Anchors>

                                </FontString>

                        </Layer>

                </Layers>

                <Frames>

                <Slider name="GuildAds_MinimapArcSlider"  inherits="OptionsSliderTemplate">

                        <Size>

                                <AbsDimension x="360" y="16"/>

                        </Size>

                        <Anchors>

                                <Anchor point="TOPLEFT">

                                        <Offset>

                                                <AbsDimension x="10" y="-45"/>

                                        </Offset>

                                </Anchor>

                        </Anchors>

                        <Scripts>

                                <OnLoad>

                                        getglobal(this:GetName().."Text"):SetText(GUILDADS_ICON.." - "..GUILDADS_ADJUST_ANGLE);

                                        getglobal(this:GetName().."High"):SetText("360");

                                        getglobal(this:GetName().."Low"):SetText("0");

                                        this:SetMinMaxValues(0,360);

                                        this:SetValueStep(1);

                                </OnLoad>

                                <OnValueChanged>

                                        GuildAds.Config.MinimapArcOffset = this:GetValue();

                                        GuildAdsMinimapButton_Update();                                                         

                                </OnValueChanged>

                        </Scripts>

                </Slider>

                

                <Slider name="GuildAds_MinimapRadiusSlider"  inherits="OptionsSliderTemplate">

                        <Size>

                                <AbsDimension x="360" y="16"/>

                        </Size>

                        <Anchors>

                                <Anchor point="TOPLEFT" relativeTo="GuildAds_MinimapArcSlider" relativePoint="BOTTOMLEFT">

                                        <Offset>

                                                <AbsDimension x="0" y="-13"/>

                                        </Offset>

                                </Anchor>

                        </Anchors>

                        <Scripts>

                                <OnLoad>

                                        getglobal(this:GetName().."Text"):SetText(GUILDADS_ICON.." - "..GUILDADS_ADJUST_RADIUS);

                                        getglobal(this:GetName().."High"):SetText("150");

                                        getglobal(this:GetName().."Low"):SetText("0");

                                        this:SetMinMaxValues(0,150);

                                        this:SetValueStep(1);

                                </OnLoad>

                                <OnValueChanged>

                                        GuildAds.Config.MinimapRadiusOffset = this:GetValue();

                                        GuildAdsMinimapButton_Update();                                                         

                                </OnValueChanged>

                        </Scripts>

                </Slider>

                </Frames>

                </Frame>

                

        </Frames>

        <Scripts>

                <OnMouseUp>

                        if ( this.isMoving ) then

                                this:StopMovingOrSizing();

                                this.isMoving = false;

                        end

                </OnMouseUp>

                <OnMouseDown>

                        if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then

                                this:StartMoving();

                                this.isMoving = true;

                        end

                </OnMouseDown>

                <OnHide>

                        if ( this.isMoving ) then

                                this:StopMovingOrSizing();

                                this.isMoving = false;

                        end

                        

                        GuildAdsConfigFrame_OnHide();

                </OnHide>

                <OnShow>

                        GuildAdsConfigFrame_OnShow();

                </OnShow>

        </Scripts>

    </Frame>

</Ui>