comparison OpenButtonPage.xml @ 13:6cb9a2936580

Miscellanous Lua code consistency improvements: - no semicolon except between statements on same line - use of implicit cast to bool in if/while conditions, instead of various eq/neq against true, false or nil - no parenthesis around if/while conditions (C-ism) - avoid long function calls in if conditions - removed space in comma-separated expressions lists in multiple assignments - added spaces between arguments of functions calls - use tabs for indentation (in Lua files only) - don't reverse == in if conditions, like "if 42==foo then" (C-ism) - removed some extra parenthesis in complex expressions (C-ism) - added spaces around operators in most expressions for ease of reading - added comma after last element of table initializers - removed space after # operator - moved comment prefix of disabled code into tab (to keep disabled code aligned)
author madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09
date Thu, 25 Apr 2013 01:29:45 +0000
parents 8428fa7cf0e4
children f02cf040133c
comparison
equal deleted inserted replaced
12:72b92b3e476e 13:6cb9a2936580
53 </Offset> 53 </Offset>
54 </Anchor> 54 </Anchor>
55 </Anchors> 55 </Anchors>
56 <Scripts> 56 <Scripts>
57 <OnLoad> 57 <OnLoad>
58 self:RegisterForDrag("LeftButton","RightButton") 58 self:RegisterForDrag("LeftButton", "RightButton")
59 </OnLoad> 59 </OnLoad>
60 <OnClick> 60 <OnClick>
61 CyborgMMO_Toggle(); 61 CyborgMMO_Toggle()
62 </OnClick> 62 </OnClick>
63 <OnDragStart> 63 <OnDragStart>
64 self:StartMoving(); 64 self:StartMoving()
65 self.isMoving = true; 65 self.isMoving = true
66 </OnDragStart> 66 </OnDragStart>
67 <OnDragStop> 67 <OnDragStop>
68 self:StopMovingOrSizing(); 68 self:StopMovingOrSizing()
69 self.isMoving = false; 69 self.isMoving = false
70 </OnDragStop> 70 </OnDragStop>
71 <OnEnter> 71 <OnEnter>
72 CyborgMMO_ShowProfileTooltip(self:GetNormalTexture()) 72 CyborgMMO_ShowProfileTooltip(self:GetNormalTexture())
73 </OnEnter> 73 </OnEnter>
74 <OnLeave> 74 <OnLeave>
158 </Texture> 158 </Texture>
159 </Layer> 159 </Layer>
160 </Layers> 160 </Layers>
161 <Scripts> 161 <Scripts>
162 <OnLoad> 162 <OnLoad>
163 self:RegisterForDrag("LeftButton","RightButton") 163 self:RegisterForDrag("LeftButton", "RightButton")
164 </OnLoad> 164 </OnLoad>
165 <OnMouseDown> 165 <OnMouseDown>
166 </OnMouseDown> 166 </OnMouseDown>
167 <OnMouseUp> 167 <OnMouseUp>
168 CyborgMMO_Toggle(); 168 CyborgMMO_Toggle()
169 if(false == CyborgMMO_IsOpen()) then 169 if not CyborgMMO_IsOpen() then
170 CyborgMMO_RatQuickPage:Show(); 170 CyborgMMO_RatQuickPage:Show()
171 end 171 end
172 </OnMouseUp> 172 </OnMouseUp>
173 <OnEnter> 173 <OnEnter>
174 if(false == CyborgMMO_IsOpen()) then 174 if not CyborgMMO_IsOpen() then
175 CyborgMMO_RatQuickPage:Show(); 175 CyborgMMO_RatQuickPage:Show()
176 end 176 end
177 CyborgMMO_ShowProfileTooltip(getglobal(self:GetName().."_Icon")) 177 CyborgMMO_ShowProfileTooltip(getglobal(self:GetName().."_Icon"))
178 </OnEnter> 178 </OnEnter>
179 <OnLeave> 179 <OnLeave>
180 CyborgMMO_RatQuickPage:Hide() 180 CyborgMMO_RatQuickPage:Hide()
181 CyborgMMO_HideProfileTooltip() 181 CyborgMMO_HideProfileTooltip()
182 </OnLeave> 182 </OnLeave>
183 <OnUpdate> 183 <OnUpdate>
184 if(self:IsDragging()) then 184 if self:IsDragging() then
185 CyborgMMO_MiniMapButtonOnUpdate(); 185 CyborgMMO_MiniMapButtonOnUpdate()
186 end 186 end
187 </OnUpdate> 187 </OnUpdate>
188 </Scripts> 188 </Scripts>
189 </Button> 189 </Button>
190 </Frames> 190 </Frames>