vanilla-wow-addons – Rev 1

Subversion Repositories:
Rev:
<Ui>
        <Script file="TrapsBar.lua"/>
        <Frame name="TrapsBarConfig" toplevel="true" parent="UIParent" frameStrata="DIALOG" hidden="true" enableMouse="true" movable="true">
                <Size>
                        <AbsDimension x="200" y="200"/>
                </Size>
                <Anchors>
                        <Anchor point="CENTER"/>
                </Anchors>
                <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
                        <BackgroundInsets>
                                <AbsInset left="11" right="12" top="12" bottom="11"/>
                        </BackgroundInsets>
                        <TileSize>
                                <AbsValue val="32"/>
                        </TileSize>
                        <EdgeSize>
                                <AbsValue val="32"/>
                        </EdgeSize>
                </Backdrop>
                <Layers>
                        <Layer level="ARTWORK">
                                <Texture file="Interface\DialogFrame\UI-DialogBox-Header">
                                        <Size>
                                                <AbsDimension x="256" y="64"/>
                                        </Size>
                                        <Anchors>
                                                <Anchor point="TOP">
                                                        <Offset>
                                                                <AbsDimension x="0" y="12"/>
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                </Texture>
                        </Layer>
                        <Layer level="OVERLAY">
                                <FontString inherits="GameFontNormal" text="TrapsBar Config">
                                        <Anchors>
                                                <Anchor point="TOP" relativeTo="$parent"></Anchor>
                                        </Anchors>
                                </FontString>
                        </Layer>
                </Layers>
                <Frames>
                        <Button name="$parentButtonClose" inherits="OptionsButtonTemplate" text="Close">
                                <Anchors>
                                        <Anchor point="BOTTOMRIGHT">
                                                <Offset>
                                                        <AbsDimension x="-14" y="14"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnClick>
                                                TrapsBarConfig:Hide();
                                        </OnClick>
                                </Scripts>
                        </Button>
                        
                        <CheckButton name="$parentCheckButton2" inherits="OptionsCheckButtonTemplate">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="$parent">
                                        <Offset><AbsDimension x="20" y="-25"/></Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                getglobal(this:GetName().."Text"):SetText("Hide Bar");
                                        </OnLoad>
                                        <OnClick>
                                                TrapsBarConfigCheckBoxHide_OnClick();
                                        </OnClick>
                                </Scripts>
                        </CheckButton>
                        
                        <Slider name="$parentSliderScale" inherits="OptionsSliderTemplate">
                                <Size>
                                        <AbsDimension x="140" y="16"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="$parentCheckButton2">
                                                <Offset>
                                                        <AbsDimension x="0" y="-40"/>
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                getglobal(this:GetName().."Text"):SetText("TrapsBar Scale");
                                                getglobal(this:GetName().."High"):SetText("4");
                                                getglobal(this:GetName().."Low"):SetText("0.5");
                                                this:SetMinMaxValues(0.5,4);
                                                this:SetValueStep(0.1);
                                        </OnLoad>
                                        <OnValueChanged>
                                                TrapsBarConfigScale_OnClick();
                                        </OnValueChanged>
                                </Scripts>
                        </Slider>
                        
                        <CheckButton name="$parentCheckButton1" inherits="OptionsCheckButtonTemplate">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="$parent">
                                        <Offset><AbsDimension x="20" y="-90"/></Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                getglobal(this:GetName().."Text"):SetText("Horizontal");
                                        </OnLoad>
                                        <OnClick>
                                                TrapsBarConfigCheckBox_OnClick();
                                        </OnClick>
                                </Scripts>
                        </CheckButton>
                              
                        <CheckButton name="$parentCheckButton3" inherits="OptionsCheckButtonTemplate">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="$parent">
                                        <Offset><AbsDimension x="20" y="-120"/></Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                getglobal(this:GetName().."Text"):SetText("Switch Order");
                                        </OnLoad>
                                        <OnClick>
                                                TrapsBarConfigCheckBoxOrder_OnClick();
                                        </OnClick>
                                </Scripts>
                        </CheckButton>
                        
                </Frames>
                <Scripts>
                        <OnMouseUp>
                         if ( this.isMoving ) then
                          this:StopMovingOrSizing();
                          this.isMoving = false;
                         end
                        </OnMouseUp>
                        <OnMouseDown>
                         if (arg1 == "LeftButton") then
                          this:StartMoving();
                          this.isMoving = true;
                         end
                        </OnMouseDown>
                        <OnHide>
                         if ( this.isMoving ) then
                          this:StopMovingOrSizing();
                          this.isMoving = false;
                         end
                        </OnHide>
                        <OnShow>
                                TrapsBarConfig_OnShow();
                        </OnShow>
                </Scripts>
        </Frame>
</Ui>