diff CensusPlus.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
line wrap: on
line diff
--- a/CensusPlus.xml	Tue Mar 30 15:39:26 2010 +0000
+++ b/CensusPlus.xml	Fri Dec 10 15:47:23 2010 +0100
@@ -29,22 +29,14 @@
  </Button>
  <Button name="CensusPlusRaceLegendTemplate" virtual="true" inherits="CensusPlusLegendTemplate">
   <Scripts>
-   <OnEnter>
-    CensusPlus_OnEnterRace();
-   </OnEnter>
-   <OnClick>
-    CensusPlus_OnClickRace();
-   </OnClick>
+            <OnEnter function="CensusPlus_OnEnterRace" />
+            <OnClick function="CensusPlus_OnClickRace" />
   </Scripts>
  </Button>
  <Button name="CensusPlusClassLegendTemplate" virtual="true" inherits="CensusPlusLegendTemplate">
   <Scripts>
-   <OnEnter>
-    CensusPlus_OnEnterClass();
-   </OnEnter>
-   <OnClick>
-    CensusPlus_OnClickClass();
-   </OnClick>
+            <OnEnter function="CensusPlus_OnEnterClass" />
+            <OnClick function="CensusPlus_OnClickClass" />
   </Scripts>
  </Button>
  <Button name="CensusPlusBarTemplate" virtual="true">
@@ -60,49 +52,35 @@
  </Button>
  <Button name="CensusPlusRaceBarTemplate" virtual="true" inherits="CensusPlusBarTemplate">
   <Scripts>
-   <OnEnter>
-    CensusPlus_OnEnterRace();
-   </OnEnter>
+            <OnEnter function="CensusPlus_OnEnterRace" />
   </Scripts>
  </Button>
  <Button name="CensusPlusClassBarTemplate" virtual="true" inherits="CensusPlusBarTemplate">
   <Scripts>
-   <OnEnter>
-    CensusPlus_OnEnterClass();
-   </OnEnter>
+            <OnEnter function="CensusPlus_OnEnterClass" />
   </Scripts>
  </Button>
  <Button name="CensusPlusLevelBarTemplate" virtual="true">
   <Size>
-   <AbsDimension x="7" y="128" />
+   <AbsDimension x="6" y="128" />
   </Size>
   <NormalTexture file="Interface\AddOns\CensusPlus\Skin\CensusPlus_LevelBar" />
   <Scripts>
-   <OnClick>
-    CensusPlus_OnClickLevel(arg1);
-   </OnClick>
-   <OnLoad>
-    CensusPlus_OnLoadLevel();
-   </OnLoad>    
+    		<OnClick function="CensusPlus_OnClickLevel" />
+    		<OnLoad function="CensusPlus_OnLoadLevel"/>    
    <OnLeave>
      GameTooltip:Hide();
    </OnLeave>
-   <OnEnter>
-    CensusPlus_OnEnterLevel();
-   </OnEnter>
+            <OnEnter function="CensusPlus_OnEnterLevel" />
   </Scripts>
  </Button>
  <Button name="CensusPlusLevelBarEmptyTemplate" virtual="true">
   <Size>
-   <AbsDimension x="7" y="128" />
+   <AbsDimension x="6" y="128" />
   </Size>
   <Scripts>
-   <OnClick>
-    CensusPlus_OnClickLevel(arg1);
-   </OnClick>
-   <OnLoad>
-    CensusPlus_OnLoadLevel();
-   </OnLoad>
+    		<OnClick function="CensusPlus_OnClickLevel" />
+    		<OnLoad function="CensusPlus_OnLoadLevel"/>    
   </Scripts>
  </Button>
  <Button name="CensusPlusGuildButtonTemplate" virtual="true">
@@ -138,9 +116,7 @@
    </Anchors>
   </HighlightTexture>
   <Scripts>
-   <OnClick>
-    CensusPlus_GuildButton_OnClick();
-   </OnClick>
+            <OnClick function="CensusPlus_GuildButton_OnClick" />
   </Scripts>
  </Button>
  <Frame name="MiniCensusPlus" parent="UIParent" hidden="true" enableMouse="true" movable="true"
@@ -168,11 +144,9 @@
      </Anchor>
     </Anchors>
     <Scripts>
