view CensusButton.xml @ 13:77d2c7423ed5

libs in .pkgmeta , whitespaces unified and guild changeable with /script CensusPlus_MYGUILD="Any Guild";
author EmFor
date Sun, 14 Aug 2011 15:45:33 +0200
parents 663f782bd903
children
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>
            self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
        </OnLoad>
		<OnClick function="CensusPlus_Button_OnClick" />
         <OnMouseUp>
                  if ( CensusButtonFrame.isMoving ) then
                      CensusButtonFrame:StopMovingOrSizing();
                      CensusButtonFrame.isMoving = false;
                  end
              </OnMouseUp>
            <OnMouseDown function="CensusPlus_Button_OnMouseDown" />
     <OnEnter>
      GameTooltip_SetDefaultAnchor(GameTooltip, UIParent);
      GameTooltip:SetText(CENSUS_BUTTON_TOOLTIP);
     </OnEnter>
     <OnLeave>
      GameTooltip:Hide();
     </OnLeave>
    </Scripts>
   </Button>
  </Frames>
  <Scripts>
   <OnLoad>
    self:RegisterEvent("VARIABLES_LOADED");
   </OnLoad>
   <OnEvent>
    CensusButton_Init();
   </OnEvent>
            <OnHide>
                if ( self.isMoving ) then
                    self:StopMovingOrSizing();
                    self.isMoving = false;
                end
            </OnHide>
  </Scripts>
 </Frame>
</Ui>