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

<Button name="GB_SpellbookTemplate" virtual="true">
        <Size>
                <AbsDimension x="35" y="35"/>
        </Size>
        <HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight" alphaMode="ADD"/>
        <Layers>
                <Layer level="ARTWORK">
                        <Texture name="$parent_Texture" >
                                <Size>
                                        <AbsDimension x="30" y="30" />
                                </Size>
                                <Anchors>
                                        <Anchor point="CENTER"/>
                                </Anchors>
                        </Texture>
                        <FontString name="$parent_Rank" inherits="GameFontNormalSmall">
                                <Color r="1.0" g="1.0" b="1.0"/>
                                <Anchors>
                                <Anchor point="BOTTOMRIGHT">
                                <Offset><AbsDimension x="-6" y="3"/></Offset>
                                </Anchor></Anchors>
                        </FontString>
                </Layer>
        </Layers>
        <Scripts>
                <OnLoad>
                        this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
                        this:RegisterForDrag("LeftButton");
                        this:SetBackdropColor(0.0, 0.0, 0.0);
                </OnLoad>
                <OnEnter>
                        GameTooltip_SetDefaultAnchor(GameTooltip, this);
                        GameTooltip:SetSpell(this:GetID(), SpellBookFrame.bookType);
                </OnEnter>
                <OnClick>
                        if (arg1 == "LeftButton") then
                                local name, rank = GetSpellName(this:GetID(), BOOKTYPE_SPELL);
                                GB_Set_MouseAction(name, rank, "spell");
                                PickupSpell(this:GetID(), "BOOKTYPE_SPELL");
                        else
                                CastSpell( this:GetID(), "BOOKTYPE_SPELL" );
                        end
                </OnClick>
                <OnDragStart>
                        local name, rank = GetSpellName(this:GetID(), BOOKTYPE_SPELL);
                        GB_Set_MouseAction(name, rank, "spell");
                        PickupSpell(this:GetID(), "BOOKTYPE_SPELL");    
                </OnDragStart>
                <OnLeave>
                        GameTooltip:Hide();
                </OnLeave>
        </Scripts>
</Button>

<Frame name="GB_MiniSpellbook" hidden="true" inherits="GB_OptionsBGTemplate" frameStrata="high" parent="UIParent" movable="true" enableMouse="true">
        <Size><AbsDimension x="310" y="260"/></Size>
        <Anchors>
                <Anchor point="CENTER"/>
        </Anchors>

        <Frames>
                <Frame name="GB_SpellbookBG" inherits="GB_BGTemplate" frameStrata="low">
                        <Size><AbsDimension x="290" y="240"/></Size>
                        <Anchors>
                                <Anchor point="CENTER"/>
                        </Anchors>
                        <Scripts>
                                <OnLoad>
                                        this:SetBackdropColor(0.0, 0.0, 0.0);
                                        this:SetBackdropBorderColor(1.0, 0.0, 0.0);
                                </OnLoad>
                        </Scripts>
                </Frame>

                <Button name="GB_SpellbookCloseButton" hidden="false">
                        <Size>
                                <AbsDimension x="32" y="32"/>
                        </Size>
                        <Anchors>
                                <Anchor point="TOPRIGHT">
                                        <Offset><AbsDimension x="-5" y="-5"/></Offset>
                                </Anchor>
                        </Anchors>
                        <Scripts>
                                <OnClick>
                                        this:GetParent():Hide();
                                </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>

                <Button name="$parent_Spell_1" inherits="GB_SpellbookTemplate" id="1">
                        <Anchors>
                                <Anchor point="TOPLEFT">
                                        <Offset><AbsDimension x="15" y="-34"/></Offset>
                                </Anchor>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_2" inherits="GB_SpellbookTemplate" id="2">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_1" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_3" inherits="GB_SpellbookTemplate" id="3">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_2" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_4" inherits="GB_SpellbookTemplate" id="4">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_3" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_5" inherits="GB_SpellbookTemplate" id="5">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_4" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_6" inherits="GB_SpellbookTemplate" id="6">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_5" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_7" inherits="GB_SpellbookTemplate" id="7">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_6" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_8" inherits="GB_SpellbookTemplate" id="8">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_7" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>

                <Button name="$parent_Spell_9" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_1" relativePoint="BOTTOMLEFT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_10" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_9" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_11" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_10" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_12" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_11" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_13" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_12" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_14" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_13" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_15" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_14" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_16" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_15" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>

                <Button name="$parent_Spell_17" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_9" relativePoint="BOTTOMLEFT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_18" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_17" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_19" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_18" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_20" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_19" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>       
                <Button name="$parent_Spell_21" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_20" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_22" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_21" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_23" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_22" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_24" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_23" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>

                <Button name="$parent_Spell_25" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_17" relativePoint="BOTTOMLEFT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_26" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_25" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_27" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_26" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_28" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_27" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_29" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_28" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_30" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_29" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_31" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_30" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_32" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_31" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>

                <Button name="$parent_Spell_33" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_25" relativePoint="BOTTOMLEFT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_34" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_33" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_35" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_34" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_36" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_35" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_37" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_36" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_38" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_37" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_39" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_38" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>
                <Button name="$parent_Spell_40" inherits="GB_SpellbookTemplate">
                        <Anchors>
                                <Anchor point="TOPLEFT" relativeTo="$parent_Spell_39" relativePoint="TOPRIGHT"/>
                        </Anchors>
                </Button>

                <Button name="GB_SpellBookPrevPageButton">
                        <Size>
                                <AbsDimension x="32" y="32"/>
                        </Size>
                        <Anchors>
                                <Anchor point="BOTTOM">
                                        <Offset>
                                                <AbsDimension x="-21" y="15"/>
                                        </Offset>
                                </Anchor>
                        </Anchors>
                        <Scripts>
                                <OnClick>
                                        GB_Spellbook_PreviousPage();
                                </OnClick>
                        </Scripts>
                        <NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/>
                        <PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/>
                        <DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled"/>
                        <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
                </Button>
                <Button name="GB_SpellBookNextPageButton">
                        <Size>
                                <AbsDimension x="32" y="32"/>
                        </Size>
                        <Anchors>
                                <Anchor point="BOTTOM">
                                        <Offset>
                                                <AbsDimension x="21" y="15"/>
                                        </Offset>
                                </Anchor>
                        </Anchors>
                        <Scripts>
                                <OnClick>
                                        GB_Spellbook_NextPage();
                                </OnClick>
                        </Scripts>
                        <NormalTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Up"/>
                        <PushedTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Down"/>
                        <DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled"/>
                        <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
                </Button>
        </Frames>

        <Layers>
                <Layer level="BACKGROUND">
                        <FontString inherits="GameFontNormal" text="GB_MINISPELLBOOK">
                                <Color r="1.0" b="1.0" g="1.0"/>
                                <Anchors><Anchor point="TOP">
                                <Offset><AbsDimension x="0" y="-18"/></Offset>
                                </Anchor></Anchors>
                        </FontString>
                </Layer>
        </Layers>

        <Scripts>
                <OnLoad>
                        this:SetBackdropBorderColor(1, 0, 0);
                </OnLoad>
                <OnMouseDown>
                        GB_StartMoving();
                </OnMouseDown>
                <OnMouseUp>
                        GB_StopMoving();
                </OnMouseUp>
                <OnHide>
                        GB_StopMoving();
                </OnHide>
        </Scripts>
</Frame>

</Ui>