View Single Post
05-26-09, 02:35 AM   #1
Samsan
An Aku'mai Servant
 
Samsan's Avatar
Join Date: May 2009
Posts: 33
Question Check Button and Slider Hassles!

Hi all, I have a problem with a couple of check buttons and slilders.

1. Show or hide minimap button.....
You have to click the check box twice to get the map button to show or hide. Don't understand why it's doing it. :/

The code:

Code:
            <OnClick>
                if DWMPackMinimapButton.ShowMinimapButtonCheckButton then
                    DWMPackMinimapButton.ShowMinimapButtonCheckButton = false
                    DWMPackMinimapButton:Hide()
                else
                    DWMPackMinimapButton.ShowMinimapButtonCheckButton = true
                    DWMPackMinimapButton:Show()
                end
                self:SetChecked(DWMPackMinimapButton.ShowMinimapButtonCheckButton)
            </OnClick>
2. Lock/Unlock the frame.... I can lock or unlock the frame ok buut it clings to the cursor and you have to click it twice as per above to unlock it.

The code:
Code:
            <OnClick>
                if DWMPackBaseFrame.FrameLockCheckButton then
                    DWMPackBaseFrame.FrameLockCheckButton = false
                    DWMPackBaseFrame:StartMoving();
                else
                    DWMPackBaseFrame.FrameLockCheckButton = true
                    DWMPackBaseFrame:StopMovingOrSizing();
                end
                self:SetChecked(DWMPackBaseFrame.FrameLockCheckButton)
            </OnClick>
3. Sliders... Scale slider

The scale slider only has 2 settings so it seems, 100% and 50% even though it has a step value of 1. When you go to adjust it, it jumps to 50% and won't move via increments like it should.

The code:
Code:
      <Frame name="FrameScaleSlider">
        <Size>
          <AbsDimension x="232" y="50" />
        </Size>
        <Anchors>
          <Anchor point="TOPLEFT">
            <Offset>
              <AbsDimension x="3" y="-214" />
            </Offset>
          </Anchor>
        </Anchors>
        <Frames>
          <Slider name="FSSlider" enableMouse="true" minValue="50" maxValue="100" defaultValue="100" valueStep="1" orientation="HORIZONTAL">
            <Size>
              <AbsDimension x="128" y="17" />
            </Size>
            <Anchors>
              <Anchor point="LEFT" />
              <Anchor point="RIGHT" />
            </Anchors>
            <Scripts>
                <OnValueChanged>
                    DWMPackBaseFrame:SetScale(value / 100);
                </OnValueChanged>
            </Scripts>
            <Backdrop bgFile="Interface\Buttons\UI-SliderBar-Background" edgeFile="Interface\Buttons\UI-SliderBar-Border" tile="true">
              <BackgroundInsets>
                <AbsInset left="3" right="3" top="6" bottom="6" />
              </BackgroundInsets>
              <TileSize>
                <AbsValue val="8" />
              </TileSize>
              <EdgeSize>
                <AbsValue val="8" />
              </EdgeSize>
            </Backdrop>
            <Layers>
              <Layer>
                <FontString name="$parentTitle" font="Fonts\FRIZQT__.TTF" text="Sets Frame Size">
                  <Anchors>
                    <Anchor point="BOTTOM" relativePoint="TOP" />
                  </Anchors>
                  <FontHeight>
                    <AbsValue val="10" />
                  </FontHeight>
                  <Color r="1" g="0.8196079" b="0" />
                  <Shadow>
                    <Color r="0" g="0" b="0" />
                    <Offset>
                      <AbsDimension x="1" y="-1" />
                    </Offset>
                  </Shadow>
                </FontString>
                <FontString name="$parentLow" font="Fonts\FRIZQT__.TTF" text="50%">
                  <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" />
                  </Anchors>
                  <FontHeight>
                    <AbsValue val="10" />
                  </FontHeight>
                  <Color r="1" g="1" b="1" />
                  <Shadow>
                    <Color r="0" g="0" b="0" />
                    <Offset>
                      <AbsDimension x="1" y="-1" />
                    </Offset>
                  </Shadow>
                </FontString>
                <FontString name="$parentHigh" font="Fonts\FRIZQT__.TTF" text="100%">
                  <Anchors>
                    <Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT" />
                  </Anchors>
                  <FontHeight>
                    <AbsValue val="10" />
                  </FontHeight>
                  <Color r="1" g="1" b="1" />
                  <Shadow>
                    <Color r="0" g="0" b="0" />
                    <Offset>
                      <AbsDimension x="1" y="-1" />
                    </Offset>
                  </Shadow>
                </FontString>
              </Layer>
            </Layers>
            <ThumbTexture name="$parentThumb" file="Interface\Buttons\UI-SliderBar-Button-Horizontal">
              <Size>
                <AbsDimension x="32" y="32" />
              </Size>
            </ThumbTexture>
          </Slider>
I don't have the code for the Minimap Position slider and Minimap Radius sliders because the scripts wouldn't work and no matter what I tried I got lost and failed. Any suggestions to get these sliders working would be appreciated.

Thanks in advance.
__________________
To give is to receive so the more that you give the more that you receive.

Last edited by Samsan : 05-26-09 at 04:18 AM.
  Reply With Quote