Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed indentation in generated source files

  • Loading branch information...
commit 9337a19f0a361118d3063fe9728636740f5a36d3 1 parent c3e45a4
Radamanthus Batnag authored
58 about.lua
View
@@ -2,33 +2,33 @@ module(..., package.seeall)
-- Main function - MUST return a display.newGroup()
function new()
- local localGroup = display.newGroup()
-
- -- Background
- local background = display.newImageRect("bk_default.png", 480, 320)
- background.x = display.contentCenterX
- background.y = display.contentCenterY
- localGroup:insert(background)
-
- -- Title
- local title = display.newText("Touch to go back", 0, 0, native.systemFontBold, 16)
- title:setTextColor( 255,255,255)
- title.x = display.contentCenterX
- title.y = display.contentCenterY
- title.name = "title"
- localGroup:insert(title)
-
- -- Touch to go back
- local function touched ( event )
- if ("ended" == event.phase) then
- director:changeScene("menu","fade")
- end
- end
- background:addEventListener("touch",touched)
-
- unloadMe = function()
- end
-
- -- MUST return a display.newGroup()
- return localGroup
+ local localGroup = display.newGroup()
+
+ -- Background
+ local background = display.newImageRect("bk_default.png", 480, 320)
+ background.x = display.contentCenterX
+ background.y = display.contentCenterY
+ localGroup:insert(background)
+
+ -- Title
+ local title = display.newText("Touch to go back", 0, 0, native.systemFontBold, 16)
+ title:setTextColor( 255,255,255)
+ title.x = display.contentCenterX
+ title.y = display.contentCenterY
+ title.name = "title"
+ localGroup:insert(title)
+
+ -- Touch to go back
+ local function touched ( event )
+ if ("ended" == event.phase) then
+ director:changeScene("menu","fade")
+ end
+ end
+ background:addEventListener("touch",touched)
+
+ unloadMe = function()
+ end
+
+ -- MUST return a display.newGroup()
+ return localGroup
end
58 help.lua
View
@@ -2,33 +2,33 @@ module(..., package.seeall)
-- Main function - MUST return a display.newGroup()
function new()
- local localGroup = display.newGroup()
-
- -- Background
- local background = display.newImageRect("bk_default.png", 480, 320)
- background.x = display.contentCenterX
- background.y = display.contentCenterY
- localGroup:insert(background)
-
- -- Title
- local title = display.newText("Touch to go back", 0, 0, native.systemFontBold, 16)
- title:setTextColor( 255,255,255)
- title.x = display.contentCenterX
- title.y = display.contentCenterY
- title.name = "title"
- localGroup:insert(title)
-
- -- Touch to go back
- local function touched ( event )
- if ("ended" == event.phase) then
- director:changeScene("menu","fade")
- end
- end
- background:addEventListener("touch",touched)
-
- unloadMe = function()
- end
-
- -- MUST return a display.newGroup()
- return localGroup
+ local localGroup = display.newGroup()
+
+ -- Background
+ local background = display.newImageRect("bk_default.png", 480, 320)
+ background.x = display.contentCenterX
+ background.y = display.contentCenterY
+ localGroup:insert(background)
+
+ -- Title
+ local title = display.newText("Touch to go back", 0, 0, native.systemFontBold, 16)
+ title:setTextColor( 255,255,255)
+ title.x = display.contentCenterX
+ title.y = display.contentCenterY
+ title.name = "title"
+ localGroup:insert(title)
+
+ -- Touch to go back
+ local function touched ( event )
+ if ("ended" == event.phase) then
+ director:changeScene("menu","fade")
+ end
+ end
+ background:addEventListener("touch",touched)
+
+ unloadMe = function()
+ end
+
+ -- MUST return a display.newGroup()
+ return localGroup
end
52 loadmenu.lua
View
@@ -4,30 +4,30 @@ require "init_buttons"
-- Main function - MUST return a display.newGroup()
function new()
- local localGroup = display.newGroup()
-
- local theTimer
- local loadingImage
-
- local showLoadingScreen = function()
- loadingImage = display.newImageRect( "splashScreen.png", 480, 320 )
- loadingImage.x = display.contentWidth
- loadingImage.y = display.contentHeight
- localGroup:insert(loadingImage)
-
- local goToLevel = function()
- director:changeScene( "menu" )
- end
-
- math.randomseed( os.time() )
- theTimer = timer.performWithDelay( 1000, goToLevel, 1 )
- end
-
- showLoadingScreen()
-
- unloadMe = function()
- end
-
- -- MUST return a display.newGroup()
- return localGroup
+ local localGroup = display.newGroup()
+
+ local theTimer
+ local loadingImage
+
+ local showLoadingScreen = function()
+ loadingImage = display.newImageRect( "splashScreen.png", 480, 320 )
+ loadingImage.x = display.contentWidth
+ loadingImage.y = display.contentHeight
+ localGroup:insert(loadingImage)
+
+ local goToLevel = function()
+ director:changeScene( "menu" )
+ end
+
+ math.randomseed( os.time() )
+ theTimer = timer.performWithDelay( 1000, goToLevel, 1 )
+ end
+
+ showLoadingScreen()
+
+ unloadMe = function()
+ end
+
+ -- MUST return a display.newGroup()
+ return localGroup
end
8 main.lua
View
@@ -4,9 +4,9 @@ local director = require("director")
local mainGroup = display.newGroup()
local function main()
- mainGroup:insert(director.directorView)
- director:changeScene("loadmenu")
- return true
+ mainGroup:insert(director.directorView)
+ director:changeScene("loadmenu")
+ return true
end
-main()
+main()
80 menu.lua
View
@@ -4,94 +4,90 @@ local radlib = require "radlib"
-- Main function - MUST return a display.newGroup()
function new()
- local ui = require("ui")
-
- local localGroup = display.newGroup()
-
- -- Background
- local background = display.newImageRect("bk_default.png", 480, 320)
- background.x = display.contentCenterX
- background.y = display.contentCenterY
- localGroup:insert(background)
-
- -- Menu Buttons - Start
+ local ui = require("ui")
+
+ local localGroup = display.newGroup()
+
+ -- Background
+ local background = display.newImageRect("bk_default.png", 480, 320)
+ background.x = display.contentCenterX
+ background.y = display.contentCenterY
+ localGroup:insert(background)
+
+ -- Menu Buttons - Start
local playButton = nil
local function onPlayPressed ( event )
if event.phase == "ended" and playButton.isActive then
director:changeScene("play", "fade", 30.0,60.0,90.0)
end
- end
+ end
playButton = ui.newButton(
radlib.table.merge(
_G.buttons['play'],
{ onRelease = onPlayPressed }
)
)
- playButton.x = 160
- playButton.y = 80
- playButton.isActive = true
- localGroup:insert(playButton)
-
+ playButton.x = 160
+ playButton.y = 80
+ playButton.isActive = true
+ localGroup:insert(playButton)
local settingsButton = nil
local function onSettingsPressed ( event )
if event.phase == "ended" and settingsButton.isActive then
director:changeScene("settings", "fade", "green")
end
- end
+ end
settingsButton = ui.newButton(
radlib.table.merge(
_G.buttons['settings'],
{ onRelease = onSettingsPressed }
)
)
- settingsButton.x = 160
- settingsButton.y = 130
- settingsButton.isActive = true
- localGroup:insert(settingsButton)
-
+ settingsButton.x = 160
+ settingsButton.y = 130
+ settingsButton.isActive = true
+ localGroup:insert(settingsButton)
local helpButton = nil
local function onHelpPressed ( event )
if event.phase == "ended" and helpButton.isActive then
director:changeScene("help", "overFromTop")
end
- end
+ end
helpButton = ui.newButton(
radlib.table.merge(
_G.buttons['help'],
{ onRelease = onHelpPressed }
)
)
- helpButton.x = 160
- helpButton.y = 180
- helpButton.isActive = true
- localGroup:insert(helpButton)
-
+ helpButton.x = 160
+ helpButton.y = 180
+ helpButton.isActive = true
+ localGroup:insert(helpButton)
local aboutButton = nil
local function onAboutPressed ( event )
if event.phase == "ended" and aboutButton.isActive then
director:changeScene("about", "moveFromLeft")
end
- end
+ end
aboutButton = ui.newButton(
radlib.table.merge(
_G.buttons['about'],
{ onRelease = onAboutPressed }
)
)
- aboutButton.x = 160
- aboutButton.y = 230
- aboutButton.isActive = true
- localGroup:insert(aboutButton)
-
- -- Menu Buttons - End
-
- unloadMe = function()
- end
-
- -- MUST return a display.newGroup()
- return localGroup
+ aboutButton.x = 160
+ aboutButton.y = 230
+ aboutButton.isActive = true
+ localGroup:insert(aboutButton)
+ -- Menu Buttons - End
+
+ unloadMe = function()
+ end
+
+ -- MUST return a display.newGroup()
+ return localGroup
end
58 play.lua
View
@@ -2,33 +2,33 @@ module(..., package.seeall)
-- Main function - MUST return a display.newGroup()
function new()
- local localGroup = display.newGroup()
-
- -- Background
- local background = display.newImageRect("bk_default.png", 480, 320)
- background.x = display.contentCenterX
- background.y = display.contentCenterY
- localGroup:insert(background)
-
- -- Title
- local title = display.newText("Touch to go back", 0, 0, native.systemFontBold, 16)
- title:setTextColor( 255,255,255)
- title.x = display.contentCenterX
- title.y = display.contentCenterY
- title.name = "title"
- localGroup:insert(title)
-
- -- Touch to go back
- local function touched ( event )
- if ("ended" == event.phase) then
- director:changeScene("menu","fade")
- end
- end
- background:addEventListener("touch",touched)
-
- unloadMe = function()
- end
-
- -- MUST return a display.newGroup()
- return localGroup
+ local localGroup = display.newGroup()
+
+ -- Background
+ local background = display.newImageRect("bk_default.png", 480, 320)
+ background.x = display.contentCenterX
+ background.y = display.contentCenterY
+ localGroup:insert(background)
+
+ -- Title
+ local title = display.newText("Touch to go back", 0, 0, native.systemFontBold, 16)
+ title:setTextColor( 255,255,255)
+ title.x = display.contentCenterX
+ title.y = display.contentCenterY
+ title.name = "title"
+ localGroup:insert(title)
+
+ -- Touch to go back
+ local function touched ( event )
+ if ("ended" == event.phase) then
+ director:changeScene("menu","fade")
+ end
+ end
+ background:addEventListener("touch",touched)
+
+ unloadMe = function()
+ end
+
+ -- MUST return a display.newGroup()
+ return localGroup
end
58 settings.lua
View
@@ -2,33 +2,33 @@ module(..., package.seeall)
-- Main function - MUST return a display.newGroup()
function new()
- local localGroup = display.newGroup()
-
- -- Background
- local background = display.newImageRect("bk_default.png", 480, 320)
- background.x = display.contentCenterX
- background.y = display.contentCenterY
- localGroup:insert(background)
-
- -- Title
- local title = display.newText("Touch to go back", 0, 0, native.systemFontBold, 16)
- title:setTextColor( 255,255,255)
- title.x = display.contentCenterX
- title.y = display.contentCenterY
- title.name = "title"
- localGroup:insert(title)
-
- -- Touch to go back
- local function touched ( event )
- if ("ended" == event.phase) then
- director:changeScene("menu","fade")
- end
- end
- background:addEventListener("touch",touched)
-
- unloadMe = function()
- end
-
- -- MUST return a display.newGroup()
- return localGroup
+ local localGroup = display.newGroup()
+
+ -- Background
+ local background = display.newImageRect("bk_default.png", 480, 320)
+ background.x = display.contentCenterX
+ background.y = display.contentCenterY
+ localGroup:insert(background)
+
+ -- Title
+ local title = display.newText("Touch to go back", 0, 0, native.systemFontBold, 16)
+ title:setTextColor( 255,255,255)
+ title.x = display.contentCenterX
+ title.y = display.contentCenterY
+ title.name = "title"
+ localGroup:insert(title)
+
+ -- Touch to go back
+ local function touched ( event )
+ if ("ended" == event.phase) then
+ director:changeScene("menu","fade")
+ end
+ end
+ background:addEventListener("touch",touched)
+
+ unloadMe = function()
+ end
+
+ -- MUST return a display.newGroup()
+ return localGroup
end
Please sign in to comment.
Something went wrong with that request. Please try again.