官术网_书友最值得收藏!

Time for action – modifying our application

Before we dive into more complex examples, let's alter some minor things in our program by performing the following steps:

  1. Let's alter the second line of main.lua to display as follows:
    textObject = display.newText( "Hello World!", 160, 80, native.systemFont, 36 )
    textObject:setFillColor( 0.9, 0.98 ,0 )
  2. Save your file and go back to the Corona simulator. The simulator will detect a change from your file and automatically relaunch with the changes. If the simulator doesn't relaunch automatically upon saving your file, press Command + R (Mac) / Ctrl + R (Windows). You will see the following output on the screen:
    Time for action – modifying our application

Note

As you continue learning more Corona functions, you'll notice that some of the text values will be optional. In this case, we need to use five values.

主站蜘蛛池模板: 孟连| 石嘴山市| 麻城市| 海阳市| 永嘉县| 册亨县| 台州市| 沁阳市| 鲁山县| 阳信县| 加查县| 太谷县| 广昌县| 宜章县| 保山市| 临泽县| 崇文区| 嵊州市| 伊春市| SHOW| 延川县| 南京市| 于都县| 庄河市| 兖州市| 阿尔山市| 日照市| 玉环县| 陵水| 英吉沙县| 大竹县| 钟祥市| 阿拉善右旗| 天台县| 武乡县| 陇西县| 正镶白旗| 壤塘县| 四平市| 沿河| 博罗县|