-     <OnClick>
-      CensusPlus_OnClickMaximize();
-     </OnClick>
+     <OnClick function="CensusPlus_OnClickMaximize" />
      <OnEnter>
-      GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+      GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
       GameTooltip:SetText(CENSUSPlus_MAXIMIZE, 1.0, 1.0, 1.0);
       GameTooltip:Show();
      </OnEnter>
@@ -193,21 +167,16 @@
   </Frames>
   <Scripts>
    <OnMouseUp>
-    if ( this.isMoving ) then
-     this:StopMovingOrSizing();
-     this.isMoving = false;
+    if ( self.isMoving ) then
+     self:StopMovingOrSizing();
+     self.isMoving = false;
     end
    </OnMouseUp>
-   <OnMouseDown>
-    if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
-     this:StartMoving();
-     this.isMoving = true;
-    end
-   </OnMouseDown>
+   <OnMouseDown function="CensusPlus_Mini_OnMouseDown" />
    <OnHide>
-    if ( this.isMoving ) then
-     this:StopMovingOrSizing();
-     this.isMoving = false;
+    if ( self.isMoving ) then
+     self:StopMovingOrSizing();
+     self.isMoving = false;
     end
    </OnHide>
   </Scripts>
@@ -229,7 +198,7 @@
    <Layer level="BACKGROUND">
     <Texture file="Interface\AddOns\CensusPlus\Skin\CensusPlus_Window_Left">
      <Size>
-      <AbsDimension x="592" y="512" />
+      <AbsDimension x="700" y="512" />
      </Size>
      <Anchors>
       <Anchor point="TOPLEFT">
@@ -381,7 +350,7 @@
     <Scripts>
      <OnClick>
       PlaySound("igMainMenuOptionCheckBoxOn");
-      CensusPlus_ToggleOptions();
+      CensusPlus_ToggleOptions(arg1);
      </OnClick>
     </Scripts>
    </Button>
@@ -406,11 +375,9 @@
      </Anchor>
     </Anchors>
     <Scripts>
-     <OnClick>
-      CensusPlus_OnClickMinimize();
-     </OnClick>
+                    <OnClick function="CensusPlus_OnClickMinimize" />
      <OnEnter>
-      GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+      GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
       GameTooltip:SetText(CENSUSPlus_MINIMIZE, 1.0, 1.0, 1.0);
       GameTooltip:Show();
      </OnEnter>
@@ -431,12 +398,8 @@
      </Anchor>
     </Anchors>
     <Scripts>
-     <OnClick>
-      CensusPlus_Take_OnClick();
-     </OnClick>
-     <OnEnter>
-      CensusPlus_Take_OnEnter();
-     </OnEnter>
+     <OnClick function="CensusPlus_Take_OnClick" />
+     <OnEnter function="CensusPlus_Take_OnEnter" />
      <OnLeave>
       GameTooltip:Hide();
      </OnLeave>
@@ -458,7 +421,7 @@
       CensusPlus_StopCensus( );
      </OnClick>
      <OnEnter>
-      GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+      GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
       GameTooltip:SetText(CENSUSPlus_STOPCENSUS, 1.0, 1.0, 1.0);
       GameTooltip:Show();					
      </OnEnter>
@@ -483,7 +446,7 @@
       CensusPlus_PruneData(30);
      </OnClick>
      <OnEnter>
-      GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+      GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
       GameTooltip:SetText(CENSUSPlus_PRUNECENSUS, 1.0, 1.0, 1.0);
       GameTooltip:Show();					
      </OnEnter>
@@ -508,7 +471,7 @@
       CensusPlus_Purge();
      </OnClick>
      <OnEnter>
-      GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+      GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
       GameTooltip:SetText(CENSUSPlus_PURGEDATABASE, 1.0, 1.0, 1.0);
       GameTooltip:Show();					
      </OnEnter>
@@ -529,12 +492,8 @@
      </Anchor>
     </Anchors>
     <Scripts>
-     <OnClick>
-      CensusPlus_TakeGuild_OnClick();
-     </OnClick>
-     <OnEnter>
-      CensusPlus_TakeGuild_OnEnter();
-     </OnEnter>
+     <OnClick function="CensusPlus_TakeGuild_OnClick" />
+     <OnEnter function="CensusPlus_TakeGuild_OnEnter" />
      <OnLeave>
       GameTooltip:Hide();
      </OnLeave>
