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="localization.lua" />
        <Script file="QuuSpellAlert.lua" />

        <Frame name="QuuSpellAlertOptions" frameStrata="LOW" toplevel="true" enableMouse="true" movable="true" hidden="true" parent="UIParent">
                <Size>
                        <AbsDimension x="250" y="300" />
                </Size>
                <Anchors>
                        <Anchor point="CENTER" />
                </Anchors>

                <TitleRegion setAllPoints="true"/>

                <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-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="BACKGROUND">
                                <FontString name="$parentText" inherits="GameFontNormal" text="QSA Options">
                                        <Anchors>
                                                <Anchor point="TOP">
                                                        <Offset>
                                                                <AbsDimension x="0" y="-8"/>
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                </FontString>
                        </Layer>
                </Layers>
                <Frames>
                        <CheckButton name="$parentEnable" inherits="OptionsCheckButtonTemplate">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="$parent">
                                                <Offset>
                                                        <AbsDimension x="15" y="-25" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                getglobal(this:GetName().."Text"):SetText(QSA_BUTTON_ENABLE);
                                        </OnLoad>
                                </Scripts>
                        </CheckButton>

                        <CheckButton name="$parentGain" inherits="OptionsCheckButtonTemplate">
                                <Anchors>
                                        <Anchor point="LEFT" relativeTo="$parentEnable" relativePoint="left">
                                                <Offset>
                                                        <AbsDimension x="0" y="-30" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                getglobal(this:GetName().."Text"):SetText(QSA_BUTTON_GAIN);
                                        </OnLoad>
                                </Scripts>
                        </CheckButton>

                        <CheckButton name="$parentFade" inherits="OptionsCheckButtonTemplate">
                                <Anchors>
                                        <Anchor point="LEFT" relativeTo="$parentGain" relativePoint="left">
                                                <Offset>
                                                        <AbsDimension x="0" y="-30" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                getglobal(this:GetName().."Text"):SetText(QSA_BUTTON_FADE);
                                        </OnLoad>
                                </Scripts>
                        </CheckButton>

                        <CheckButton name="$parentEmote" inherits="OptionsCheckButtonTemplate">
                                <Anchors>
                                        <Anchor point="LEFT" relativeTo="$parentFade" relativePoint="left">
                                                <Offset>
                                                        <AbsDimension x="0" y="-30" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                getglobal(this:GetName().."Text"):SetText(QSA_BUTTON_EMOTE);
                                        </OnLoad>
                                </Scripts>
                        </CheckButton>

                        <CheckButton name="$parentCombat" inherits="OptionsCheckButtonTemplate">
                                <Anchors>
                                        <Anchor point="LEFT" relativeTo="$parentEmote" relativePoint="left">
                                                <Offset>
                                                        <AbsDimension x="0" y="-30" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                getglobal(this:GetName().."Text"):SetText(QSA_BUTTON_COMBAT);
                                        </OnLoad>
                                </Scripts>
                        </CheckButton>

                        <CheckButton name="$parentTarget" inherits="OptionsCheckButtonTemplate">
                                <Anchors>
                                        <Anchor point="LEFT" relativeTo="$parentCombat" relativePoint="left">
                                                <Offset>
                                                        <AbsDimension x="0" y="-30" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                getglobal(this:GetName().."Text"):SetText(QSA_BUTTON_TRGONLY);
                                        </OnLoad>
                                </Scripts>
                        </CheckButton>

                        <CheckButton name="$parentShort" inherits="OptionsCheckButtonTemplate">
                                <Anchors>
                                        <Anchor point="LEFT" relativeTo="$parentTarget" relativePoint="left">
                                                <Offset>
                                                        <AbsDimension x="0" y="-30" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                getglobal(this:GetName().."Text"):SetText(QSA_BUTTON_SHORT);
                                        </OnLoad>
                                </Scripts>
                        </CheckButton>

                        <CheckButton name="$parentAffliction" inherits="OptionsCheckButtonTemplate">
                                <Anchors>
                                        <Anchor point="LEFT" relativeTo="$parentShort" relativePoint="left">
                                                <Offset>
                                                        <AbsDimension x="0" y="-30" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                getglobal(this:GetName().."Text"):SetText(QSA_BUTTON_AFFLIC);
                                        </OnLoad>
                                </Scripts>
                        </CheckButton>

                        <Button name="$parentSave" inherits="GameMenuButtonTemplate" text="CLOSE">
                                <Anchors>
                                        <Anchor point="CENTER" relativePoint="BOTTOM" relativeTo="$parent">
                                                <Offset>
                                                        <AbsDimension x="0" y="25" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnClick>
                                                QSA_OptionsClose();
                                        </OnClick>
                                </Scripts>
                        </Button>
                </Frames>

        </Frame>

        <Frame name="QuuSpellAlertAnchor" frameStrata="HIGH" toplevel="true" enableMouse="true" movable="true" parent="UIParent">
                <Size>
                        <AbsDimension x="175" y="55"/>
                </Size>

                <Anchors>
                        <Anchor point="TOP" relativeTo="UIErrorsFrame" relativePoint="BOTTOM">
                                <Offset>
                                        <AbsDimension x="0" y="0"/>
                                </Offset>
                        </Anchor>
                </Anchors>

                <TitleRegion setAllPoints="true"/>

                <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-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="BACKGROUND">
                                <FontString name="$parentText" inherits="GameFontNormal" text="Quu Spell Alert">
                                        <Anchors>
                                                <Anchor point="TOP">
                                                        <Offset>
                                                                <AbsDimension x="0" y="-8"/>
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                </FontString>
                        </Layer>
                </Layers>
                <Scripts>
                        <OnLoad>
                                getglobal(this:GetName().."Text"):SetText(BINDING_HEADER_QSATITLE.." "..QSA_VERSION);
                        </OnLoad>
                </Scripts>
                <Frames>
                        <Button name="$parentTest" inherits="OptionsButtonTemplate" text="Test">
                                <Size>
                                        <AbsDimension x="40" y="25"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="BOTTOMLEFT">
                                                <Offset>
                                                        <AbsDimension x="5" y="5"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnClick>
                                                QSA_Test();
                                        </OnClick>
                                </Scripts>
                        </Button>
                        <Button name="$parentColor" inherits="OptionsButtonTemplate" text="Color">
                                <Size>
                                        <AbsDimension x="40" y="25"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="BOTTOMLEFT">
                                                <Offset>
                                                        <AbsDimension x="44" y="5"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnClick>
                                                QSA_ChooseColor();
                                        </OnClick>
                                </Scripts>
                        </Button>
                        <Button name="$parentOptions" inherits="OptionsButtonTemplate" text="Option">
                                <Size>
                                        <AbsDimension x="50" y="25"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="BOTTOMRIGHT">
                                                <Offset>
                                                        <AbsDimension x="-42" y="5"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnClick>
                                                QSA_OptionsOpen();
                                        </OnClick>
                                </Scripts>
                        </Button>
                        <Button name="$parentHide" inherits="OptionsButtonTemplate" text="Hide">
                                <Size>
                                        <AbsDimension x="40" y="25"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="BOTTOMRIGHT">
                                                <Offset>
                                                        <AbsDimension x="-5" y="5"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnClick>
                                                if ( ColorPickerFrame:IsVisible() ) then
                                                        ColorPickerFrame:Hide();
                                                end
                                                if ( QuuSpellAlertOptions:IsVisible() ) then
                                                        QuuSpellAlertOptions:Hide();
                                                end
                                                setVar( "QSA_Hide", true);
                                                QuuSpellAlertAnchor:Hide();
                                        </OnClick>
                                </Scripts>
                        </Button>
                </Frames>
        </Frame>

        <MessageFrame name="QuuSpellAlertNormalFrame" insertMode="BOTTOM" parent="UIParent" frameStrata="HIGH" toplevel="true" >
                <Size>
                        <AbsDimension x="600" y="70"/>
                </Size>
                <Anchors>
                        <Anchor point="TOP" relativeTo="QuuSpellAlertAnchor" relativePoint="BOTTOM">
                                <Offset>
                                        <AbsDimension x="0" y="0"/>
                                </Offset>
                        </Anchor>
                </Anchors>

                <FontString inherits="MasterFont" font="Fonts\FRIZQT__.TTF" justifyH="CENTER">
                        <FontHeight>
                                <AbsValue val="14"/>
                        </FontHeight>
                </FontString>
        </MessageFrame>

        <MessageFrame name="QuuSpellAlertCriticalFrame" insertMode="BOTTOM" parent="UIParent" frameStrata="HIGH" toplevel="true" >
                <Size>
                        <AbsDimension x="600" y="60"/>
                </Size>
                <Anchors>
                        <Anchor point="TOP" relativeTo="QuuSpellAlertNormalFrame" relativePoint="BOTTOM">
                                <Offset>
                                        <AbsDimension x="0" y="-20"/>
                                </Offset>
                        </Anchor>
                </Anchors>

                <FontString inherits="MasterFont" font="Fonts\FRIZQT__.TTF" justifyH="CENTER">
                        <FontHeight>
                                <AbsValue val="16"/>
                        </FontHeight>
                </FontString>
        </MessageFrame>

        <Frame name="QuuSpellAlertFrame" parent="UIParent"  >
                <Scripts>
                        <OnLoad>
                                this:RegisterEvent("VARIABLES_LOADED");

                                -- this is all the CHAT_MSG_SPELL_XXX events
                                this:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_OTHER");
                                this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF");
                                this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE");
                                this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_PARTY_BUFF");
                                this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_PARTY_DAMAGE");
                                this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_SELF_BUFF");
                                this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE");
                                this:RegisterEvent("CHAT_MSG_SPELL_HOSTILEPLAYER_BUFF");
                                this:RegisterEvent("CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE");
                                this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_BUFFS");
                                this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE");
                                this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_BUFFS");
                                this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE");
                                this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE");
                                this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE");


                                --this:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_SELF");
                                --this:RegisterEvent("CHAT_MSG_SPELL_BREAK_AURA");
                                --this:RegisterEvent("CHAT_MSG_SPELL_DAMAGESHIELDS_ON_OTHERS");
                                --this:RegisterEvent("CHAT_MSG_SPELL_DAMAGESHIELDS_ON_SELF");
                                --this:RegisterEvent("CHAT_MSG_SPELL_FAILED_LOCALPLAYER");
                                --this:RegisterEvent("CHAT_MSG_SPELL_FRIENDLYPLAYER_BUFF");
                                --this:RegisterEvent("CHAT_MSG_SPELL_FRIENDLYPLAYER_DAMAGE");
                                --this:RegisterEvent("CHAT_MSG_SPELL_ITEM_ENCHANTMENTS");
                                --this:RegisterEvent("CHAT_MSG_SPELL_PARTY_BUFF");
                                --this:RegisterEvent("CHAT_MSG_SPELL_PARTY_DAMAGE");
                                --this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE");
                                --this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_BUFFS");
                                --this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_BUFFS");
                                --this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS");
                                --this:RegisterEvent("CHAT_MSG_SPELL_PET_BUFF");
                                --this:RegisterEvent("CHAT_MSG_SPELL_PET_DAMAGE");
                                --this:RegisterEvent("CHAT_MSG_SPELL_SELF_BUFF");
                                --this:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE");
                                --this:RegisterEvent("CHAT_MSG_SPELL_TRADESKILLS");

                                -- these are the emotes
                                this:RegisterEvent("CHAT_MSG_EMOTE");
                                this:RegisterEvent("CHAT_MSG_MONSTER_EMOTE");
                                --this:RegisterEvent("CHAT_MSG_TEXT_EMOTE");

                        </OnLoad>
                        <OnEvent>
                                if (event == "VARIABLES_LOADED") then
                                        QSA_Init();
                                else
                                        QSA_Event(event, arg1, arg2);
                                end
                        </OnEvent>
                </Scripts>
        </Frame>
</Ui>