view CensusButton.xml @ 4:bee94c0af50d TLJ Spezial 1.0

included .pkgmeta
author EmFor <EmFor.hg@mroe.de>
date Tue, 30 Mar 2010 17:13:32 +0200
parents edfa01041183
children 10c85be19b56
line wrap: on
line source
<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/ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
 <Script file="CensusButton.lua"/>
    <Frame name="CensusButtonFrame" parent="UIParent" hidden="true" enableMouse="true" toplevel="true" movable="true">
  <Size>
   <AbsDimension x="32" y="32"/>
  </Size>
  <Anchors>
   <Anchor point="TOPLEFT" relativeTo="Minimap" relativePoint="RIGHT">
    <Offset>
     <AbsDimension x="-10" y="0"/>
                </Offset>
            </Anchor>
  </Anchors>
  <Frames>
   <Button name="CensusButton">
    <Size>
     <AbsDimension x="32" y="32"/>
    </Size>
    <Anchors>
     <Anchor point="TOPLEFT">
      <Offset>
       <AbsDimension x="0" y="0"/>
      </Offset>
     </Anchor>
    </Anchors>
    <Frames>
     <Frame name="CP_ButtonDropDown" inherits="UIDropDownMenuTemplate" id="1" hidden="true">
      <Anchors>
       <Anchor point="TOPLEFT">
        <Offset>
         <AbsDimension x="-15" y="20"/>
        </Offset>
       </Anchor>
      </Anchors>
      <Scripts>
          <OnLoad>
           UIDropDownMenu_Initialize(CP_ButtonDropDown, CensusPlus_ButtonDropDown_Initialize, "MENU" );
          </OnLoad>
      </Scripts>
     </Frame>
    </Frames>
    <NormalTexture file="Interface\AddOns\CensusPlus\Skin\CensusButton-Up"/>
    <PushedTexture file="Interface\AddOns\CensusPlus\Skin\CensusButton-Down"/>
    <HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/>
    <Scripts>
        <OnLoad>
                  this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
        </OnLoad>
     <OnClick>
      if( not CensusButtonFrame.isMoving ) then
       CensusPlusButton_OnClick(arg1, arg2);
       PlaySound("igMainMenuOptionCheckBoxOn");
      end
     </OnClick>
              <OnMouseUp>
                  if ( CensusButtonFrame.isMoving ) then
                      CensusButtonFrame:StopMovingOrSizing();
                      CensusButtonFrame.isMoving = false;
                  end
              </OnMouseUp>
              <OnMouseDown>
                  if ( ( ( not CensusButtonFrame.isLocked ) or ( CensusButtonFrame.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
                      CensusButtonFrame:StartMoving();
                      CensusButtonFrame.isMoving = true;
                  end
              </OnMouseDown>
     <OnEnter>
      GameTooltip_SetDefaultAnchor(GameTooltip, UIParent);
<!--      CENSUS_BUTTON_TOOLTIP="test"; -->
      GameTooltip:SetText(CENSUS_BUTTON_TOOLTIP);
     </OnEnter>
     <OnLeave>
      GameTooltip:Hide();
     </OnLeave>
    </Scripts>
   </Button>
  </Frames>
  <Scripts>
   <OnLoad>
    this:RegisterEvent("VARIABLES_LOADED");
   </OnLoad>
   <OnEvent>
    CensusButton_Init();
   </OnEvent>
            <OnHide>
                if ( this.isMoving ) then
                    this:StopMovingOrSizing();
                    this.isMoving = false;
                end
            </OnHide>
  </Scripts>
 </Frame>
</Ui>