@@ -759,11 +718,29 @@
      </Anchor>
     </Anchors>
    </Button>
-   <Button name="CensusPlusClassLegend1" inherits="CensusPlusClassLegendTemplate" id="1">
+   <Button name="CensusPlusRaceLegend6" inherits="CensusPlusRaceLegendTemplate" id="6">
     <Anchors>
      <Anchor point="LEFT" relativeTo="CensusPlusRaceLegend5" relativePoint="RIGHT">
       <Offset>
-       <AbsDimension x="49" y="0" />
+       <AbsDimension x="8" y="0" />
+      </Offset>
+     </Anchor>
+    </Anchors>
+   </Button>
+   <Button name="CensusPlusRaceBar6" inherits="CensusPlusRaceBarTemplate" id="6">
+    <Anchors>
+     <Anchor point="BOTTOM" relativeTo="CensusPlusRaceLegend6" relativePoint="TOP">
+      <Offset>
+       <AbsDimension x="0" y="8" />
+      </Offset>
+     </Anchor>
+    </Anchors>
+   </Button>
+   <Button name="CensusPlusClassLegend1" inherits="CensusPlusClassLegendTemplate" id="1">
+    <Anchors>
+     <Anchor point="LEFT" relativeTo="CensusPlusRaceLegend6" relativePoint="RIGHT">
+      <Offset>
+       <AbsDimension x="59" y="0" />
       </Offset>
      </Anchor>
     </Anchors>
@@ -781,7 +758,7 @@
     <Anchors>
      <Anchor point="LEFT" relativeTo="CensusPlusClassLegend1" relativePoint="RIGHT">
       <Offset>
-       <AbsDimension x="8" y="0" />
+       <AbsDimension x="7" y="0" />
       </Offset>
      </Anchor>
     </Anchors>
@@ -799,7 +776,7 @@
     <Anchors>
      <Anchor point="LEFT" relativeTo="CensusPlusClassLegend2" relativePoint="RIGHT">
       <Offset>
-       <AbsDimension x="8" y="0" />
+       <AbsDimension x="7" y="0" />
       </Offset>
      </Anchor>
     </Anchors>
@@ -817,7 +794,7 @@
     <Anchors>
      <Anchor point="LEFT" relativeTo="CensusPlusClassLegend3" relativePoint="RIGHT">
       <Offset>
-       <AbsDimension x="8" y="0" />
+       <AbsDimension x="7" y="0" />
       </Offset>
      </Anchor>
     </Anchors>
@@ -835,7 +812,7 @@
     <Anchors>
      <Anchor point="LEFT" relativeTo="CensusPlusClassLegend4" relativePoint="RIGHT">
       <Offset>
-       <AbsDimension x="8" y="0" />
+       <AbsDimension x="7" y="0" />
       </Offset>
      </Anchor>
     </Anchors>
@@ -853,7 +830,7 @@
     <Anchors>
      <Anchor point="LEFT" relativeTo="CensusPlusClassLegend5" relativePoint="RIGHT">
       <Offset>
-       <AbsDimension x="8" y="0" />
+       <AbsDimension x="7" y="0" />
       </Offset>
      </Anchor>
     </Anchors>
@@ -871,7 +848,7 @@
     <Anchors>
      <Anchor point="LEFT" relativeTo="CensusPlusClassLegend6" relativePoint="RIGHT">
       <Offset>
-       <AbsDimension x="8" y="0" />
+       <AbsDimension x="7" y="0" />
       </Offset>
      </Anchor>
     </Anchors>
@@ -889,7 +866,7 @@
     <Anchors>
      <Anchor point="LEFT" relativeTo="CensusPlusClassLegend7" relativePoint="RIGHT">
       <Offset>
-       <AbsDimension x="8" y="0" />
+       <AbsDimension x="7" y="0" />
       </Offset>
      </Anchor>
     </Anchors>
@@ -907,7 +884,7 @@
     <Anchors>
      <Anchor point="LEFT" relativeTo="CensusPlusClassLegend8" relativePoint="RIGHT">
       <Offset>
-       <AbsDimension x="8" y="0" />
+       <AbsDimension x="7" y="0" />
       </Offset>
      </Anchor>
     </Anchors>
