Remember that the game screen is composed of one background image, two text objects, and two button objects:
1. To compose the screen, add a method called
CreateGameScreen
in thegame
class.Method CreateGameScreen:Int()
2. Load the background image into a local object, as we don't need to access it separately later on. Set its layer to
layerBackGround
.Local ts:ftObject = eng.CreateImage("CR_GameScreen.png",eng.canvasWidth/2, eng.canvasHeight/2) ts.SetLayer(layerBackGround)
3. Now create the RESET button at a location where it is drawn on the background image.
CreateButton(180,60,130,eng.canvasHeight-50, btnReset, layerBackGround)
4. Repeat this for the EXIT button and then close the method.
CreateButton(180,60,eng.canvasWidth-130,eng.canvasHeight-50, btnExit, layerBackGround) CreateInfoText() Return 0 End