<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
    <Frame name="BearForceOne_OptionsFrame">
        <Scripts>
            <OnLoad>
                self.name = "BearForceOne"
                InterfaceOptions_AddCategory(self);
            </OnLoad>
        </Scripts>
        <Layers>
            <Layer level="BACKGROUND">
                <FontString inherits="GameFont_Gigantic" text="Bear Force One">
                    <Color a="1" r="1" g="1" b="1" />
                    <Anchors><Anchor point="TOP"><Offset x="0" y="-30"/></Anchor></Anchors>
                </FontString>
            </Layer>
        </Layers>
        <Frames>
            <CheckButton name="BearForceOne_EmoteToggle" inherits="UICheckButtonTemplate">
                <Anchors><Anchor point="TOPLEFT"><Offset x="50" y="-100"/></Anchor></Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <FontString text="Enable emote synchronization" inherits="GameTooltipHeader">
                            <Color r="1" g="1" b="1" a="1"/>
                            <Anchors>
                                <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent">
                                </Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
                <Scripts>
                    <OnLoad> self:RegisterEvent("VARIABLES_LOADED") </OnLoad>
                    <OnClick> bfoConfig.EMOTES_ENABLED = self:GetChecked() </OnClick>
                    <OnEvent>
                        if (event == "VARIABLES_LOADED") then
                            if bfoConfig then self:SetChecked(bfoConfig.EMOTES_ENABLED) end
                        end
                    </OnEvent>
                </Scripts>
            </CheckButton>
            <CheckButton name="BearForceOne_MusicToggle" inherits="UICheckButtonTemplate">
                <Anchors><Anchor relativeTo="BearForceOne_EmoteToggle"><Offset x="0" y="-30"/></Anchor></Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <FontString text="Enable music in alliance zones" inherits="GameTooltipHeader">
                            <Color r="1" g="1" b="1" a="1"/>
                            <Anchors>
                                <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent">
                                </Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
                <Scripts>
                    <OnLoad> self:RegisterEvent("VARIABLES_LOADED") </OnLoad>
                    <OnClick> bfoConfig.MUSIC_ENABLED = self:GetChecked() </OnClick>
                    <OnEvent>
                        if (event == "VARIABLES_LOADED") then
                            if bfoConfig then self:SetChecked(bfoConfig.MUSIC_ENABLED) end
                        end
                    </OnEvent>
                </Scripts>
            </CheckButton>
            <CheckButton name="BearForceOne_SoundToggle" inherits="UICheckButtonTemplate">
                <Anchors><Anchor relativeTo="BearForceOne_MusicToggle"><Offset x="0" y="-30"/></Anchor></Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <FontString text="Enable sound effects" inherits="GameTooltipHeader">
                            <Color r="1" g="1" b="1" a="1"/>
                            <Anchors>
                                <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent">
                                </Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
                <Scripts>
                    <OnLoad> self:RegisterEvent("VARIABLES_LOADED") </OnLoad>
                    <OnClick> bfoConfig.SOUND_ENABLED = self:GetChecked() </OnClick>
                    <OnEvent>
                        if (event == "VARIABLES_LOADED") then
                            if bfoConfig then self:SetChecked(bfoConfig.SOUND_ENABLED) end
                        end
                    </OnEvent>
                </Scripts>
            </CheckButton>
            <CheckButton name="BearForceOne_AnimToggle" inherits="UICheckButtonTemplate">
                <Anchors><Anchor relativeTo="BearForceOne_SoundToggle"><Offset x="0" y="-30"/></Anchor></Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <FontString text="Enable achievement / level up animation" inherits="GameTooltipHeader">
                            <Color r="1" g="1" b="1" a="1"/>
                            <Anchors>
                                <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent">
                                </Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
                <Scripts>
                    <OnLoad> self:RegisterEvent("VARIABLES_LOADED") </OnLoad>
                    <OnClick> bfoConfig.ANIM_ENABLED = self:GetChecked() </OnClick>
                    <OnEvent>
                        if (event == "VARIABLES_LOADED") then
                            if bfoConfig then self:SetChecked(bfoConfig.ANIM_ENABLED) end
                        end
                    </OnEvent>
                </Scripts>
            </CheckButton>
            <Slider name="BearForceOne_MGSSlider" inherits="OptionsSliderTemplate">
                <Anchors><Anchor relativeTo="BearForceOne_AnimToggle"><Offset x="0" y="-30"/></Anchor></Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <FontString text="METAL GAY SOLID AMOUNT" outline="THICK" inherits="GameTooltipHeader">
                            <Color r="1" g="1" b="1" a="1"/>
                            <Anchors>
                                <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent">
                                </Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
                <Scripts>
                    <OnLoad>
                        self:RegisterEvent("VARIABLES_LOADED")
                        getglobal(self:GetName().."Low"):SetText("0")
                        getglobal(self:GetName().."High"):SetText("100")
                        self:SetMinMaxValues(0,100);
                        self:SetValueStep(20);
                    </OnLoad>
                    <OnEvent>
                        if (event == "VARIABLES_LOADED") then
                            if not bfoConfig.MGS_PERCENT then bfoConfig.MGS_PERCENT = 0 end
                            if bfoConfig then self:SetValue(bfoConfig.MGS_PERCENT) end
                        end
                    </OnEvent>
                    <OnValueChanged>
                        bfoConfig.MGS_PERCENT = value
                    </OnValueChanged>
                </Scripts>
            </Slider>
        </Frames>
    </Frame>
</Ui>