WoWInterface SVN TactikSOD

[/] [branches/] [TactikSOD.xml] - Rev 2

Compare with Previous | Blame | View Log

<Ui>
        <Script file="TactikSOD.lua"/>

        <!-- Template for titlebar buttons -->
        <Button name="TactikSODButtonTemplate" virtual="true">
                <Size>
                        <AbsDimension x="18" y="18"/>
                </Size>
                <NormalTexture file="Interface\AddOns\TactikSOD\Buttons">
                        <TexCoords left=".25" right=".375" top=".375" bottom=".5"/>
                </NormalTexture>
                <PushedTexture file="Interface\AddOns\TactikSOD\Buttons">
                        <TexCoords left=".375" right=".5" top=".375" bottom=".5"/>
                </PushedTexture>
                <HighlightTexture file="Interface\AddOns\TactikSOD\Buttons" alphaMode="ADD">
                        <TexCoords left=".125" right=".25" top=".25" bottom=".375"/>
                </HighlightTexture>
                <Scripts>
                        <OnEnter>
                                TactikSOD.Tooltip()
                        </OnEnter>
                        <OnLeave>
                                GameTooltip:Hide()
                        </OnLeave>
                        <OnClick>
                                TactikSOD.OnClick()
                        </OnClick>
                </Scripts>
        </Button>

        <Frame name="TactikSODFrame" parent="UIParent" movable="true" resizable="true" enableMouse="true" toplevel="true" hidden="true">
                <Size>
                        <AbsDimension x="300" y="200"/>
                </Size>
                <Anchors>
                        <Anchor point="CENTER"/>
                </Anchors>
                <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                        <BackgroundInsets>
                                <AbsInset left="4" right="4" top="4" bottom="4" />
                        </BackgroundInsets>
                        <TileSize>
                                <AbsValue val="16" />
                        </TileSize>
                        <EdgeSize>
                                <AbsValue val="16" />
                        </EdgeSize>
                </Backdrop>
                <Frames>
                        <Frame name="TactikSODEditFrame">
                                <Anchors>
                                        <Anchor point="TOPLEFT">
                                                <Offset>
                                                        <AbsDimension x="8" y="-20"/>
                                                </Offset>
                                        </Anchor>
                                        <Anchor point="BOTTOMRIGHT">
                                                <Offset>
                                                        <AbsDimension x="-8" y="4"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Buttons\UI-SliderBar-Border" tile="true">
                                        <BackgroundInsets>
                                                <AbsInset left="3" right="3" top="6" bottom="6" />
                                        </BackgroundInsets>
                                        <TileSize>
                                                <AbsValue val="16" />
                                        </TileSize>
                                        <EdgeSize>
                                                <AbsValue val="9" />
                                        </EdgeSize>
                                </Backdrop>
                                <Frames>
                                        <ScrollFrame name="TactikSODEditScrollFrame" inherits="UIPanelScrollFrameTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="6" y="-12"/>
                                                                </Offset>
                                                        </Anchor>
                                                        <Anchor point="BOTTOMRIGHT">
                                                                <Offset>
                                                                        <AbsDimension x="-26" y="8"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <!-- Entire purpose of this layer is to do a gradient for the gutter -->
                                                <Layers>
                                                        <Layer level="BORDER">
                                                                <Texture file="Interface\ChatFrame\ChatFrameBackground">
                                                                        <Anchors>
                                                                                <Anchor point="TOPLEFT" relativeTo="TactikSODEditScrollFrame" relativePoint="TOPRIGHT">
                                                                                        <Offset>
                                                                                                <AbsDimension x="0" y="0"/>
                                                                                        </Offset>
                                                                                </Anchor>
                                                                                <Anchor point="BOTTOMRIGHT" relativeTo="TactikSODEditScrollFrame" relativePoint="BOTTOMRIGHT">
                                                                                        <Offset>
                                                                                                <AbsDimension x="23" y="0"/>
                                                                                        </Offset>
                                                                                </Anchor>
                                                                        </Anchors>
                                                                        <Gradient>
                                                                                <MinColor r="0.1" g="0.1" b="0.1"/>
                                                                                <MaxColor r="0" g="0" b="0"/>
                                                                        </Gradient>
                                                                </Texture>
                                                        </Layer>
                                                </Layers>
                                                <!-- Basically copy/pasted from MacroFrame -->
                                                <ScrollChild>
                                                        <EditBox name="TactikSODEditBox" multiLine="true" maxLines="9" letters="4096" nonspacewrap="true" spacing="1" autoFocus="false">
                                                                <Size>
                                                                        <AbsDimension x="100" y="100"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT"/>
                                                                        <Anchor point="BOTTOMRIGHT"/>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnTextChanged>
                                                                                TactikSOD.OnTextChanged()
                                                                        </OnTextChanged>
                                                                        <OnEscapePressed>
                                                                                this:ClearFocus();
                                                                        </OnEscapePressed>
                                                                </Scripts>
                                                                <FontString inherits="GameFontHighlight"/>
                                                        </EditBox>
                                                </ScrollChild>
                                        </ScrollFrame>
                                </Frames>
                                <Scripts>
                                        <OnLoad>
                                                this:SetBackdropColor(.1,.1,.1,1)
                                        </OnLoad>
                                </Scripts>
                        </Frame>

                        <!-- FocusGrabber is just an overlay to set focus since multiline EditBoxes vary in size COMMENTED OUT)
                        <Button name="TactikSODFocusGrabber">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="TactikSODEditFrame" relativePoint="TOPLEFT">
                                                <Offset>
                                                        <AbsDimension x="8" y="-8"/>
                                                </Offset>
                                        </Anchor>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="TactikSODEditFrame" relativePoint="BOTTOMRIGHT">
                                                <Offset>
                                                        <AbsDimension x="-8" y="8"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnClick>
                                                TactikSODEditBox:SetFocus()
                                        </OnClick>
                                </Scripts>
                        </Button>
