Our title screen will be composed of a nice single-colored background, the text Balls Out!, and two text buttons to Play and Exit the game:
CreateTitleScreen
method inside the game
class.Method CreateTitleScreen:Int ()
Local box:ftObject = eng.CreateBox(cw-20,ch-20,cw/2,ch/2) box.SetLayer(layerTitle) box.SetColor(0,0,255)
3
.Local tx1:ftObject = eng.CreateText(font1,"Balls Out!",cw/2,ch/5,1) tx1.SetLayer(layerTitle) tx1.SetScale(3.0)
1.5
and assigned to the title layer.Local b1:ftObject = CreateTextButton(font1, "Play", cw/2,ch/5*3, btnPlay, layerTitle) b1.SetScale(1.5) Local b3:ftObject = CreateTextButton(font1, "Exit", cw/2,ch/5*4, btnExit, layerTitle) b3.SetScale(1.5)
Return 0 End