-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mainmenu.lua
65 lines (44 loc) · 1.76 KB
/
Mainmenu.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
local composer = require( "composer" )
local scene = composer.newScene()
------------------------------------------------------------------------------------------
display.setStatusBar(display.HiddenStatusBar);
centerX = display.contentCenterX
centerY = display.contentCenterY
actualW = display.actualContentWidth
actualH = display.actualContentHeight
--[[
actualWD2 = display.actualContentWidth/2
actualHD2 = display.actualContentHeight/2
function scene:create( event )
local sceneGroup = self.view
local BG = display.newImage("background.png", centerX, centerY)
sceneGroup:insert( BG )
end
function scene:show( event )
local sceneGroup = self.view
local phase = event.phase
if ( phase == "did" ) then
local robotHead = display.newImage("robot.png",150, 110)
sceneGroup:insert( robotHead )
local titleTxt = display.newText( "Inventor Mentor", 160, 60, native.systemFontBold, 40 )
titleTxt:setTextColor( 1, 1, 0 )
sceneGroup:insert( titleTxt )
local gameTxt = display.newText ("Play", 160 , 160, native.systemFontBold, 30)
gameTxt:setTextColor( 1, 1, 0 )
sceneGroup:insert( gameTxt )
local fineTxt = display.newText ("*This game is still in developement", 160 , 480, native.systemFontBold, 10)
creditsTxt:setTextColor( 1, 1, 0 )
sceneGroup:insert( fineTxt )
local function gotoGames(event)
if event.phase == "ended" then
composer.gotoScene( "Gamemenu", { time = 500, effect = "fromBottom" })
end
end
gameTxt:addEventListener( "touch", gotoGames )
helpTxt:addEventListener( "touch", gotoHelp )
end
end
scene:addEventListener( "create", scene )
scene:addEventListener( "show", scene )
return scene
]]