-->
                        <!-- Grip in lower-right corner used to resize window -->
                        <Button name="TactikSODResizeGrip">
                                <Size>
                                        <AbsDimension x="16" y="16"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="BOTTOMRIGHT">
                                                <AbsDimension x="-1" y="-1"/>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left="0" right=".125" top=".25" bottom=".375"/>
                                </NormalTexture>
                                <PushedTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left="0" right=".125" top=".25" bottom=".375"/>
                                </PushedTexture>
                                <HighlightTexture file="Interface\AddOns\TactikSOD\Buttons" alphaMode="ADD">
                                        <TexCoords left="0" right=".125" top=".25" bottom=".375"/>
                                </HighlightTexture>
                                <Scripts>
                                        <OnMouseDown>
                                                TactikSODFrame:StartSizing()
                                        </OnMouseDown>
                                        <OnMouseUp>
                                                TactikSODFrame:StopMovingOrSizing()
                                                TactikSODEditBox:SetWidth(TactikSODFrame:GetWidth()-50)
                                        </OnMouseUp>
                                </Scripts>
                        </Button>

                        <!-- Titlebar buttons -->
                 <Button name="SODDDMenuButton" inherits="TactikSODButtonTemplate">
                                <Anchors>
                                        <Anchor point="TOPLEFT">
                                                <Offset>
                                                        <AbsDimension x="8" y="-6"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left="0" right=".125" top="0" bottom=".125"/>
                                </NormalTexture>
                                <PushedTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".125" right=".25" top="0" bottom=".125"/>
                                </PushedTexture>
                        </Button>
                        <Button name="TactikSODClose" inherits="TactikSODButtonTemplate">
                                <Anchors>
                                        <Anchor point="TOPRIGHT">
                                                <Offset>
                                                        <AbsDimension x="-8" y="-6"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".25" right=".375" top=".125" bottom=".25"/>
                                </NormalTexture>
                                <PushedTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".375" right=".5" top=".125" bottom=".25"/>
                                </PushedTexture>
                        </Button>
                        <Button name="TactikSODSearch" inherits="TactikSODButtonTemplate">
                                <Anchors>
                                        <Anchor point="TOPRIGHT" relativeTo="TactikSODClose" relativePoint="TOPLEFT">
                                                <Offset>
                                                        <AbsDimension x="-2" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".75" right=".875" top=".0" bottom=".125"/>
                                </NormalTexture>
                                <PushedTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".875" right="1" top=".0" bottom=".125"/>
                                </PushedTexture>
                        </Button>               

                        <Button name="TactikSODUndo" inherits="TactikSODButtonTemplate">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="SODDDMenuButton" relativePoint="TOPRIGHT">
                                                <Offset>
                                                        <AbsDimension x="2" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".5" right=".625" top=".375" bottom=".5"/>
                                </NormalTexture>
                                <PushedTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".625" right=".75" top=".375" bottom=".5"/>
                                </PushedTexture>
                                <DisabledTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".75" right=".875" top=".375" bottom=".5"/>
                                </DisabledTexture>
                        </Button>               

                        <Button name="TactikSODStart" inherits="TactikSODButtonTemplate">
                                <Size>
                                        <AbsDimension x="12" y="18"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="TactikSODUndo" relativePoint="TOPRIGHT">
                                                <Offset>
                                                        <AbsDimension x="4" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                        </Button>
                        <Button name="TactikSODLeft" inherits="TactikSODButtonTemplate">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="TactikSODStart" relativePoint="TOPRIGHT">
                                                <Offset>
                                                        <AbsDimension x="2" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left="0" right=".125" top=".375" bottom=".5"/>
                                </NormalTexture>
                                <PushedTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".125" right=".25" top=".375" bottom=".5"/>
                                </PushedTexture>
                        </Button>
                        <Button name="TactikSODRight" inherits="TactikSODButtonTemplate">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="TactikSODLeft" relativePoint="TOPRIGHT">
                                                <Offset>
                                                        <AbsDimension x="32" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".25" right=".375" top=".25" bottom=".375"/>
                                </NormalTexture>
                                <PushedTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".375" right=".5" top=".25" bottom=".375"/>
                                </PushedTexture>
                        </Button>               
                        <Button name="TactikSODEnd" inherits="TactikSODButtonTemplate">
                                <Size>
                                        <AbsDimension x="12" y="18"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="TactikSODRight" relativePoint="TOPRIGHT">
                                                <Offset>
                                                        <AbsDimension x="2" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                        </Button>


                        <!-- Page number -->
                        <Button>
                                <Layers>
                                        <Layer level="BACKGROUND">
                                                <FontString name="TactikSODPageNum" inherits="GameFontHighlight" text="1">
                                                        <Anchors>
                                                                <Anchor point="TOPLEFT" relativeTo="TactikSODLeft" relativePoint="TOPRIGHT"/>
                                                                <Anchor point="BOTTOMRIGHT" relativeTo="TactikSODRight" relativePoint="BOTTOMLEFT"/>
                                                        </Anchors>
                                                </FontString>
                                        </Layer>
                                </Layers>
                        </Button>

                </Frames>
                <Scripts>
                        <OnLoad>
                                TactikSOD.OnLoad()
                        </OnLoad>
                        <OnEvent>
                                TactikSOD.OnEvent()
                        </OnEvent>
                        <OnShow>
                                TactikSOD.OnShow()
                        </OnShow>
                        <OnHide>
                                TactikSOD.OnHide()
                        </OnHide>
                        <OnMouseDown>
                                TactikSOD.StartMoving()
                        </OnMouseDown>
                        <OnMouseUp>
                                TactikSOD.StopMoving()
                        </OnMouseUp>
                </Scripts>
        </Frame>

      <!-- Dropdown menu anchored to top of TactikSODFrame -->
        <Frame name="SODDDMenuFrame" parent="TactikSODFrame" inherits="UIDropDownMenuTemplate" id="1">
              <OnLoad>
                   UIDropDownMenu_Initialize(this, TactikSOD.SODChapterMenu_OnLoad, "MENU");
              </OnLoad>
        </Frame>

        <!-- Search panel anchored to top of TactikSODFrame -->
        <Frame name="TactikSODSearchFrame" parent="TactikSODFrame" toplevel="true" hidden="true">
                <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT">
                                <Offset>
                                        <AbsDimension x="0" y="32"/>
                                </Offset>
                        </Anchor>
                        <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT">
                                <Offset>
                                        <AbsDimension x="0" y="-4"/>
                                </Offset>
                        </Anchor>
                </Anchors>
                <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                        <BackgroundInsets>
                                <AbsInset left="4" right="4" top="4" bottom="4" />
                        </BackgroundInsets>
                        <TileSize>
                                <AbsValue val="16" />
                        </TileSize>
                        <EdgeSize>
                                <AbsValue val="16" />
                        </EdgeSize>
                </Backdrop>
                <Layers>
                        <Layer level="ARTWORK">
                                <FontString name="TactikSODSearchResults" font="GameFontHighlightSmall" justifyH="RIGHT" text="Search:">
                                        <Size>
                                                <AbsDimension x="55" y="24"/>
                                        </Size>
                                        <Anchors>
                                                <Anchor point="LEFT">
                                                        <Offset>
                                                                <AbsDimension x="4" y="0"/>
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                </FontString>
                        </Layer>
                </Layers>
                <Frames>
                        <Button name="TactikSODSearchNext" inherits="TactikSODButtonTemplate">
                                <Size>
                                        <AbsDimension x="18" y="18"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="RIGHT">
                                                <Offset>
                                                        <AbsDimension x="-46" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".5" right=".625" top=".0" bottom=".125"/>
                                </NormalTexture>
                                <PushedTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".625" right=".75" top=".0" bottom=".125"/>
                                </PushedTexture>
                        </Button>               
                        <Button name="TactikSODFont" inherits="TactikSODButtonTemplate">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="TactikSODSearchNext" relativePoint="TOPRIGHT">
                                                <Offset>
                                                        <AbsDimension x="2" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".5" right=".625" top=".25" bottom=".375"/>
                                </NormalTexture>
                                <PushedTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".625" right=".75" top=".25" bottom=".375"/>
                                </PushedTexture>
                        </Button>
                        <Button name="TactikSODLock" inherits="TactikSODButtonTemplate">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="TactikSODFont" relativePoint="TOPRIGHT">
                                                <Offset>
                                                        <AbsDimension x="2" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".5" right=".625" top=".125" bottom=".25"/>
                                </NormalTexture>
                                <PushedTexture file="Interface\AddOns\TactikSOD\Buttons">
                                        <TexCoords left=".625" right=".75" top=".125" bottom=".25"/>
                                </PushedTexture>
                        </Button>

                        <EditBox name="TactikSODSearchEditBox" historyLines="0" enableMouse="true" autoFocus="false" letters="256">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="TactikSODSearchResults" relativePoint="TOPRIGHT">
                                                <Offset>
                                                        <AbsDimension x="12" y="-2"/>
                                                </Offset>
                                        </Anchor>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="TactikSODSearchNext" relativePoint="BOTTOMLEFT">
                                                <Offset>
                                                        <AbsDimension x="-12" y="0"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Layers>
                                        <Layer level="BACKGROUND">
                                                <Texture name="$parentLeft" file="Interface\ClassTrainerFrame\UI-ClassTrainer-FilterBorder">
                                                        <Size>
                                                                <AbsDimension x="12" y="29"/>
                                                        </Size>
                                                        <Anchors>
                                                                <Anchor point="TOPLEFT">
                                                                        <Offset>
                                                                                <AbsDimension x="-9" y="2"/>
                                                                        </Offset>
                                                                </Anchor>
                                                        </Anchors>
                                                        <TexCoords left="0" right="0.09375" top="0" bottom="1.0"/>
                                                </Texture>
                                                <Texture name="$parentRight" file="Interface\ClassTrainerFrame\UI-ClassTrainer-FilterBorder">
                                                        <Size>
                                                                <AbsDimension x="12" y="29"/>
                                                        </Size>
                                                        <Anchors>
                                                                <Anchor point="TOPRIGHT">
                                                                        <Offset>
                                                                                <AbsDimension x="10" y="2"/>
                                                                        </Offset>
                                                                </Anchor>
                                                        </Anchors>
                                                        <TexCoords left="0.90625" right="1.0" top="0" bottom="1.0"/>
                                                </Texture>
                                                <Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-FilterBorder">
                                                        <Anchors>
                                                                <Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
                                                                <Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
                                                        </Anchors>
                                                        <TexCoords left="0.09375" right="0.90625" top="0" bottom="1.0"/>
                                                </Texture>
                                        </Layer>
                                </Layers>
                                <FontString inherits="GameFontHighlight" justifyH="LEFT"/>
                                <Scripts>
                                        <OnEnter>
                                                TactikSOD.Tooltip()
                                        </OnEnter>
                                        <OnLeave>
                                                GameTooltip:Hide()
                                        </OnLeave>
                                        <OnEscapePressed>
                                                this:ClearFocus()
                                                if string.len(TactikSODSearchEditBox:GetText() or "")==0 then
                                                        TactikSODSearchFrame:Hide()
                                                end
                                        </OnEscapePressed>
                                        <OnEnterPressed>
                                                TactikSOD.DoSearch()
                                        </OnEnterPressed>
                                        <OnTextChanged>
                                                TactikSOD.SearchEditBoxOnChange()
                                        </OnTextChanged>
                                </Scripts>
                        </EditBox>
                </Frames>
                <Scripts>
                        <OnLoad>
                                this:SetBackdropColor(.3,.3,.3,1)
                        </OnLoad>
                        <OnMouseDown>
                                TactikSOD.StartMoving()
                        </OnMouseDown>
                        <OnMouseUp>
                                TactikSOD.StopMoving()
                        </OnMouseUp>
                        <OnShow>
                                TactikSOD.SearchOnShow()
                        </OnShow>
                        <OnHide>
                                TactikSOD.SearchOnHide()
                        </OnHide>
                </Scripts>
        </Frame>
        <Frame name="SODDropDownMenu" inherits="UIDropDownMenuTemplate" id="1">
        <Scripts>
           <OnLoad>
               UIDropDownMenu_Initialize(this, SODDropDownMenu_OnLoad, "MENU");
           </OnLoad>
       </Scripts>
   </Frame>

</Ui>

Compare with Previous | Blame