comparison CensusButton.xml @ 23:099a20159243 v4.2d FIN

Merge 4th try
author EmFor
date Sun, 14 Aug 2011 17:27:33 +0200
parents 663f782bd903
children
comparison
equal deleted inserted replaced
22:68032715bc3c 23:099a20159243
42 <NormalTexture file="Interface\AddOns\CensusPlus\Skin\CensusButton-Up"/> 42 <NormalTexture file="Interface\AddOns\CensusPlus\Skin\CensusButton-Up"/>
43 <PushedTexture file="Interface\AddOns\CensusPlus\Skin\CensusButton-Down"/> 43 <PushedTexture file="Interface\AddOns\CensusPlus\Skin\CensusButton-Down"/>
44 <HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/> 44 <HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/>
45 <Scripts> 45 <Scripts>
46 <OnLoad> 46 <OnLoad>
47 this:RegisterForClicks("LeftButtonUp", "RightButtonUp"); 47 self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
48 </OnLoad> 48 </OnLoad>
49 <OnClick> 49 <OnClick function="CensusPlus_Button_OnClick" />
50 if( not CensusButtonFrame.isMoving ) then 50 <OnMouseUp>
51 CensusPlusButton_OnClick(arg1, arg2);
52 PlaySound("igMainMenuOptionCheckBoxOn");
53 end
54 </OnClick>
55 <OnMouseUp>
56 if ( CensusButtonFrame.isMoving ) then 51 if ( CensusButtonFrame.isMoving ) then
57 CensusButtonFrame:StopMovingOrSizing(); 52 CensusButtonFrame:StopMovingOrSizing();
58 CensusButtonFrame.isMoving = false; 53 CensusButtonFrame.isMoving = false;
59 end 54 end
60 </OnMouseUp> 55 </OnMouseUp>
61 <OnMouseDown> 56 <OnMouseDown function="CensusPlus_Button_OnMouseDown" />
62 if ( ( ( not CensusButtonFrame.isLocked ) or ( CensusButtonFrame.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
63 CensusButtonFrame:StartMoving();
64 CensusButtonFrame.isMoving = true;
65 end
66 </OnMouseDown>
67 <OnEnter> 57 <OnEnter>
68 GameTooltip_SetDefaultAnchor(GameTooltip, UIParent); 58 GameTooltip_SetDefaultAnchor(GameTooltip, UIParent);
69 <!-- CENSUS_BUTTON_TOOLTIP="test"; -->
70 GameTooltip:SetText(CENSUS_BUTTON_TOOLTIP); 59 GameTooltip:SetText(CENSUS_BUTTON_TOOLTIP);
71 </OnEnter> 60 </OnEnter>
72 <OnLeave> 61 <OnLeave>
73 GameTooltip:Hide(); 62 GameTooltip:Hide();
74 </OnLeave> 63 </OnLeave>
75 </Scripts> 64 </Scripts>
76 </Button> 65 </Button>
77 </Frames> 66 </Frames>
78 <Scripts> 67 <Scripts>
79 <OnLoad> 68 <OnLoad>
80 this:RegisterEvent("VARIABLES_LOADED"); 69 self:RegisterEvent("VARIABLES_LOADED");
81 </OnLoad> 70 </OnLoad>
82 <OnEvent> 71 <OnEvent>
83 CensusButton_Init(); 72 CensusButton_Init();
84 </OnEvent> 73 </OnEvent>
85 <OnHide> 74 <OnHide>
86 if ( this.isMoving ) then 75 if ( self.isMoving ) then
87 this:StopMovingOrSizing(); 76 self:StopMovingOrSizing();
88 this.isMoving = false; 77 self.isMoving = false;
89 end 78 end
90 </OnHide> 79 </OnHide>
91 </Scripts> 80 </Scripts>
92 </Frame> 81 </Frame>
93 </Ui> 82 </Ui>