@@ -925,7 +902,7 @@
     <Anchors>
      <Anchor point="LEFT" relativeTo="CensusPlusClassLegend9" relativePoint="RIGHT">
       <Offset>
-       <AbsDimension x="8" y="0" />
+       <AbsDimension x="7" y="0" />
       </Offset>
      </Anchor>
     </Anchors>
@@ -943,7 +920,7 @@
     <Anchors>
      <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
       <Offset>
-       <AbsDimension x="32" y="-450" />
+       <AbsDimension x="36" y="-454" />
       </Offset>
      </Anchor>
     </Anchors>
@@ -1659,11 +1636,56 @@
      </Anchor>
     </Anchors>
    </Button>
+   <Button name="CensusPlusLevelBar81" inherits="CensusPlusLevelBarTemplate" id="81">
+    <Anchors>
+     <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar80" relativePoint="BOTTOMRIGHT">
+      <Offset>
+       <AbsDimension x="4" y="0" />
+      </Offset>
+     </Anchor>
+    </Anchors>
+   </Button>
+   <Button name="CensusPlusLevelBar82" inherits="CensusPlusLevelBarTemplate" id="82">
+    <Anchors>
+     <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar81" relativePoint="BOTTOMRIGHT">
+      <Offset>
+       <AbsDimension x="4" y="0" />
+      </Offset>
+     </Anchor>
+    </Anchors>
+   </Button>
+   <Button name="CensusPlusLevelBar83" inherits="CensusPlusLevelBarTemplate" id="83">
+    <Anchors>
+     <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar82" relativePoint="BOTTOMRIGHT">
+      <Offset>
+       <AbsDimension x="4" y="0" />
+      </Offset>
+     </Anchor>
+    </Anchors>
+   </Button>
+   <Button name="CensusPlusLevelBar84" inherits="CensusPlusLevelBarTemplate" id="84">
+    <Anchors>
+     <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar83" relativePoint="BOTTOMRIGHT">
+      <Offset>
+       <AbsDimension x="4" y="0" />
+      </Offset>
+     </Anchor>
+    </Anchors>
+   </Button>
+   <Button name="CensusPlusLevelBar85" inherits="CensusPlusLevelBarTemplate" id="85">
+    <Anchors>
+     <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar84" relativePoint="BOTTOMRIGHT">
+      <Offset>
+       <AbsDimension x="4" y="0" />
+      </Offset>
+     </Anchor>
+    </Anchors>
+   </Button>
    <Button name="CensusPlusLevelBarEmpty1" inherits="CensusPlusLevelBarEmptyTemplate" id="1">
     <Anchors>
      <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
       <Offset>
-       <AbsDimension x="32" y="-450" />
+       <AbsDimension x="36" y="-454" />
       </Offset>
      </Anchor>
     </Anchors>
@@ -2379,36 +2401,70 @@
      </Anchor>
     </Anchors>
    </Button>
+   <Button name="CensusPlusLevelBarEmpty81" inherits="CensusPlusLevelBarEmptyTemplate" id="81">
+    <Anchors>
+     <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty80" relativePoint="BOTTOMRIGHT">
+      <Offset>
+       <AbsDimension x="4" y="0" />
+      </Offset>
+     </Anchor>
+    </Anchors>
+   </Button>
+   <Button name="CensusPlusLevelBarEmpty82" inherits="CensusPlusLevelBarEmptyTemplate" id="82">
+    <Anchors>
+     <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty81" relativePoint="BOTTOMRIGHT">
+      <Offset>
+       <AbsDimension x="4" y="0" />
+      </Offset>
+     </Anchor>
+    </Anchors>
+   </Button>
+   <Button name="CensusPlusLevelBarEmpty83" inherits="CensusPlusLevelBarEmptyTemplate" id="83">
+    <Anchors>
+     <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty82" relativePoint="BOTTOMRIGHT">
+      <Offset>
+       <AbsDimension x="4" y="0" />
+      </Offset>
+     </Anchor>
+    </Anchors>
+   </Button>
+   <Button name="CensusPlusLevelBarEmpty84" inherits="CensusPlusLevelBarEmptyTemplate" id="84">
+    <Anchors>
+     <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty83" relativePoint="BOTTOMRIGHT">
+      <Offset>
+       <AbsDimension x="4" y="0" />
+      </Offset>
+     </Anchor>
+    </Anchors>
+   </Button>
+   <Button name="CensusPlusLevelBarEmpty85" inherits="CensusPlusLevelBarEmptyTemplate" id="85">
+    <Anchors>
+     <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty84" relativePoint="BOTTOMRIGHT">
+      <Offset>
+       <AbsDimension x="4" y="0" />
+      </Offset>
+     </Anchor>
+    </Anchors>
+   </Button>
   </Frames>
   <Scripts>
