As we have several buttons in the game, we will add a method to the game class that will set up a button for us:
CreateButtonmethod into the
gameclass. Its parameters are the button width and height, its position, layer and an ID.
Method CreateButton:Int (width:Int, height:Int, xp:Int, yp:Int, id:Int, layer:ftLayer)
Local but:ftObject = eng.CreateZoneBox(width, height, xp, yp)
OnObjTouchevent of the engine, we will set the tag property of the object with the ID.