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

        <!-- UI Templates, for creating menus -->
        <Script file="menu.lua"/>
        
        <!-- General Checkbutton -->
        <CheckButton name="BongosCheckButtonTemplate" virtual="true">
                <Size x="32" y="32"/>
                
                <ButtonText name="$parentText">
                        <Anchors>
                                <Anchor point="LEFT" relativePoint="RIGHT">
                                        <Offset x="-2" y="0"/>
                                </Anchor>
                        </Anchors>
                </ButtonText>
                
                <NormalFont font="GameFontNormalSmall"/>
                <DisabledFont font="GameFontDisableSmall"/>
                <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>
        
        <!-- Hide Button -->
        <CheckButton name="BongosHideButtonTemplate" inherits="BongosCheckButtonTemplate" text="Hide Bar" virtual="true">
                <Anchors>
                        <Anchor point="TOPLEFT">
                                <Offset x="8" y="-28"/>
                        </Anchor>
                </Anchors>
                <Scripts>
                        <OnClick>
                                BBar.Hide(this:GetParent().frame, 1);
                                this:GetParent():Hide();
                        </OnClick>
                </Scripts>
        </CheckButton>
        
        
        <!-- General Slider -->
        <Slider name="BongosSlider" inherits="OptionsSliderTemplate" virtual="true">
                <Size x="200" y="18"/>
                
                <Layers>
                        <Layer level="ARTWORK">
                                <FontString name="$parentValText" font="GameFontNormalSmall">
                                        <Anchors>
                                                <Anchor point="BOTTOM">
                                                        <Offset x="0" y="-6"/>
                                                </Anchor>
                                        </Anchors>
                                </FontString>
                        </Layer>
                </Layers>
        </Slider>
        
        <!-- Scaler -->
        <Slider name="BongosScaleSlider" inherits="BongosSlider" minValue="50" maxValue="150" valuestep="1" virtual="true">
                <Scripts>
                        <OnLoad>
                                getglobal(this:GetName() .. "Text"):SetText("Scale");
                                getglobal(this:GetName() .. "Low"):SetText("50%");
                                getglobal(this:GetName() .. "High"):SetText("150%");
                        </OnLoad>
                        <OnValueChanged>
                                if(not this:GetParent().onShow) then
                                        BBar.SetScale(this:GetParent().frame, this:GetValue() / 100, 1);
                                end
                                getglobal(this:GetName() .. "ValText"):SetText( this:GetValue() );
                        </OnValueChanged>
                </Scripts>
        </Slider>
        
        <!-- Scaler -->
        <Slider name="BongosOpacitySlider" inherits="BongosSlider" minValue="0" maxValue="100" valuestep="1" virtual="true">
                <Scripts>
                        <OnLoad>
                                getglobal(this:GetName() .. "Text"):SetText("Opacity");
                                getglobal(this:GetName() .. "Low"):SetText("0%");
                                getglobal(this:GetName() .. "High"):SetText("100%");
                        </OnLoad>
                        <OnValueChanged>
                                if(not this:GetParent().onShow) then
                                        BBar.SetAlpha(this:GetParent().frame, this:GetValue() / 100, 1);
                                end
                                getglobal(this:GetName() .. "ValText"):SetText( this:GetValue() );
                        </OnValueChanged>
                </Scripts>
        </Slider>
        
        <!-- Spacing -->
        <Slider name="BongosSpaceSlider" inherits="BongosSlider" minValue="0" maxValue="36" valuestep="2" virtual="true">
                <Scripts>
                        <OnLoad>
                                getglobal(this:GetName() .. "Text"):SetText("Spacing");
                                getglobal(this:GetName() .. "Low"):SetText("0");
                                getglobal(this:GetName() .. "High"):SetText("36");
                        </OnLoad>
                </Scripts>
        </Slider>
        
        <!-- Right Click Menu -->
        <Button name="BongosRightClickMenu" parent="UIParent" frameStrata="DIALOG" clampedToScreen="true" enableMouse="true" toplevel="true" hidden="true" virtual="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="4" right="4" top="4" bottom="4"/>
                        </BackgroundInsets>
                </Backdrop>

                <ButtonText name="$parentText">
                        <Anchors>
                                <Anchor point="TOP">
                                        <Offset x="0" y="-6"/>
                                </Anchor>
                        </Anchors>
                </ButtonText>
                <NormalFont font="GameFontHighlightLarge"/>
                
                <Frames>
                        <Button name="$parentClose" inherits="UIPanelCloseButton">
                                <Anchors>
                                        <Anchor point="TOPRIGHT"/>
                                </Anchors>
                        </Button>
                </Frames>

                <Scripts>
                        <OnLoad>
                                this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
                        </OnLoad>
                        <OnClick>
                                this:Hide();
                        </OnClick>
                </Scripts>
        </Button>
</Ui>

Generated by GNU Enscript 1.6.5.90.