-   <OnLoad>
-    CensusPlus_OnLoad();
-   </OnLoad>        
-   <OnShow>
-    CensusPlus_OnShow();
-   </OnShow>
-   <OnUpdate>
-    CensusPlus_OnUpdate();
-   </OnUpdate>
+   <OnLoad function="CensusPlus_OnLoad"/>    
+   <OnShow function="CensusPlus_OnShow" />
+   <OnUpdate function="CensusPlus_OnUpdate" />
    <OnEvent>
     CensusPlus_OnEvent(event,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    </OnEvent>			
    <OnMouseUp>
-    if ( this.isMoving ) then
-     this:StopMovingOrSizing();
-     this.isMoving = false;
+    if ( self.isMoving ) then
+     self:StopMovingOrSizing();
+     self.isMoving = false;
     end
    </OnMouseUp>
-   <OnMouseDown>
-    if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
-     this:StartMoving();
-     this.isMoving = true;
-    end
-   </OnMouseDown>
+            <OnMouseDown function="CensusPlus_Census_OnMouseDown" />
    <OnHide>
-    if ( this.isMoving ) then
-     this:StopMovingOrSizing();
-     this.isMoving = false;
+    if ( self.isMoving ) then
+     self:StopMovingOrSizing();
+     self.isMoving = false;
     end
    </OnHide>
   </Scripts>
@@ -2466,7 +2522,7 @@
       CensusPlus_SelectLocale("US");
      </OnClick>
      <OnEnter>
-      GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+      GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
       GameTooltip:SetText(CENSUSPLUS_US_LOCALE, 1.0, 1.0, 1.0);
       GameTooltip:Show();
      </OnEnter>
@@ -2491,7 +2547,7 @@
       CensusPlus_SelectLocale("EU");
      </OnClick>
      <OnEnter>
-      GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+      GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
       GameTooltip:SetText(CENSUSPLUS_EU_LOCALE, 1.0, 1.0, 1.0);
       GameTooltip:Show();
      </OnEnter>
@@ -2578,10 +2634,10 @@
     </Layers>
     <Scripts>
      <OnLoad>
-      this:SetFrameLevel(10);
+      self:SetFrameLevel(10);
      </OnLoad>
      <OnClick>
-      if ( this:GetChecked() ) then
+      if ( self:GetChecked() ) then
        PlaySound("igMainMenuOptionCheckBoxOff");
        CensusPlus_AutoCloseWho(1);
       else
@@ -2625,10 +2681,10 @@
     </Layers>
     <Scripts>
      <OnLoad>
-      this:SetFrameLevel(10);
+      self:SetFrameLevel(10);
      </OnLoad>
      <OnClick>
-      if ( this:GetChecked() ) then
+      if ( self:GetChecked() ) then
        PlaySound("igMainMenuOptionCheckBoxOff");
        CensusPlus_AutoStart(1);
       else
@@ -2637,7 +2693,7 @@
       end
      </OnClick>
      <OnEnter>
-      GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+      GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
       GameTooltip:SetText(CENSUSPlus_AUTOSTART_TOOLTIP, 1.0, 1.0, 1.0);
       GameTooltip:Show();					
      </OnEnter>
@@ -2680,10 +2736,10 @@
     </Layers>
     <Scripts>
      <OnLoad>
-      this:SetFrameLevel(10);
+      self:SetFrameLevel(10);
      </OnLoad>
      <OnClick>
-      if ( this:GetChecked() ) then
+      if ( self:GetChecked() ) then
        PlaySound("igMainMenuOptionCheckBoxOff");
        CensusPlus_Verbose();
       else
@@ -2692,7 +2748,7 @@
       end
      </OnClick>
      <OnEnter>
-      GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+      GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
       GameTooltip:SetText(CENSUSPlus_VERBOSE_TOOLTIP, 1.0, 1.0, 1.0);
       GameTooltip:Show();					
      </OnEnter>
@@ -2735,10 +2791,10 @@
     </Layers>
     <Scripts>
      <OnLoad>
-      this:SetFrameLevel(10);
+      self:SetFrameLevel(10);
      </OnLoad>
      <OnClick>
-      if ( this:GetChecked() ) then
+      if ( self:GetChecked() ) then
        PlaySound("igMainMenuOptionCheckBoxOff");
        CensusPlus_SetAutoCensus(1);
       else
@@ -2747,7 +2803,7 @@
       end
      </OnClick>
      <OnEnter>
-      GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
+      GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
       GameTooltip:SetText(CENSUSPlus_AUTOCENSUS_TOOLTIP, 1.0, 1.0, 1.0);
       GameTooltip:Show();					
      </OnEnter>
@@ -2790,10 +2846,10 @@
     </Layers>
     <Scripts>
      <OnLoad>
-      this:SetFrameLevel(10);
+      self:SetFrameLevel(10);
      </OnLoad>
      <OnClick>
-      if ( this:GetChecked() ) then
+      if ( self:GetChecked() ) then
        PlaySound("igMainMenuOptionCheckBoxOff");
        CensusPlus_Database["Info"]["CensusButtonShown"] = 1;
        CensusButtonFrame:Show();
@@ -2804,7 +2860,7 @@
       end
      </OnClick>
      <OnLoad>
-      getglobal(this:GetName().."Text"):SetText(CENSUS_OPTIONS_BUTSHOW);
+      getglobal(self:GetName().."Text"):SetText(CENSUS_OPTIONS_BUTSHOW);
      </OnLoad>
     </Scripts>
     <NormalTexture file="Interface\Buttons\UI-CheckBox-Up" />
@@ -2842,11 +2898,11 @@
     </Layers>
     <Scripts>
      <OnLoad>
-      this:SetFrameLevel(10);
-      getglobal(this:GetName().."Text"):SetText(CENSUS_OPTIONS_SOUND_ON_COMPLETE);
+      self:SetFrameLevel(10);
+      getglobal(self:GetName().."Text"):SetText(CENSUS_OPTIONS_SOUND_ON_COMPLETE);
      </OnLoad>
      <OnClick>
-      if ( this:GetChecked() ) then
+      if ( self:GetChecked() ) then
        PlaySound("igMainMenuOptionCheckBoxOff");
        CensusPlus_PerCharInfo["PlayFinishSound"] = true;
       else
@@ -2891,10 +2947,10 @@
     </Layers>
     <Scripts>
      <OnLoad>
-      this:SetFrameLevel(10);
+      self:SetFrameLevel(10);
      </OnLoad>
      <OnClick>
-      if ( this:GetChecked() ) then
+      if ( self:GetChecked() ) then
        PlaySound("igMainMenuOptionCheckBoxOff");
        CensusPlus_Database["Info"]["UseLogBars"] = 1;
        CensusPlus_UpdateView();
@@ -2905,7 +2961,7 @@
       end
      </OnClick>
      <OnLoad>
-      getglobal(this:GetName().."Text"):SetText(CENSUS_OPTIONS_LOG_BARS);
+      getglobal(self:GetName().."Text"):SetText(CENSUS_OPTIONS_LOG_BARS);
      </OnLoad>
     </Scripts>
     <NormalTexture file="Interface\Buttons\UI-CheckBox-Up" />
@@ -2953,22 +3009,12 @@
    <OnShow>
     CP_OptionsOnShow();
    </OnShow>
-   <OnMouseUp>
-    if ( this.isMoving ) then
-     this:StopMovingOrSizing();
-     this.isMoving = false;
-    end
-   </OnMouseUp>
-   <OnMouseDown>
-    if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
-     this:StartMoving();
-     this.isMoving = true;
-    end
-   </OnMouseDown>
+   <OnMouseUp function="CensusPlus_Options_OnMouseUp" />
+   <OnMouseDown function="CensusPlus_Options_OnMouseDown" />
    <OnHide>
-    if ( this.isMoving ) then
-     this:StopMovingOrSizing();
-     this.isMoving = false;
+    if ( self.isMoving ) then
+     self:StopMovingOrSizing();
+     self.isMoving = false;
     end
    </OnHide>
   </Scripts>