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

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.

主站蜘蛛池模板: 陇川县| 通山县| 五家渠市| 雅安市| 张家口市| 乌审旗| 兴安盟| 柯坪县| 黄大仙区| 边坝县| 徐州市| 曲沃县| 罗城| 福贡县| 邵武市| 勃利县| 乌什县| 岱山县| 昭苏县| 法库县| 枣阳市| 普兰店市| 比如县| 杂多县| 长葛市| 龙陵县| 德化县| 利津县| 蓬溪县| 维西| 枞阳县| 四会市| 清丰县| 颍上县| 邵阳市| 肇庆市| 微山县| 象山县| 威宁| 巴彦淖尔市| 安阳县|