For this we will create another method inside the game
class.
1. Insert a new method called
CreateTitleScreen
.Method CreateTitleScreen:Int ()
2. Load the title screen image into a local object and set its layer to
layerTitle
.Local ts:ftObject = eng.CreateImage("CR_TitleScreen.png",eng.canvasWidth/2, eng.canvasHeight/2) ts.SetLayer(layerTitle)
3. Create a PLAY button at the location the button is drawn onto the image.
CreateButton(eng.canvasWidth-220,60,eng.canvasWidth/2, eng.canvasHeight-260, btnPlay, layerTitle)
4. Close the method:
Return 0 End