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

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.

主站蜘蛛池模板: 东台市| 静乐县| 襄垣县| 汤阴县| 裕民县| 海原县| 电白县| 西乌珠穆沁旗| 宜兴市| 泰宁县| 琼结县| 连城县| 五家渠市| 崇仁县| 涪陵区| 张家港市| 三台县| 应用必备| 双牌县| 阿瓦提县| 巴马| 乌兰察布市| 金塔县| 宜州市| 嘉荫县| 嘉禾县| 灵武市| 锡林浩特市| 舒兰市| 庆元县| 靖安县| 招远市| 上虞市| 繁峙县| 房山区| 姚安县| 青神县| 郧西县| 遂平县| 德格县| 天长市|