diff CensusButton.xml @ 6:10c85be19b56

rebase on CensusPlus-40000-4.3.2.zip; added worgen added 81 - 85
author EmFor
date Fri, 10 Dec 2010 15:47:23 +0100
parents edfa01041183
children 663f782bd903
line wrap: on
line diff
--- a/CensusButton.xml	Tue Mar 30 15:39:26 2010 +0000
+++ b/CensusButton.xml	Fri Dec 10 15:47:23 2010 +0100
@@ -44,26 +44,16 @@
     <HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/>
     <Scripts>
         <OnLoad>
-                  this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
+            self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
         </OnLoad>
-     <OnClick>
-      if( not CensusButtonFrame.isMoving ) then
-       CensusPlusButton_OnClick(arg1, arg2);
-       PlaySound("igMainMenuOptionCheckBoxOn");
-      end
-     </OnClick>
-              <OnMouseUp>
+		<OnClick function="CensusPlus_Button_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>
+            <OnMouseDown function="CensusPlus_Button_OnMouseDown" />
      <OnEnter>
       GameTooltip_SetDefaultAnchor(GameTooltip, UIParent);
 <!--      CENSUS_BUTTON_TOOLTIP="test"; -->
@@ -77,15 +67,15 @@
   </Frames>
   <Scripts>
    <OnLoad>
-    this:RegisterEvent("VARIABLES_LOADED");
+    self:RegisterEvent("VARIABLES_LOADED");
    </OnLoad>
    <OnEvent>
     CensusButton_Init();
    </OnEvent>
             <OnHide>
-                if ( this.isMoving ) then
-                    this:StopMovingOrSizing();
-                    this.isMoving = false;
+                if ( self.isMoving ) then
+                    self:StopMovingOrSizing();
+                    self.isMoving = false;
                 end
             </OnHide>
   </Scripts>