comparison MainPage.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 d186f8cd5000
children 67ad1101ee10
comparison
equal deleted inserted replaced
12:72b92b3e476e 13:6cb9a2936580
23 23
24 <!-- UIButtonsTemplate--> 24 <!-- UIButtonsTemplate-->
25 <Button name="CyborgMMO_TemplateCallbackButton" virtual="true" inherits="CyborgMMO_TemplateIcon"> 25 <Button name="CyborgMMO_TemplateCallbackButton" virtual="true" inherits="CyborgMMO_TemplateIcon">
26 <Scripts> 26 <Scripts>
27 <OnLoad> 27 <OnLoad>
28 self = CyborgMMO_CallbackIcons.new(self); 28 self = CyborgMMO_CallbackIcons.new(self)
29 </OnLoad> 29 </OnLoad>
30 <OnClick> 30 <OnClick>
31 self.OnClick(); 31 self.OnClick()
32 </OnClick> 32 </OnClick>
33 <OnDragStart> 33 <OnDragStart>
34 self.DragStart(); 34 self.DragStart()
35 </OnDragStart> 35 </OnDragStart>
36 <OnDragStop> 36 <OnDragStop>
37 self.DragStop(); 37 self.DragStop()
38 </OnDragStop> 38 </OnDragStop>
39 </Scripts> 39 </Scripts>
40 </Button> 40 </Button>
41 41
42 <!-- The Main Form --> 42 <!-- The Main Form -->
190 </Anchor> 190 </Anchor>
191 </Anchors> 191 </Anchors>
192 </Frame> 192 </Frame>
193 </Frames> 193 </Frames>
194 <Scripts> 194 <Scripts>
195 <OnLoad>CyborgMMO_Loaded();</OnLoad> 195 <OnLoad>CyborgMMO_Loaded()</OnLoad>
196 <OnEvent>CyborgMMO_Event(this, event,...);</OnEvent> 196 <OnEvent>CyborgMMO_Event(this, event, ...)</OnEvent>
197 </Scripts> 197 </Scripts>
198 </Frame> 198 </Frame>
199 </Ui> 199 </Ui>